| // Copyright 2018 Google LLC |
| // |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file or at |
| // https://developers.google.com/open-source/licenses/bsd |
| |
| // ignore_for_file: camel_case_types |
| // ignore_for_file: comment_references |
| // ignore_for_file: deprecated_member_use_from_same_package |
| // ignore_for_file: doc_directive_unknown |
| // ignore_for_file: lines_longer_than_80_chars |
| // ignore_for_file: non_constant_identifier_names |
| // ignore_for_file: prefer_const_declarations |
| // ignore_for_file: prefer_expression_function_bodies |
| // ignore_for_file: prefer_final_locals |
| // ignore_for_file: prefer_interpolation_to_compose_strings |
| // ignore_for_file: unintended_html_in_doc_comment |
| // ignore_for_file: unnecessary_brace_in_string_interps |
| // ignore_for_file: unnecessary_cast |
| // ignore_for_file: unnecessary_lambdas |
| // ignore_for_file: unnecessary_string_interpolations |
| // ignore_for_file: unreachable_from_main |
| // ignore_for_file: unused_local_variable |
| |
| import 'dart:async' as async; |
| import 'dart:convert' as convert; |
| import 'dart:core' as core; |
| |
| import 'package:googleapis/dialogflow/v2.dart' as api; |
| import 'package:http/http.dart' as http; |
| import 'package:test/test.dart' as unittest; |
| |
| import '../test_shared.dart'; |
| |
| core.List<core.String> buildUnnamed0() => ['foo', 'foo']; |
| |
| void checkUnnamed0(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Agent = 0; |
| api.GoogleCloudDialogflowV2Agent buildGoogleCloudDialogflowV2Agent() { |
| final o = api.GoogleCloudDialogflowV2Agent(); |
| buildCounterGoogleCloudDialogflowV2Agent++; |
| if (buildCounterGoogleCloudDialogflowV2Agent < 3) { |
| o.apiVersion = 'foo'; |
| o.avatarUri = 'foo'; |
| o.classificationThreshold = 42.0; |
| o.defaultLanguageCode = 'foo'; |
| o.description = 'foo'; |
| o.displayName = 'foo'; |
| o.enableLogging = true; |
| o.matchMode = 'foo'; |
| o.parent = 'foo'; |
| o.supportedLanguageCodes = buildUnnamed0(); |
| o.tier = 'foo'; |
| o.timeZone = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Agent--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Agent(api.GoogleCloudDialogflowV2Agent o) { |
| buildCounterGoogleCloudDialogflowV2Agent++; |
| if (buildCounterGoogleCloudDialogflowV2Agent < 3) { |
| unittest.expect(o.apiVersion!, unittest.equals('foo')); |
| unittest.expect(o.avatarUri!, unittest.equals('foo')); |
| unittest.expect(o.classificationThreshold!, unittest.equals(42.0)); |
| unittest.expect(o.defaultLanguageCode!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.enableLogging!, unittest.isTrue); |
| unittest.expect(o.matchMode!, unittest.equals('foo')); |
| unittest.expect(o.parent!, unittest.equals('foo')); |
| checkUnnamed0(o.supportedLanguageCodes!); |
| unittest.expect(o.tier!, unittest.equals('foo')); |
| unittest.expect(o.timeZone!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Agent--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AgentAssistantFeedback = 0; |
| api.GoogleCloudDialogflowV2AgentAssistantFeedback |
| buildGoogleCloudDialogflowV2AgentAssistantFeedback() { |
| final o = api.GoogleCloudDialogflowV2AgentAssistantFeedback(); |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedback < 3) { |
| o.answerRelevance = 'foo'; |
| o.documentCorrectness = 'foo'; |
| o.documentEfficiency = 'foo'; |
| o.knowledgeAssistFeedback = |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback(); |
| o.knowledgeSearchFeedback = |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback(); |
| o.summarizationFeedback = |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedback--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentAssistantFeedback( |
| api.GoogleCloudDialogflowV2AgentAssistantFeedback o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedback < 3) { |
| unittest.expect(o.answerRelevance!, unittest.equals('foo')); |
| unittest.expect(o.documentCorrectness!, unittest.equals('foo')); |
| unittest.expect(o.documentEfficiency!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback( |
| o.knowledgeAssistFeedback!, |
| ); |
| checkGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback( |
| o.knowledgeSearchFeedback!, |
| ); |
| checkGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback( |
| o.summarizationFeedback!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedback--; |
| } |
| |
| core.List<core.String> buildUnnamed1() => ['foo', 'foo']; |
| |
| void checkUnnamed1(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback = |
| 0; |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback(); |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback < |
| 3) { |
| o.answerCopied = true; |
| o.clickedUris = buildUnnamed1(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback( |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback < |
| 3) { |
| unittest.expect(o.answerCopied!, unittest.isTrue); |
| checkUnnamed1(o.clickedUris!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback--; |
| } |
| |
| core.List<core.String> buildUnnamed2() => ['foo', 'foo']; |
| |
| void checkUnnamed2(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback = |
| 0; |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback(); |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback < |
| 3) { |
| o.answerCopied = true; |
| o.clickedUris = buildUnnamed2(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback( |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback < |
| 3) { |
| unittest.expect(o.answerCopied!, unittest.isTrue); |
| checkUnnamed2(o.clickedUris!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed3() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed3(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback = |
| 0; |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback(); |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback < |
| 3) { |
| o.startTime = 'foo'; |
| o.submitTime = 'foo'; |
| o.summaryText = 'foo'; |
| o.textSections = buildUnnamed3(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback( |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback < |
| 3) { |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| unittest.expect(o.submitTime!, unittest.equals('foo')); |
| unittest.expect(o.summaryText!, unittest.equals('foo')); |
| checkUnnamed3(o.textSections!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AgentAssistantRecord = 0; |
| api.GoogleCloudDialogflowV2AgentAssistantRecord |
| buildGoogleCloudDialogflowV2AgentAssistantRecord() { |
| final o = api.GoogleCloudDialogflowV2AgentAssistantRecord(); |
| buildCounterGoogleCloudDialogflowV2AgentAssistantRecord++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantRecord < 3) { |
| o.articleSuggestionAnswer = buildGoogleCloudDialogflowV2ArticleAnswer(); |
| o.dialogflowAssistAnswer = |
| buildGoogleCloudDialogflowV2DialogflowAssistAnswer(); |
| o.faqAnswer = buildGoogleCloudDialogflowV2FaqAnswer(); |
| o.generatorSuggestion = buildGoogleCloudDialogflowV2GeneratorSuggestion(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantRecord--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentAssistantRecord( |
| api.GoogleCloudDialogflowV2AgentAssistantRecord o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentAssistantRecord++; |
| if (buildCounterGoogleCloudDialogflowV2AgentAssistantRecord < 3) { |
| checkGoogleCloudDialogflowV2ArticleAnswer(o.articleSuggestionAnswer!); |
| checkGoogleCloudDialogflowV2DialogflowAssistAnswer( |
| o.dialogflowAssistAnswer!, |
| ); |
| checkGoogleCloudDialogflowV2FaqAnswer(o.faqAnswer!); |
| checkGoogleCloudDialogflowV2GeneratorSuggestion(o.generatorSuggestion!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentAssistantRecord--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2AgentCoachingInstruction> |
| buildUnnamed4() => [ |
| buildGoogleCloudDialogflowV2AgentCoachingInstruction(), |
| buildGoogleCloudDialogflowV2AgentCoachingInstruction(), |
| ]; |
| |
| void checkUnnamed4( |
| core.List<api.GoogleCloudDialogflowV2AgentCoachingInstruction> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AgentCoachingInstruction(o[0]); |
| checkGoogleCloudDialogflowV2AgentCoachingInstruction(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AgentCoachingContext = 0; |
| api.GoogleCloudDialogflowV2AgentCoachingContext |
| buildGoogleCloudDialogflowV2AgentCoachingContext() { |
| final o = api.GoogleCloudDialogflowV2AgentCoachingContext(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingContext++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingContext < 3) { |
| o.instructions = buildUnnamed4(); |
| o.outputLanguageCode = 'foo'; |
| o.overarchingGuidance = 'foo'; |
| o.version = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingContext--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingContext( |
| api.GoogleCloudDialogflowV2AgentCoachingContext o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingContext++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingContext < 3) { |
| checkUnnamed4(o.instructions!); |
| unittest.expect(o.outputLanguageCode!, unittest.equals('foo')); |
| unittest.expect(o.overarchingGuidance!, unittest.equals('foo')); |
| unittest.expect(o.version!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingContext--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AgentCoachingInstruction = 0; |
| api.GoogleCloudDialogflowV2AgentCoachingInstruction |
| buildGoogleCloudDialogflowV2AgentCoachingInstruction() { |
| final o = api.GoogleCloudDialogflowV2AgentCoachingInstruction(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstruction++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingInstruction < 3) { |
| o.agentAction = 'foo'; |
| o.condition = 'foo'; |
| o.displayDetails = 'foo'; |
| o.displayName = 'foo'; |
| o.duplicateCheckResult = |
| buildGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult(); |
| o.systemAction = 'foo'; |
| o.triggeringEvent = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstruction--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingInstruction( |
| api.GoogleCloudDialogflowV2AgentCoachingInstruction o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstruction++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingInstruction < 3) { |
| unittest.expect(o.agentAction!, unittest.equals('foo')); |
| unittest.expect(o.condition!, unittest.equals('foo')); |
| unittest.expect(o.displayDetails!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult( |
| o.duplicateCheckResult!, |
| ); |
| unittest.expect(o.systemAction!, unittest.equals('foo')); |
| unittest.expect(o.triggeringEvent!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstruction--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion |
| > |
| buildUnnamed5() => [ |
| buildGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion(), |
| buildGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion(), |
| ]; |
| |
| void checkUnnamed5( |
| core.List< |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult = |
| 0; |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult |
| buildGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult < |
| 3) { |
| o.duplicateSuggestions = buildUnnamed5(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult( |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult < |
| 3) { |
| checkUnnamed5(o.duplicateSuggestions!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion = |
| 0; |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion |
| buildGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion < |
| 3) { |
| o.answerRecord = 'foo'; |
| o.similarityScore = 42.0; |
| o.suggestionIndex = 42; |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion( |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion < |
| 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.similarityScore!, unittest.equals(42.0)); |
| unittest.expect(o.suggestionIndex!, unittest.equals(42)); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion |
| > |
| buildUnnamed6() => [ |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion(), |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion(), |
| ]; |
| |
| void checkUnnamed6( |
| core.List< |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion( |
| o[1], |
| ); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2AgentCoachingInstruction> |
| buildUnnamed7() => [ |
| buildGoogleCloudDialogflowV2AgentCoachingInstruction(), |
| buildGoogleCloudDialogflowV2AgentCoachingInstruction(), |
| ]; |
| |
| void checkUnnamed7( |
| core.List<api.GoogleCloudDialogflowV2AgentCoachingInstruction> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AgentCoachingInstruction(o[0]); |
| checkGoogleCloudDialogflowV2AgentCoachingInstruction(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse> |
| buildUnnamed8() => [ |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse(), |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse(), |
| ]; |
| |
| void checkUnnamed8( |
| core.List<api.GoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse(o[0]); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestion = 0; |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestion |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestion() { |
| final o = api.GoogleCloudDialogflowV2AgentCoachingSuggestion(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestion < 3) { |
| o.agentActionSuggestions = buildUnnamed6(); |
| o.applicableInstructions = buildUnnamed7(); |
| o.sampleResponses = buildUnnamed8(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingSuggestion( |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestion < 3) { |
| checkUnnamed6(o.agentActionSuggestions!); |
| checkUnnamed7(o.applicableInstructions!); |
| checkUnnamed8(o.sampleResponses!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestion--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion = |
| 0; |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion < |
| 3) { |
| o.agentAction = 'foo'; |
| o.duplicateCheckResult = |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult(); |
| o.sources = buildGoogleCloudDialogflowV2AgentCoachingSuggestionSources(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion( |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion < |
| 3) { |
| unittest.expect(o.agentAction!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult( |
| o.duplicateCheckResult!, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionSources(o.sources!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion |
| > |
| buildUnnamed9() => [ |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion(), |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion(), |
| ]; |
| |
| void checkUnnamed9( |
| core.List< |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult = |
| 0; |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult < |
| 3) { |
| o.duplicateSuggestions = buildUnnamed9(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult( |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult < |
| 3) { |
| checkUnnamed9(o.duplicateSuggestions!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion = |
| 0; |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion() { |
| final o = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion < |
| 3) { |
| o.answerRecord = 'foo'; |
| o.similarityScore = 42.0; |
| o.sources = buildGoogleCloudDialogflowV2AgentCoachingSuggestionSources(); |
| o.suggestionIndex = 42; |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion( |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion < |
| 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.similarityScore!, unittest.equals(42.0)); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionSources(o.sources!); |
| unittest.expect(o.suggestionIndex!, unittest.equals(42)); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse = 0; |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse() { |
| final o = api.GoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse < |
| 3) { |
| o.duplicateCheckResult = |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult(); |
| o.responseText = 'foo'; |
| o.sources = buildGoogleCloudDialogflowV2AgentCoachingSuggestionSources(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse( |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse < |
| 3) { |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult( |
| o.duplicateCheckResult!, |
| ); |
| unittest.expect(o.responseText!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionSources(o.sources!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse--; |
| } |
| |
| core.List<core.int> buildUnnamed10() => [42, 42]; |
| |
| void checkUnnamed10(core.List<core.int> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals(42)); |
| unittest.expect(o[1], unittest.equals(42)); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSources = 0; |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionSources |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionSources() { |
| final o = api.GoogleCloudDialogflowV2AgentCoachingSuggestionSources(); |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSources++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSources < 3) { |
| o.instructionIndexes = buildUnnamed10(); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSources--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AgentCoachingSuggestionSources( |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionSources o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSources++; |
| if (buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSources < 3) { |
| checkUnnamed10(o.instructionIndexes!); |
| } |
| buildCounterGoogleCloudDialogflowV2AgentCoachingSuggestionSources--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed11() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed11(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted1 = (o['x']!) as core.Map; |
| unittest.expect(casted1, unittest.hasLength(3)); |
| unittest.expect(casted1['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted1['bool'], unittest.equals(true)); |
| unittest.expect(casted1['string'], unittest.equals('foo')); |
| var casted2 = (o['y']!) as core.Map; |
| unittest.expect(casted2, unittest.hasLength(3)); |
| unittest.expect(casted2['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted2['bool'], unittest.equals(true)); |
| unittest.expect(casted2['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AnalyzeContentRequest = 0; |
| api.GoogleCloudDialogflowV2AnalyzeContentRequest |
| buildGoogleCloudDialogflowV2AnalyzeContentRequest() { |
| final o = api.GoogleCloudDialogflowV2AnalyzeContentRequest(); |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2AnalyzeContentRequest < 3) { |
| o.assistQueryParams = buildGoogleCloudDialogflowV2AssistQueryParameters(); |
| o.audioInput = buildGoogleCloudDialogflowV2AudioInput(); |
| o.cxParameters = buildUnnamed11(); |
| o.eventInput = buildGoogleCloudDialogflowV2EventInput(); |
| o.queryParams = buildGoogleCloudDialogflowV2QueryParameters(); |
| o.replyAudioConfig = buildGoogleCloudDialogflowV2OutputAudioConfig(); |
| o.requestId = 'foo'; |
| o.suggestionInput = buildGoogleCloudDialogflowV2SuggestionInput(); |
| o.textInput = buildGoogleCloudDialogflowV2TextInput(); |
| } |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AnalyzeContentRequest( |
| api.GoogleCloudDialogflowV2AnalyzeContentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2AnalyzeContentRequest < 3) { |
| checkGoogleCloudDialogflowV2AssistQueryParameters(o.assistQueryParams!); |
| checkGoogleCloudDialogflowV2AudioInput(o.audioInput!); |
| checkUnnamed11(o.cxParameters!); |
| checkGoogleCloudDialogflowV2EventInput(o.eventInput!); |
| checkGoogleCloudDialogflowV2QueryParameters(o.queryParams!); |
| checkGoogleCloudDialogflowV2OutputAudioConfig(o.replyAudioConfig!); |
| unittest.expect(o.requestId!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SuggestionInput(o.suggestionInput!); |
| checkGoogleCloudDialogflowV2TextInput(o.textInput!); |
| } |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SuggestionResult> buildUnnamed12() => [ |
| buildGoogleCloudDialogflowV2SuggestionResult(), |
| buildGoogleCloudDialogflowV2SuggestionResult(), |
| ]; |
| |
| void checkUnnamed12(core.List<api.GoogleCloudDialogflowV2SuggestionResult> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SuggestionResult(o[0]); |
| checkGoogleCloudDialogflowV2SuggestionResult(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SuggestionResult> buildUnnamed13() => [ |
| buildGoogleCloudDialogflowV2SuggestionResult(), |
| buildGoogleCloudDialogflowV2SuggestionResult(), |
| ]; |
| |
| void checkUnnamed13(core.List<api.GoogleCloudDialogflowV2SuggestionResult> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SuggestionResult(o[0]); |
| checkGoogleCloudDialogflowV2SuggestionResult(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AnalyzeContentResponse = 0; |
| api.GoogleCloudDialogflowV2AnalyzeContentResponse |
| buildGoogleCloudDialogflowV2AnalyzeContentResponse() { |
| final o = api.GoogleCloudDialogflowV2AnalyzeContentResponse(); |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentResponse++; |
| if (buildCounterGoogleCloudDialogflowV2AnalyzeContentResponse < 3) { |
| o.automatedAgentReply = buildGoogleCloudDialogflowV2AutomatedAgentReply(); |
| o.dtmfParameters = buildGoogleCloudDialogflowV2DtmfParameters(); |
| o.endUserSuggestionResults = buildUnnamed12(); |
| o.humanAgentSuggestionResults = buildUnnamed13(); |
| o.message = buildGoogleCloudDialogflowV2Message(); |
| o.replyAudio = buildGoogleCloudDialogflowV2OutputAudio(); |
| o.replyText = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AnalyzeContentResponse( |
| api.GoogleCloudDialogflowV2AnalyzeContentResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentResponse++; |
| if (buildCounterGoogleCloudDialogflowV2AnalyzeContentResponse < 3) { |
| checkGoogleCloudDialogflowV2AutomatedAgentReply(o.automatedAgentReply!); |
| checkGoogleCloudDialogflowV2DtmfParameters(o.dtmfParameters!); |
| checkUnnamed12(o.endUserSuggestionResults!); |
| checkUnnamed13(o.humanAgentSuggestionResults!); |
| checkGoogleCloudDialogflowV2Message(o.message!); |
| checkGoogleCloudDialogflowV2OutputAudio(o.replyAudio!); |
| unittest.expect(o.replyText!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2AnalyzeContentResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AnnotatedMessagePart = 0; |
| api.GoogleCloudDialogflowV2AnnotatedMessagePart |
| buildGoogleCloudDialogflowV2AnnotatedMessagePart() { |
| final o = api.GoogleCloudDialogflowV2AnnotatedMessagePart(); |
| buildCounterGoogleCloudDialogflowV2AnnotatedMessagePart++; |
| if (buildCounterGoogleCloudDialogflowV2AnnotatedMessagePart < 3) { |
| o.entityType = 'foo'; |
| o.formattedValue = { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }; |
| o.text = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2AnnotatedMessagePart--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AnnotatedMessagePart( |
| api.GoogleCloudDialogflowV2AnnotatedMessagePart o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AnnotatedMessagePart++; |
| if (buildCounterGoogleCloudDialogflowV2AnnotatedMessagePart < 3) { |
| unittest.expect(o.entityType!, unittest.equals('foo')); |
| var casted3 = (o.formattedValue!) as core.Map; |
| unittest.expect(casted3, unittest.hasLength(3)); |
| unittest.expect(casted3['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted3['bool'], unittest.equals(true)); |
| unittest.expect(casted3['string'], unittest.equals('foo')); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2AnnotatedMessagePart--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AnswerFeedback = 0; |
| api.GoogleCloudDialogflowV2AnswerFeedback |
| buildGoogleCloudDialogflowV2AnswerFeedback() { |
| final o = api.GoogleCloudDialogflowV2AnswerFeedback(); |
| buildCounterGoogleCloudDialogflowV2AnswerFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AnswerFeedback < 3) { |
| o.agentAssistantDetailFeedback = |
| buildGoogleCloudDialogflowV2AgentAssistantFeedback(); |
| o.clickTime = 'foo'; |
| o.clicked = true; |
| o.correctnessLevel = 'foo'; |
| o.displayTime = 'foo'; |
| o.displayed = true; |
| } |
| buildCounterGoogleCloudDialogflowV2AnswerFeedback--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AnswerFeedback( |
| api.GoogleCloudDialogflowV2AnswerFeedback o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AnswerFeedback++; |
| if (buildCounterGoogleCloudDialogflowV2AnswerFeedback < 3) { |
| checkGoogleCloudDialogflowV2AgentAssistantFeedback( |
| o.agentAssistantDetailFeedback!, |
| ); |
| unittest.expect(o.clickTime!, unittest.equals('foo')); |
| unittest.expect(o.clicked!, unittest.isTrue); |
| unittest.expect(o.correctnessLevel!, unittest.equals('foo')); |
| unittest.expect(o.displayTime!, unittest.equals('foo')); |
| unittest.expect(o.displayed!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2AnswerFeedback--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AnswerRecord = 0; |
| api.GoogleCloudDialogflowV2AnswerRecord |
| buildGoogleCloudDialogflowV2AnswerRecord() { |
| final o = api.GoogleCloudDialogflowV2AnswerRecord(); |
| buildCounterGoogleCloudDialogflowV2AnswerRecord++; |
| if (buildCounterGoogleCloudDialogflowV2AnswerRecord < 3) { |
| o.agentAssistantRecord = buildGoogleCloudDialogflowV2AgentAssistantRecord(); |
| o.answerFeedback = buildGoogleCloudDialogflowV2AnswerFeedback(); |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2AnswerRecord--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AnswerRecord( |
| api.GoogleCloudDialogflowV2AnswerRecord o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AnswerRecord++; |
| if (buildCounterGoogleCloudDialogflowV2AnswerRecord < 3) { |
| checkGoogleCloudDialogflowV2AgentAssistantRecord(o.agentAssistantRecord!); |
| checkGoogleCloudDialogflowV2AnswerFeedback(o.answerFeedback!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2AnswerRecord--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed14() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed14(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed15() => ['foo', 'foo']; |
| |
| void checkUnnamed15(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ArticleAnswer = 0; |
| api.GoogleCloudDialogflowV2ArticleAnswer |
| buildGoogleCloudDialogflowV2ArticleAnswer() { |
| final o = api.GoogleCloudDialogflowV2ArticleAnswer(); |
| buildCounterGoogleCloudDialogflowV2ArticleAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2ArticleAnswer < 3) { |
| o.answerRecord = 'foo'; |
| o.confidence = 42.0; |
| o.metadata = buildUnnamed14(); |
| o.snippets = buildUnnamed15(); |
| o.title = 'foo'; |
| o.uri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ArticleAnswer--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ArticleAnswer( |
| api.GoogleCloudDialogflowV2ArticleAnswer o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ArticleAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2ArticleAnswer < 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.confidence!, unittest.equals(42.0)); |
| checkUnnamed14(o.metadata!); |
| checkUnnamed15(o.snippets!); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| unittest.expect(o.uri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ArticleAnswer--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ArticleSuggestionModelMetadata = 0; |
| api.GoogleCloudDialogflowV2ArticleSuggestionModelMetadata |
| buildGoogleCloudDialogflowV2ArticleSuggestionModelMetadata() { |
| final o = api.GoogleCloudDialogflowV2ArticleSuggestionModelMetadata(); |
| buildCounterGoogleCloudDialogflowV2ArticleSuggestionModelMetadata++; |
| if (buildCounterGoogleCloudDialogflowV2ArticleSuggestionModelMetadata < 3) { |
| o.trainingModelType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ArticleSuggestionModelMetadata--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ArticleSuggestionModelMetadata( |
| api.GoogleCloudDialogflowV2ArticleSuggestionModelMetadata o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ArticleSuggestionModelMetadata++; |
| if (buildCounterGoogleCloudDialogflowV2ArticleSuggestionModelMetadata < 3) { |
| unittest.expect(o.trainingModelType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ArticleSuggestionModelMetadata--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed16() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed16(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AssistQueryParameters = 0; |
| api.GoogleCloudDialogflowV2AssistQueryParameters |
| buildGoogleCloudDialogflowV2AssistQueryParameters() { |
| final o = api.GoogleCloudDialogflowV2AssistQueryParameters(); |
| buildCounterGoogleCloudDialogflowV2AssistQueryParameters++; |
| if (buildCounterGoogleCloudDialogflowV2AssistQueryParameters < 3) { |
| o.documentsMetadataFilters = buildUnnamed16(); |
| } |
| buildCounterGoogleCloudDialogflowV2AssistQueryParameters--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AssistQueryParameters( |
| api.GoogleCloudDialogflowV2AssistQueryParameters o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AssistQueryParameters++; |
| if (buildCounterGoogleCloudDialogflowV2AssistQueryParameters < 3) { |
| checkUnnamed16(o.documentsMetadataFilters!); |
| } |
| buildCounterGoogleCloudDialogflowV2AssistQueryParameters--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AudioInput = 0; |
| api.GoogleCloudDialogflowV2AudioInput buildGoogleCloudDialogflowV2AudioInput() { |
| final o = api.GoogleCloudDialogflowV2AudioInput(); |
| buildCounterGoogleCloudDialogflowV2AudioInput++; |
| if (buildCounterGoogleCloudDialogflowV2AudioInput < 3) { |
| o.audio = 'foo'; |
| o.config = buildGoogleCloudDialogflowV2InputAudioConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2AudioInput--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AudioInput( |
| api.GoogleCloudDialogflowV2AudioInput o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AudioInput++; |
| if (buildCounterGoogleCloudDialogflowV2AudioInput < 3) { |
| unittest.expect(o.audio!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2InputAudioConfig(o.config!); |
| } |
| buildCounterGoogleCloudDialogflowV2AudioInput--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AutomatedAgentConfig = 0; |
| api.GoogleCloudDialogflowV2AutomatedAgentConfig |
| buildGoogleCloudDialogflowV2AutomatedAgentConfig() { |
| final o = api.GoogleCloudDialogflowV2AutomatedAgentConfig(); |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentConfig++; |
| if (buildCounterGoogleCloudDialogflowV2AutomatedAgentConfig < 3) { |
| o.agent = 'foo'; |
| o.sessionTtl = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AutomatedAgentConfig( |
| api.GoogleCloudDialogflowV2AutomatedAgentConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentConfig++; |
| if (buildCounterGoogleCloudDialogflowV2AutomatedAgentConfig < 3) { |
| unittest.expect(o.agent!, unittest.equals('foo')); |
| unittest.expect(o.sessionTtl!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2AutomatedAgentReply = 0; |
| api.GoogleCloudDialogflowV2AutomatedAgentReply |
| buildGoogleCloudDialogflowV2AutomatedAgentReply() { |
| final o = api.GoogleCloudDialogflowV2AutomatedAgentReply(); |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentReply++; |
| if (buildCounterGoogleCloudDialogflowV2AutomatedAgentReply < 3) { |
| o.allowCancellation = true; |
| o.automatedAgentReplyType = 'foo'; |
| o.cxCurrentPage = 'foo'; |
| o.detectIntentResponse = buildGoogleCloudDialogflowV2DetectIntentResponse(); |
| } |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentReply--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2AutomatedAgentReply( |
| api.GoogleCloudDialogflowV2AutomatedAgentReply o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentReply++; |
| if (buildCounterGoogleCloudDialogflowV2AutomatedAgentReply < 3) { |
| unittest.expect(o.allowCancellation!, unittest.isTrue); |
| unittest.expect(o.automatedAgentReplyType!, unittest.equals('foo')); |
| unittest.expect(o.cxCurrentPage!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2DetectIntentResponse(o.detectIntentResponse!); |
| } |
| buildCounterGoogleCloudDialogflowV2AutomatedAgentReply--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> buildUnnamed17() => [ |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| ]; |
| |
| void checkUnnamed17(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[0]); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2BatchCreateEntitiesRequest = 0; |
| api.GoogleCloudDialogflowV2BatchCreateEntitiesRequest |
| buildGoogleCloudDialogflowV2BatchCreateEntitiesRequest() { |
| final o = api.GoogleCloudDialogflowV2BatchCreateEntitiesRequest(); |
| buildCounterGoogleCloudDialogflowV2BatchCreateEntitiesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchCreateEntitiesRequest < 3) { |
| o.entities = buildUnnamed17(); |
| o.languageCode = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2BatchCreateEntitiesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2BatchCreateEntitiesRequest( |
| api.GoogleCloudDialogflowV2BatchCreateEntitiesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2BatchCreateEntitiesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchCreateEntitiesRequest < 3) { |
| checkUnnamed17(o.entities!); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchCreateEntitiesRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed18() => ['foo', 'foo']; |
| |
| void checkUnnamed18(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2BatchDeleteEntitiesRequest = 0; |
| api.GoogleCloudDialogflowV2BatchDeleteEntitiesRequest |
| buildGoogleCloudDialogflowV2BatchDeleteEntitiesRequest() { |
| final o = api.GoogleCloudDialogflowV2BatchDeleteEntitiesRequest(); |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntitiesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchDeleteEntitiesRequest < 3) { |
| o.entityValues = buildUnnamed18(); |
| o.languageCode = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntitiesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2BatchDeleteEntitiesRequest( |
| api.GoogleCloudDialogflowV2BatchDeleteEntitiesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntitiesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchDeleteEntitiesRequest < 3) { |
| checkUnnamed18(o.entityValues!); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntitiesRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed19() => ['foo', 'foo']; |
| |
| void checkUnnamed19(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest = 0; |
| api.GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest |
| buildGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest() { |
| final o = api.GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest(); |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest < 3) { |
| o.entityTypeNames = buildUnnamed19(); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest( |
| api.GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest < 3) { |
| checkUnnamed19(o.entityTypeNames!); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Intent> buildUnnamed20() => [ |
| buildGoogleCloudDialogflowV2Intent(), |
| buildGoogleCloudDialogflowV2Intent(), |
| ]; |
| |
| void checkUnnamed20(core.List<api.GoogleCloudDialogflowV2Intent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Intent(o[0]); |
| checkGoogleCloudDialogflowV2Intent(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2BatchDeleteIntentsRequest = 0; |
| api.GoogleCloudDialogflowV2BatchDeleteIntentsRequest |
| buildGoogleCloudDialogflowV2BatchDeleteIntentsRequest() { |
| final o = api.GoogleCloudDialogflowV2BatchDeleteIntentsRequest(); |
| buildCounterGoogleCloudDialogflowV2BatchDeleteIntentsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchDeleteIntentsRequest < 3) { |
| o.intents = buildUnnamed20(); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchDeleteIntentsRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2BatchDeleteIntentsRequest( |
| api.GoogleCloudDialogflowV2BatchDeleteIntentsRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2BatchDeleteIntentsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchDeleteIntentsRequest < 3) { |
| checkUnnamed20(o.intents!); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchDeleteIntentsRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> buildUnnamed21() => [ |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| ]; |
| |
| void checkUnnamed21(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[0]); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2BatchUpdateEntitiesRequest = 0; |
| api.GoogleCloudDialogflowV2BatchUpdateEntitiesRequest |
| buildGoogleCloudDialogflowV2BatchUpdateEntitiesRequest() { |
| final o = api.GoogleCloudDialogflowV2BatchUpdateEntitiesRequest(); |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntitiesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntitiesRequest < 3) { |
| o.entities = buildUnnamed21(); |
| o.languageCode = 'foo'; |
| o.updateMask = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntitiesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2BatchUpdateEntitiesRequest( |
| api.GoogleCloudDialogflowV2BatchUpdateEntitiesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntitiesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntitiesRequest < 3) { |
| checkUnnamed21(o.entities!); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.updateMask!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntitiesRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest = 0; |
| api.GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest |
| buildGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest() { |
| final o = api.GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest(); |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest < 3) { |
| o.entityTypeBatchInline = buildGoogleCloudDialogflowV2EntityTypeBatch(); |
| o.entityTypeBatchUri = 'foo'; |
| o.languageCode = 'foo'; |
| o.updateMask = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest( |
| api.GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest < 3) { |
| checkGoogleCloudDialogflowV2EntityTypeBatch(o.entityTypeBatchInline!); |
| unittest.expect(o.entityTypeBatchUri!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.updateMask!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsRequest = 0; |
| api.GoogleCloudDialogflowV2BatchUpdateIntentsRequest |
| buildGoogleCloudDialogflowV2BatchUpdateIntentsRequest() { |
| final o = api.GoogleCloudDialogflowV2BatchUpdateIntentsRequest(); |
| buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsRequest < 3) { |
| o.intentBatchInline = buildGoogleCloudDialogflowV2IntentBatch(); |
| o.intentBatchUri = 'foo'; |
| o.intentView = 'foo'; |
| o.languageCode = 'foo'; |
| o.updateMask = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2BatchUpdateIntentsRequest( |
| api.GoogleCloudDialogflowV2BatchUpdateIntentsRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsRequest < 3) { |
| checkGoogleCloudDialogflowV2IntentBatch(o.intentBatchInline!); |
| unittest.expect(o.intentBatchUri!, unittest.equals('foo')); |
| unittest.expect(o.intentView!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.updateMask!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2BatchUpdateIntentsRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2CesAppSpec = 0; |
| api.GoogleCloudDialogflowV2CesAppSpec buildGoogleCloudDialogflowV2CesAppSpec() { |
| final o = api.GoogleCloudDialogflowV2CesAppSpec(); |
| buildCounterGoogleCloudDialogflowV2CesAppSpec++; |
| if (buildCounterGoogleCloudDialogflowV2CesAppSpec < 3) { |
| o.cesApp = 'foo'; |
| o.confirmationRequirement = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2CesAppSpec--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2CesAppSpec( |
| api.GoogleCloudDialogflowV2CesAppSpec o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2CesAppSpec++; |
| if (buildCounterGoogleCloudDialogflowV2CesAppSpec < 3) { |
| unittest.expect(o.cesApp!, unittest.equals('foo')); |
| unittest.expect(o.confirmationRequirement!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2CesAppSpec--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2CesToolSpec = 0; |
| api.GoogleCloudDialogflowV2CesToolSpec |
| buildGoogleCloudDialogflowV2CesToolSpec() { |
| final o = api.GoogleCloudDialogflowV2CesToolSpec(); |
| buildCounterGoogleCloudDialogflowV2CesToolSpec++; |
| if (buildCounterGoogleCloudDialogflowV2CesToolSpec < 3) { |
| o.cesTool = 'foo'; |
| o.confirmationRequirement = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2CesToolSpec--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2CesToolSpec( |
| api.GoogleCloudDialogflowV2CesToolSpec o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2CesToolSpec++; |
| if (buildCounterGoogleCloudDialogflowV2CesToolSpec < 3) { |
| unittest.expect(o.cesTool!, unittest.equals('foo')); |
| unittest.expect(o.confirmationRequirement!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2CesToolSpec--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest = 0; |
| api.GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest |
| buildGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest() { |
| final o = api.GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest(); |
| buildCounterGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest < |
| 3) { |
| o.participantRole = 'foo'; |
| o.suggestionFeatureType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest( |
| api.GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest < |
| 3) { |
| unittest.expect(o.participantRole!, unittest.equals('foo')); |
| unittest.expect(o.suggestionFeatureType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2CompleteConversationRequest = 0; |
| api.GoogleCloudDialogflowV2CompleteConversationRequest |
| buildGoogleCloudDialogflowV2CompleteConversationRequest() { |
| final o = api.GoogleCloudDialogflowV2CompleteConversationRequest(); |
| buildCounterGoogleCloudDialogflowV2CompleteConversationRequest++; |
| if (buildCounterGoogleCloudDialogflowV2CompleteConversationRequest < 3) {} |
| buildCounterGoogleCloudDialogflowV2CompleteConversationRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2CompleteConversationRequest( |
| api.GoogleCloudDialogflowV2CompleteConversationRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2CompleteConversationRequest++; |
| if (buildCounterGoogleCloudDialogflowV2CompleteConversationRequest < 3) {} |
| buildCounterGoogleCloudDialogflowV2CompleteConversationRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Connection = 0; |
| api.GoogleCloudDialogflowV2Connection buildGoogleCloudDialogflowV2Connection() { |
| final o = api.GoogleCloudDialogflowV2Connection(); |
| buildCounterGoogleCloudDialogflowV2Connection++; |
| if (buildCounterGoogleCloudDialogflowV2Connection < 3) { |
| o.connectionId = 'foo'; |
| o.errorDetails = buildGoogleCloudDialogflowV2ConnectionErrorDetails(); |
| o.state = 'foo'; |
| o.updateTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Connection--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Connection( |
| api.GoogleCloudDialogflowV2Connection o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Connection++; |
| if (buildCounterGoogleCloudDialogflowV2Connection < 3) { |
| unittest.expect(o.connectionId!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ConnectionErrorDetails(o.errorDetails!); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| unittest.expect(o.updateTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Connection--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConnectionErrorDetails = 0; |
| api.GoogleCloudDialogflowV2ConnectionErrorDetails |
| buildGoogleCloudDialogflowV2ConnectionErrorDetails() { |
| final o = api.GoogleCloudDialogflowV2ConnectionErrorDetails(); |
| buildCounterGoogleCloudDialogflowV2ConnectionErrorDetails++; |
| if (buildCounterGoogleCloudDialogflowV2ConnectionErrorDetails < 3) { |
| o.certificateState = 'foo'; |
| o.errorMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConnectionErrorDetails--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConnectionErrorDetails( |
| api.GoogleCloudDialogflowV2ConnectionErrorDetails o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConnectionErrorDetails++; |
| if (buildCounterGoogleCloudDialogflowV2ConnectionErrorDetails < 3) { |
| unittest.expect(o.certificateState!, unittest.equals('foo')); |
| unittest.expect(o.errorMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConnectionErrorDetails--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed22() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed22(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted4 = (o['x']!) as core.Map; |
| unittest.expect(casted4, unittest.hasLength(3)); |
| unittest.expect(casted4['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted4['bool'], unittest.equals(true)); |
| unittest.expect(casted4['string'], unittest.equals('foo')); |
| var casted5 = (o['y']!) as core.Map; |
| unittest.expect(casted5, unittest.hasLength(3)); |
| unittest.expect(casted5['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted5['bool'], unittest.equals(true)); |
| unittest.expect(casted5['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Context = 0; |
| api.GoogleCloudDialogflowV2Context buildGoogleCloudDialogflowV2Context() { |
| final o = api.GoogleCloudDialogflowV2Context(); |
| buildCounterGoogleCloudDialogflowV2Context++; |
| if (buildCounterGoogleCloudDialogflowV2Context < 3) { |
| o.lifespanCount = 42; |
| o.name = 'foo'; |
| o.parameters = buildUnnamed22(); |
| } |
| buildCounterGoogleCloudDialogflowV2Context--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Context(api.GoogleCloudDialogflowV2Context o) { |
| buildCounterGoogleCloudDialogflowV2Context++; |
| if (buildCounterGoogleCloudDialogflowV2Context < 3) { |
| unittest.expect(o.lifespanCount!, unittest.equals(42)); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed22(o.parameters!); |
| } |
| buildCounterGoogleCloudDialogflowV2Context--; |
| } |
| |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| buildUnnamed23() => { |
| 'x': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| 'y': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| }; |
| |
| void checkUnnamed23( |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['x']!); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['y']!); |
| } |
| |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationGeneratorContext> |
| buildUnnamed24() => { |
| 'x': buildGoogleCloudDialogflowV2ConversationGeneratorContext(), |
| 'y': buildGoogleCloudDialogflowV2ConversationGeneratorContext(), |
| }; |
| |
| void checkUnnamed24( |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationGeneratorContext> |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationGeneratorContext(o['x']!); |
| checkGoogleCloudDialogflowV2ConversationGeneratorContext(o['y']!); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Conversation = 0; |
| api.GoogleCloudDialogflowV2Conversation |
| buildGoogleCloudDialogflowV2Conversation() { |
| final o = api.GoogleCloudDialogflowV2Conversation(); |
| buildCounterGoogleCloudDialogflowV2Conversation++; |
| if (buildCounterGoogleCloudDialogflowV2Conversation < 3) { |
| o.conversationProfile = 'foo'; |
| o.conversationStage = 'foo'; |
| o.endTime = 'foo'; |
| o.ingestedContextReferences = buildUnnamed23(); |
| o.initialConversationProfile = |
| buildGoogleCloudDialogflowV2ConversationProfile(); |
| o.initialGeneratorContexts = buildUnnamed24(); |
| o.lifecycleState = 'foo'; |
| o.name = 'foo'; |
| o.phoneNumber = buildGoogleCloudDialogflowV2ConversationPhoneNumber(); |
| o.startTime = 'foo'; |
| o.telephonyConnectionInfo = |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo(); |
| } |
| buildCounterGoogleCloudDialogflowV2Conversation--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Conversation( |
| api.GoogleCloudDialogflowV2Conversation o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Conversation++; |
| if (buildCounterGoogleCloudDialogflowV2Conversation < 3) { |
| unittest.expect(o.conversationProfile!, unittest.equals('foo')); |
| unittest.expect(o.conversationStage!, unittest.equals('foo')); |
| unittest.expect(o.endTime!, unittest.equals('foo')); |
| checkUnnamed23(o.ingestedContextReferences!); |
| checkGoogleCloudDialogflowV2ConversationProfile( |
| o.initialConversationProfile!, |
| ); |
| checkUnnamed24(o.initialGeneratorContexts!); |
| unittest.expect(o.lifecycleState!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ConversationPhoneNumber(o.phoneNumber!); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo( |
| o.telephonyConnectionInfo!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2Conversation--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2MessageEntry> buildUnnamed25() => [ |
| buildGoogleCloudDialogflowV2MessageEntry(), |
| buildGoogleCloudDialogflowV2MessageEntry(), |
| ]; |
| |
| void checkUnnamed25(core.List<api.GoogleCloudDialogflowV2MessageEntry> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2MessageEntry(o[0]); |
| checkGoogleCloudDialogflowV2MessageEntry(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationContext = 0; |
| api.GoogleCloudDialogflowV2ConversationContext |
| buildGoogleCloudDialogflowV2ConversationContext() { |
| final o = api.GoogleCloudDialogflowV2ConversationContext(); |
| buildCounterGoogleCloudDialogflowV2ConversationContext++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationContext < 3) { |
| o.messageEntries = buildUnnamed25(); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationContext--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationContext( |
| api.GoogleCloudDialogflowV2ConversationContext o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationContext++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationContext < 3) { |
| checkUnnamed25(o.messageEntries!); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationContext--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ConversationContextReferenceContextContent> |
| buildUnnamed26() => [ |
| buildGoogleCloudDialogflowV2ConversationContextReferenceContextContent(), |
| buildGoogleCloudDialogflowV2ConversationContextReferenceContextContent(), |
| ]; |
| |
| void checkUnnamed26( |
| core.List< |
| api.GoogleCloudDialogflowV2ConversationContextReferenceContextContent |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationContextReferenceContextContent(o[0]); |
| checkGoogleCloudDialogflowV2ConversationContextReferenceContextContent(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationContextReference = 0; |
| api.GoogleCloudDialogflowV2ConversationContextReference |
| buildGoogleCloudDialogflowV2ConversationContextReference() { |
| final o = api.GoogleCloudDialogflowV2ConversationContextReference(); |
| buildCounterGoogleCloudDialogflowV2ConversationContextReference++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationContextReference < 3) { |
| o.contextContents = buildUnnamed26(); |
| o.createTime = 'foo'; |
| o.languageCode = 'foo'; |
| o.updateMode = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationContextReference--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationContextReference( |
| api.GoogleCloudDialogflowV2ConversationContextReference o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationContextReference++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationContextReference < 3) { |
| checkUnnamed26(o.contextContents!); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.updateMode!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationContextReference--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ConversationContextReferenceContextContent = |
| 0; |
| api.GoogleCloudDialogflowV2ConversationContextReferenceContextContent |
| buildGoogleCloudDialogflowV2ConversationContextReferenceContextContent() { |
| final o = |
| api.GoogleCloudDialogflowV2ConversationContextReferenceContextContent(); |
| buildCounterGoogleCloudDialogflowV2ConversationContextReferenceContextContent++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationContextReferenceContextContent < |
| 3) { |
| o.answerRecord = 'foo'; |
| o.content = 'foo'; |
| o.contentFormat = 'foo'; |
| o.ingestionTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationContextReferenceContextContent--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationContextReferenceContextContent( |
| api.GoogleCloudDialogflowV2ConversationContextReferenceContextContent o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationContextReferenceContextContent++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationContextReferenceContextContent < |
| 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.content!, unittest.equals('foo')); |
| unittest.expect(o.contentFormat!, unittest.equals('foo')); |
| unittest.expect(o.ingestionTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationContextReferenceContextContent--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationDataset = 0; |
| api.GoogleCloudDialogflowV2ConversationDataset |
| buildGoogleCloudDialogflowV2ConversationDataset() { |
| final o = api.GoogleCloudDialogflowV2ConversationDataset(); |
| buildCounterGoogleCloudDialogflowV2ConversationDataset++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationDataset < 3) { |
| o.conversationCount = 'foo'; |
| o.conversationInfo = buildGoogleCloudDialogflowV2ConversationInfo(); |
| o.createTime = 'foo'; |
| o.description = 'foo'; |
| o.displayName = 'foo'; |
| o.inputConfig = buildGoogleCloudDialogflowV2InputConfig(); |
| o.name = 'foo'; |
| o.satisfiesPzi = true; |
| o.satisfiesPzs = true; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationDataset--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationDataset( |
| api.GoogleCloudDialogflowV2ConversationDataset o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationDataset++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationDataset < 3) { |
| unittest.expect(o.conversationCount!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ConversationInfo(o.conversationInfo!); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2InputConfig(o.inputConfig!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.satisfiesPzi!, unittest.isTrue); |
| unittest.expect(o.satisfiesPzs!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationDataset--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationGeneratorContext = 0; |
| api.GoogleCloudDialogflowV2ConversationGeneratorContext |
| buildGoogleCloudDialogflowV2ConversationGeneratorContext() { |
| final o = api.GoogleCloudDialogflowV2ConversationGeneratorContext(); |
| buildCounterGoogleCloudDialogflowV2ConversationGeneratorContext++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationGeneratorContext < 3) { |
| o.generatorType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationGeneratorContext--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationGeneratorContext( |
| api.GoogleCloudDialogflowV2ConversationGeneratorContext o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationGeneratorContext++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationGeneratorContext < 3) { |
| unittest.expect(o.generatorType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationGeneratorContext--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationInfo = 0; |
| api.GoogleCloudDialogflowV2ConversationInfo |
| buildGoogleCloudDialogflowV2ConversationInfo() { |
| final o = api.GoogleCloudDialogflowV2ConversationInfo(); |
| buildCounterGoogleCloudDialogflowV2ConversationInfo++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationInfo < 3) { |
| o.languageCode = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationInfo( |
| api.GoogleCloudDialogflowV2ConversationInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationInfo++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationInfo < 3) { |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationInfo--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2InputDataset> buildUnnamed27() => [ |
| buildGoogleCloudDialogflowV2InputDataset(), |
| buildGoogleCloudDialogflowV2InputDataset(), |
| ]; |
| |
| void checkUnnamed27(core.List<api.GoogleCloudDialogflowV2InputDataset> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2InputDataset(o[0]); |
| checkGoogleCloudDialogflowV2InputDataset(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationModel = 0; |
| api.GoogleCloudDialogflowV2ConversationModel |
| buildGoogleCloudDialogflowV2ConversationModel() { |
| final o = api.GoogleCloudDialogflowV2ConversationModel(); |
| buildCounterGoogleCloudDialogflowV2ConversationModel++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationModel < 3) { |
| o.articleSuggestionModelMetadata = |
| buildGoogleCloudDialogflowV2ArticleSuggestionModelMetadata(); |
| o.createTime = 'foo'; |
| o.datasets = buildUnnamed27(); |
| o.displayName = 'foo'; |
| o.languageCode = 'foo'; |
| o.name = 'foo'; |
| o.satisfiesPzi = true; |
| o.satisfiesPzs = true; |
| o.smartReplyModelMetadata = |
| buildGoogleCloudDialogflowV2SmartReplyModelMetadata(); |
| o.state = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationModel--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationModel( |
| api.GoogleCloudDialogflowV2ConversationModel o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationModel++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationModel < 3) { |
| checkGoogleCloudDialogflowV2ArticleSuggestionModelMetadata( |
| o.articleSuggestionModelMetadata!, |
| ); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| checkUnnamed27(o.datasets!); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.satisfiesPzi!, unittest.isTrue); |
| unittest.expect(o.satisfiesPzs!, unittest.isTrue); |
| checkGoogleCloudDialogflowV2SmartReplyModelMetadata( |
| o.smartReplyModelMetadata!, |
| ); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationModel--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationModelEvaluation = 0; |
| api.GoogleCloudDialogflowV2ConversationModelEvaluation |
| buildGoogleCloudDialogflowV2ConversationModelEvaluation() { |
| final o = api.GoogleCloudDialogflowV2ConversationModelEvaluation(); |
| buildCounterGoogleCloudDialogflowV2ConversationModelEvaluation++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationModelEvaluation < 3) { |
| o.createTime = 'foo'; |
| o.displayName = 'foo'; |
| o.evaluationConfig = buildGoogleCloudDialogflowV2EvaluationConfig(); |
| o.name = 'foo'; |
| o.rawHumanEvalTemplateCsv = 'foo'; |
| o.smartReplyMetrics = buildGoogleCloudDialogflowV2SmartReplyMetrics(); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationModelEvaluation--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationModelEvaluation( |
| api.GoogleCloudDialogflowV2ConversationModelEvaluation o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationModelEvaluation++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationModelEvaluation < 3) { |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2EvaluationConfig(o.evaluationConfig!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.rawHumanEvalTemplateCsv!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SmartReplyMetrics(o.smartReplyMetrics!); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationModelEvaluation--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationPhoneNumber = 0; |
| api.GoogleCloudDialogflowV2ConversationPhoneNumber |
| buildGoogleCloudDialogflowV2ConversationPhoneNumber() { |
| final o = api.GoogleCloudDialogflowV2ConversationPhoneNumber(); |
| buildCounterGoogleCloudDialogflowV2ConversationPhoneNumber++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationPhoneNumber < 3) { |
| o.countryCode = 42; |
| o.phoneNumber = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationPhoneNumber--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationPhoneNumber( |
| api.GoogleCloudDialogflowV2ConversationPhoneNumber o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationPhoneNumber++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationPhoneNumber < 3) { |
| unittest.expect(o.countryCode!, unittest.equals(42)); |
| unittest.expect(o.phoneNumber!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationPhoneNumber--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ConversationProfile = 0; |
| api.GoogleCloudDialogflowV2ConversationProfile |
| buildGoogleCloudDialogflowV2ConversationProfile() { |
| final o = api.GoogleCloudDialogflowV2ConversationProfile(); |
| buildCounterGoogleCloudDialogflowV2ConversationProfile++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationProfile < 3) { |
| o.automatedAgentConfig = buildGoogleCloudDialogflowV2AutomatedAgentConfig(); |
| o.createTime = 'foo'; |
| o.displayName = 'foo'; |
| o.humanAgentAssistantConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfig(); |
| o.humanAgentHandoffConfig = |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfig(); |
| o.languageCode = 'foo'; |
| o.loggingConfig = buildGoogleCloudDialogflowV2LoggingConfig(); |
| o.name = 'foo'; |
| o.newMessageEventNotificationConfig = |
| buildGoogleCloudDialogflowV2NotificationConfig(); |
| o.newRecognitionResultNotificationConfig = |
| buildGoogleCloudDialogflowV2NotificationConfig(); |
| o.notificationConfig = buildGoogleCloudDialogflowV2NotificationConfig(); |
| o.securitySettings = 'foo'; |
| o.sttConfig = buildGoogleCloudDialogflowV2SpeechToTextConfig(); |
| o.timeZone = 'foo'; |
| o.ttsConfig = buildGoogleCloudDialogflowV2SynthesizeSpeechConfig(); |
| o.updateTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationProfile--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationProfile( |
| api.GoogleCloudDialogflowV2ConversationProfile o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationProfile++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationProfile < 3) { |
| checkGoogleCloudDialogflowV2AutomatedAgentConfig(o.automatedAgentConfig!); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfig( |
| o.humanAgentAssistantConfig!, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentHandoffConfig( |
| o.humanAgentHandoffConfig!, |
| ); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2LoggingConfig(o.loggingConfig!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2NotificationConfig( |
| o.newMessageEventNotificationConfig!, |
| ); |
| checkGoogleCloudDialogflowV2NotificationConfig( |
| o.newRecognitionResultNotificationConfig!, |
| ); |
| checkGoogleCloudDialogflowV2NotificationConfig(o.notificationConfig!); |
| unittest.expect(o.securitySettings!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SpeechToTextConfig(o.sttConfig!); |
| unittest.expect(o.timeZone!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SynthesizeSpeechConfig(o.ttsConfig!); |
| unittest.expect(o.updateTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationProfile--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent |
| > |
| buildUnnamed28() => [ |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent(), |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent(), |
| ]; |
| |
| void checkUnnamed28( |
| core.List< |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent( |
| o[1], |
| ); |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader |
| > |
| buildUnnamed29() => [ |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader(), |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader(), |
| ]; |
| |
| void checkUnnamed29( |
| core.List< |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo = 0; |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfo |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo() { |
| final o = api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfo(); |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo < |
| 3) { |
| o.dialedNumber = 'foo'; |
| o.extraMimeContents = buildUnnamed28(); |
| o.sdp = 'foo'; |
| o.sipHeaders = buildUnnamed29(); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo( |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo < |
| 3) { |
| unittest.expect(o.dialedNumber!, unittest.equals('foo')); |
| checkUnnamed28(o.extraMimeContents!); |
| unittest.expect(o.sdp!, unittest.equals('foo')); |
| checkUnnamed29(o.sipHeaders!); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent = |
| 0; |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent() { |
| final o = |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent(); |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent < |
| 3) { |
| o.content = 'foo'; |
| o.mimeType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent( |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent < |
| 3) { |
| unittest.expect(o.content!, unittest.equals('foo')); |
| unittest.expect(o.mimeType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader = |
| 0; |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader() { |
| final o = |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader(); |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader < |
| 3) { |
| o.name = 'foo'; |
| o.value = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader( |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader++; |
| if (buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader < |
| 3) { |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.value!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest = 0; |
| api.GoogleCloudDialogflowV2CreateConversationModelEvaluationRequest |
| buildGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest() { |
| final o = |
| api.GoogleCloudDialogflowV2CreateConversationModelEvaluationRequest(); |
| buildCounterGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest++; |
| if (buildCounterGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest < |
| 3) { |
| o.conversationModelEvaluation = |
| buildGoogleCloudDialogflowV2ConversationModelEvaluation(); |
| } |
| buildCounterGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest( |
| api.GoogleCloudDialogflowV2CreateConversationModelEvaluationRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest++; |
| if (buildCounterGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest < |
| 3) { |
| checkGoogleCloudDialogflowV2ConversationModelEvaluation( |
| o.conversationModelEvaluation!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2CustomPronunciationParams = 0; |
| api.GoogleCloudDialogflowV2CustomPronunciationParams |
| buildGoogleCloudDialogflowV2CustomPronunciationParams() { |
| final o = api.GoogleCloudDialogflowV2CustomPronunciationParams(); |
| buildCounterGoogleCloudDialogflowV2CustomPronunciationParams++; |
| if (buildCounterGoogleCloudDialogflowV2CustomPronunciationParams < 3) { |
| o.phoneticEncoding = 'foo'; |
| o.phrase = 'foo'; |
| o.pronunciation = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2CustomPronunciationParams--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2CustomPronunciationParams( |
| api.GoogleCloudDialogflowV2CustomPronunciationParams o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2CustomPronunciationParams++; |
| if (buildCounterGoogleCloudDialogflowV2CustomPronunciationParams < 3) { |
| unittest.expect(o.phoneticEncoding!, unittest.equals('foo')); |
| unittest.expect(o.phrase!, unittest.equals('foo')); |
| unittest.expect(o.pronunciation!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2CustomPronunciationParams--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2DeployConversationModelRequest = 0; |
| api.GoogleCloudDialogflowV2DeployConversationModelRequest |
| buildGoogleCloudDialogflowV2DeployConversationModelRequest() { |
| final o = api.GoogleCloudDialogflowV2DeployConversationModelRequest(); |
| buildCounterGoogleCloudDialogflowV2DeployConversationModelRequest++; |
| if (buildCounterGoogleCloudDialogflowV2DeployConversationModelRequest < 3) {} |
| buildCounterGoogleCloudDialogflowV2DeployConversationModelRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2DeployConversationModelRequest( |
| api.GoogleCloudDialogflowV2DeployConversationModelRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2DeployConversationModelRequest++; |
| if (buildCounterGoogleCloudDialogflowV2DeployConversationModelRequest < 3) {} |
| buildCounterGoogleCloudDialogflowV2DeployConversationModelRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2DetectIntentRequest = 0; |
| api.GoogleCloudDialogflowV2DetectIntentRequest |
| buildGoogleCloudDialogflowV2DetectIntentRequest() { |
| final o = api.GoogleCloudDialogflowV2DetectIntentRequest(); |
| buildCounterGoogleCloudDialogflowV2DetectIntentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2DetectIntentRequest < 3) { |
| o.inputAudio = 'foo'; |
| o.outputAudioConfig = buildGoogleCloudDialogflowV2OutputAudioConfig(); |
| o.outputAudioConfigMask = 'foo'; |
| o.queryInput = buildGoogleCloudDialogflowV2QueryInput(); |
| o.queryParams = buildGoogleCloudDialogflowV2QueryParameters(); |
| } |
| buildCounterGoogleCloudDialogflowV2DetectIntentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2DetectIntentRequest( |
| api.GoogleCloudDialogflowV2DetectIntentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2DetectIntentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2DetectIntentRequest < 3) { |
| unittest.expect(o.inputAudio!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2OutputAudioConfig(o.outputAudioConfig!); |
| unittest.expect(o.outputAudioConfigMask!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2QueryInput(o.queryInput!); |
| checkGoogleCloudDialogflowV2QueryParameters(o.queryParams!); |
| } |
| buildCounterGoogleCloudDialogflowV2DetectIntentRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2DetectIntentResponse = 0; |
| api.GoogleCloudDialogflowV2DetectIntentResponse |
| buildGoogleCloudDialogflowV2DetectIntentResponse() { |
| final o = api.GoogleCloudDialogflowV2DetectIntentResponse(); |
| buildCounterGoogleCloudDialogflowV2DetectIntentResponse++; |
| if (buildCounterGoogleCloudDialogflowV2DetectIntentResponse < 3) { |
| o.outputAudio = 'foo'; |
| o.outputAudioConfig = buildGoogleCloudDialogflowV2OutputAudioConfig(); |
| o.queryResult = buildGoogleCloudDialogflowV2QueryResult(); |
| o.responseId = 'foo'; |
| o.webhookStatus = buildGoogleRpcStatus(); |
| } |
| buildCounterGoogleCloudDialogflowV2DetectIntentResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2DetectIntentResponse( |
| api.GoogleCloudDialogflowV2DetectIntentResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2DetectIntentResponse++; |
| if (buildCounterGoogleCloudDialogflowV2DetectIntentResponse < 3) { |
| unittest.expect(o.outputAudio!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2OutputAudioConfig(o.outputAudioConfig!); |
| checkGoogleCloudDialogflowV2QueryResult(o.queryResult!); |
| unittest.expect(o.responseId!, unittest.equals('foo')); |
| checkGoogleRpcStatus(o.webhookStatus!); |
| } |
| buildCounterGoogleCloudDialogflowV2DetectIntentResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2DialogflowAssistAnswer = 0; |
| api.GoogleCloudDialogflowV2DialogflowAssistAnswer |
| buildGoogleCloudDialogflowV2DialogflowAssistAnswer() { |
| final o = api.GoogleCloudDialogflowV2DialogflowAssistAnswer(); |
| buildCounterGoogleCloudDialogflowV2DialogflowAssistAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2DialogflowAssistAnswer < 3) { |
| o.answerRecord = 'foo'; |
| o.intentSuggestion = buildGoogleCloudDialogflowV2IntentSuggestion(); |
| o.queryResult = buildGoogleCloudDialogflowV2QueryResult(); |
| } |
| buildCounterGoogleCloudDialogflowV2DialogflowAssistAnswer--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2DialogflowAssistAnswer( |
| api.GoogleCloudDialogflowV2DialogflowAssistAnswer o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2DialogflowAssistAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2DialogflowAssistAnswer < 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IntentSuggestion(o.intentSuggestion!); |
| checkGoogleCloudDialogflowV2QueryResult(o.queryResult!); |
| } |
| buildCounterGoogleCloudDialogflowV2DialogflowAssistAnswer--; |
| } |
| |
| core.List<core.String> buildUnnamed30() => ['foo', 'foo']; |
| |
| void checkUnnamed30(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed31() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed31(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Document = 0; |
| api.GoogleCloudDialogflowV2Document buildGoogleCloudDialogflowV2Document() { |
| final o = api.GoogleCloudDialogflowV2Document(); |
| buildCounterGoogleCloudDialogflowV2Document++; |
| if (buildCounterGoogleCloudDialogflowV2Document < 3) { |
| o.contentUri = 'foo'; |
| o.displayName = 'foo'; |
| o.enableAutoReload = true; |
| o.knowledgeTypes = buildUnnamed30(); |
| o.latestReloadStatus = buildGoogleCloudDialogflowV2DocumentReloadStatus(); |
| o.metadata = buildUnnamed31(); |
| o.mimeType = 'foo'; |
| o.name = 'foo'; |
| o.rawContent = 'foo'; |
| o.state = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Document--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Document( |
| api.GoogleCloudDialogflowV2Document o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Document++; |
| if (buildCounterGoogleCloudDialogflowV2Document < 3) { |
| unittest.expect(o.contentUri!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.enableAutoReload!, unittest.isTrue); |
| checkUnnamed30(o.knowledgeTypes!); |
| checkGoogleCloudDialogflowV2DocumentReloadStatus(o.latestReloadStatus!); |
| checkUnnamed31(o.metadata!); |
| unittest.expect(o.mimeType!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.rawContent!, unittest.equals('foo')); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Document--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2DocumentReloadStatus = 0; |
| api.GoogleCloudDialogflowV2DocumentReloadStatus |
| buildGoogleCloudDialogflowV2DocumentReloadStatus() { |
| final o = api.GoogleCloudDialogflowV2DocumentReloadStatus(); |
| buildCounterGoogleCloudDialogflowV2DocumentReloadStatus++; |
| if (buildCounterGoogleCloudDialogflowV2DocumentReloadStatus < 3) { |
| o.status = buildGoogleRpcStatus(); |
| o.time = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2DocumentReloadStatus--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2DocumentReloadStatus( |
| api.GoogleCloudDialogflowV2DocumentReloadStatus o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2DocumentReloadStatus++; |
| if (buildCounterGoogleCloudDialogflowV2DocumentReloadStatus < 3) { |
| checkGoogleRpcStatus(o.status!); |
| unittest.expect(o.time!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2DocumentReloadStatus--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2DtmfParameters = 0; |
| api.GoogleCloudDialogflowV2DtmfParameters |
| buildGoogleCloudDialogflowV2DtmfParameters() { |
| final o = api.GoogleCloudDialogflowV2DtmfParameters(); |
| buildCounterGoogleCloudDialogflowV2DtmfParameters++; |
| if (buildCounterGoogleCloudDialogflowV2DtmfParameters < 3) { |
| o.acceptsDtmfInput = true; |
| } |
| buildCounterGoogleCloudDialogflowV2DtmfParameters--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2DtmfParameters( |
| api.GoogleCloudDialogflowV2DtmfParameters o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2DtmfParameters++; |
| if (buildCounterGoogleCloudDialogflowV2DtmfParameters < 3) { |
| unittest.expect(o.acceptsDtmfInput!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2DtmfParameters--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EncryptionSpec = 0; |
| api.GoogleCloudDialogflowV2EncryptionSpec |
| buildGoogleCloudDialogflowV2EncryptionSpec() { |
| final o = api.GoogleCloudDialogflowV2EncryptionSpec(); |
| buildCounterGoogleCloudDialogflowV2EncryptionSpec++; |
| if (buildCounterGoogleCloudDialogflowV2EncryptionSpec < 3) { |
| o.kmsKey = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2EncryptionSpec--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EncryptionSpec( |
| api.GoogleCloudDialogflowV2EncryptionSpec o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EncryptionSpec++; |
| if (buildCounterGoogleCloudDialogflowV2EncryptionSpec < 3) { |
| unittest.expect(o.kmsKey!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2EncryptionSpec--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> buildUnnamed32() => [ |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| ]; |
| |
| void checkUnnamed32(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[0]); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EntityType = 0; |
| api.GoogleCloudDialogflowV2EntityType buildGoogleCloudDialogflowV2EntityType() { |
| final o = api.GoogleCloudDialogflowV2EntityType(); |
| buildCounterGoogleCloudDialogflowV2EntityType++; |
| if (buildCounterGoogleCloudDialogflowV2EntityType < 3) { |
| o.autoExpansionMode = 'foo'; |
| o.displayName = 'foo'; |
| o.enableFuzzyExtraction = true; |
| o.entities = buildUnnamed32(); |
| o.kind = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2EntityType--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EntityType( |
| api.GoogleCloudDialogflowV2EntityType o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EntityType++; |
| if (buildCounterGoogleCloudDialogflowV2EntityType < 3) { |
| unittest.expect(o.autoExpansionMode!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.enableFuzzyExtraction!, unittest.isTrue); |
| checkUnnamed32(o.entities!); |
| unittest.expect(o.kind!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2EntityType--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2EntityType> buildUnnamed33() => [ |
| buildGoogleCloudDialogflowV2EntityType(), |
| buildGoogleCloudDialogflowV2EntityType(), |
| ]; |
| |
| void checkUnnamed33(core.List<api.GoogleCloudDialogflowV2EntityType> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2EntityType(o[0]); |
| checkGoogleCloudDialogflowV2EntityType(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EntityTypeBatch = 0; |
| api.GoogleCloudDialogflowV2EntityTypeBatch |
| buildGoogleCloudDialogflowV2EntityTypeBatch() { |
| final o = api.GoogleCloudDialogflowV2EntityTypeBatch(); |
| buildCounterGoogleCloudDialogflowV2EntityTypeBatch++; |
| if (buildCounterGoogleCloudDialogflowV2EntityTypeBatch < 3) { |
| o.entityTypes = buildUnnamed33(); |
| } |
| buildCounterGoogleCloudDialogflowV2EntityTypeBatch--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EntityTypeBatch( |
| api.GoogleCloudDialogflowV2EntityTypeBatch o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EntityTypeBatch++; |
| if (buildCounterGoogleCloudDialogflowV2EntityTypeBatch < 3) { |
| checkUnnamed33(o.entityTypes!); |
| } |
| buildCounterGoogleCloudDialogflowV2EntityTypeBatch--; |
| } |
| |
| core.List<core.String> buildUnnamed34() => ['foo', 'foo']; |
| |
| void checkUnnamed34(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EntityTypeEntity = 0; |
| api.GoogleCloudDialogflowV2EntityTypeEntity |
| buildGoogleCloudDialogflowV2EntityTypeEntity() { |
| final o = api.GoogleCloudDialogflowV2EntityTypeEntity(); |
| buildCounterGoogleCloudDialogflowV2EntityTypeEntity++; |
| if (buildCounterGoogleCloudDialogflowV2EntityTypeEntity < 3) { |
| o.synonyms = buildUnnamed34(); |
| o.value = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2EntityTypeEntity--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EntityTypeEntity( |
| api.GoogleCloudDialogflowV2EntityTypeEntity o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EntityTypeEntity++; |
| if (buildCounterGoogleCloudDialogflowV2EntityTypeEntity < 3) { |
| checkUnnamed34(o.synonyms!); |
| unittest.expect(o.value!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2EntityTypeEntity--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Environment = 0; |
| api.GoogleCloudDialogflowV2Environment |
| buildGoogleCloudDialogflowV2Environment() { |
| final o = api.GoogleCloudDialogflowV2Environment(); |
| buildCounterGoogleCloudDialogflowV2Environment++; |
| if (buildCounterGoogleCloudDialogflowV2Environment < 3) { |
| o.agentVersion = 'foo'; |
| o.description = 'foo'; |
| o.fulfillment = buildGoogleCloudDialogflowV2Fulfillment(); |
| o.name = 'foo'; |
| o.state = 'foo'; |
| o.textToSpeechSettings = buildGoogleCloudDialogflowV2TextToSpeechSettings(); |
| o.updateTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Environment--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Environment( |
| api.GoogleCloudDialogflowV2Environment o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Environment++; |
| if (buildCounterGoogleCloudDialogflowV2Environment < 3) { |
| unittest.expect(o.agentVersion!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2Fulfillment(o.fulfillment!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2TextToSpeechSettings(o.textToSpeechSettings!); |
| unittest.expect(o.updateTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Environment--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2EnvironmentHistoryEntry> |
| buildUnnamed35() => [ |
| buildGoogleCloudDialogflowV2EnvironmentHistoryEntry(), |
| buildGoogleCloudDialogflowV2EnvironmentHistoryEntry(), |
| ]; |
| |
| void checkUnnamed35( |
| core.List<api.GoogleCloudDialogflowV2EnvironmentHistoryEntry> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2EnvironmentHistoryEntry(o[0]); |
| checkGoogleCloudDialogflowV2EnvironmentHistoryEntry(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EnvironmentHistory = 0; |
| api.GoogleCloudDialogflowV2EnvironmentHistory |
| buildGoogleCloudDialogflowV2EnvironmentHistory() { |
| final o = api.GoogleCloudDialogflowV2EnvironmentHistory(); |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistory++; |
| if (buildCounterGoogleCloudDialogflowV2EnvironmentHistory < 3) { |
| o.entries = buildUnnamed35(); |
| o.nextPageToken = 'foo'; |
| o.parent = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistory--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EnvironmentHistory( |
| api.GoogleCloudDialogflowV2EnvironmentHistory o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistory++; |
| if (buildCounterGoogleCloudDialogflowV2EnvironmentHistory < 3) { |
| checkUnnamed35(o.entries!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| unittest.expect(o.parent!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistory--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EnvironmentHistoryEntry = 0; |
| api.GoogleCloudDialogflowV2EnvironmentHistoryEntry |
| buildGoogleCloudDialogflowV2EnvironmentHistoryEntry() { |
| final o = api.GoogleCloudDialogflowV2EnvironmentHistoryEntry(); |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistoryEntry++; |
| if (buildCounterGoogleCloudDialogflowV2EnvironmentHistoryEntry < 3) { |
| o.agentVersion = 'foo'; |
| o.createTime = 'foo'; |
| o.description = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistoryEntry--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EnvironmentHistoryEntry( |
| api.GoogleCloudDialogflowV2EnvironmentHistoryEntry o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistoryEntry++; |
| if (buildCounterGoogleCloudDialogflowV2EnvironmentHistoryEntry < 3) { |
| unittest.expect(o.agentVersion!, unittest.equals('foo')); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2EnvironmentHistoryEntry--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2InputDataset> buildUnnamed36() => [ |
| buildGoogleCloudDialogflowV2InputDataset(), |
| buildGoogleCloudDialogflowV2InputDataset(), |
| ]; |
| |
| void checkUnnamed36(core.List<api.GoogleCloudDialogflowV2InputDataset> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2InputDataset(o[0]); |
| checkGoogleCloudDialogflowV2InputDataset(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EvaluationConfig = 0; |
| api.GoogleCloudDialogflowV2EvaluationConfig |
| buildGoogleCloudDialogflowV2EvaluationConfig() { |
| final o = api.GoogleCloudDialogflowV2EvaluationConfig(); |
| buildCounterGoogleCloudDialogflowV2EvaluationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationConfig < 3) { |
| o.datasets = buildUnnamed36(); |
| o.smartComposeConfig = |
| buildGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig(); |
| o.smartReplyConfig = |
| buildGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EvaluationConfig( |
| api.GoogleCloudDialogflowV2EvaluationConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EvaluationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationConfig < 3) { |
| checkUnnamed36(o.datasets!); |
| checkGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig( |
| o.smartComposeConfig!, |
| ); |
| checkGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig( |
| o.smartReplyConfig!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig = |
| 0; |
| api.GoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig |
| buildGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig() { |
| final o = api.GoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig(); |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig < |
| 3) { |
| o.allowlistDocument = 'foo'; |
| o.maxResultCount = 42; |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig( |
| api.GoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig < |
| 3) { |
| unittest.expect(o.allowlistDocument!, unittest.equals('foo')); |
| unittest.expect(o.maxResultCount!, unittest.equals(42)); |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig = |
| 0; |
| api.GoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig |
| buildGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig() { |
| final o = api.GoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig(); |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig < 3) { |
| o.allowlistDocument = 'foo'; |
| o.maxResultCount = 42; |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig( |
| api.GoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig < 3) { |
| unittest.expect(o.allowlistDocument!, unittest.equals('foo')); |
| unittest.expect(o.maxResultCount!, unittest.equals(42)); |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EvaluationStatus = 0; |
| api.GoogleCloudDialogflowV2EvaluationStatus |
| buildGoogleCloudDialogflowV2EvaluationStatus() { |
| final o = api.GoogleCloudDialogflowV2EvaluationStatus(); |
| buildCounterGoogleCloudDialogflowV2EvaluationStatus++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationStatus < 3) { |
| o.done = true; |
| o.pipelineStatus = buildGoogleRpcStatus(); |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationStatus--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EvaluationStatus( |
| api.GoogleCloudDialogflowV2EvaluationStatus o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EvaluationStatus++; |
| if (buildCounterGoogleCloudDialogflowV2EvaluationStatus < 3) { |
| unittest.expect(o.done!, unittest.isTrue); |
| checkGoogleRpcStatus(o.pipelineStatus!); |
| } |
| buildCounterGoogleCloudDialogflowV2EvaluationStatus--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed37() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed37(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted6 = (o['x']!) as core.Map; |
| unittest.expect(casted6, unittest.hasLength(3)); |
| unittest.expect(casted6['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted6['bool'], unittest.equals(true)); |
| unittest.expect(casted6['string'], unittest.equals('foo')); |
| var casted7 = (o['y']!) as core.Map; |
| unittest.expect(casted7, unittest.hasLength(3)); |
| unittest.expect(casted7['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted7['bool'], unittest.equals(true)); |
| unittest.expect(casted7['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2EventInput = 0; |
| api.GoogleCloudDialogflowV2EventInput buildGoogleCloudDialogflowV2EventInput() { |
| final o = api.GoogleCloudDialogflowV2EventInput(); |
| buildCounterGoogleCloudDialogflowV2EventInput++; |
| if (buildCounterGoogleCloudDialogflowV2EventInput < 3) { |
| o.languageCode = 'foo'; |
| o.name = 'foo'; |
| o.parameters = buildUnnamed37(); |
| } |
| buildCounterGoogleCloudDialogflowV2EventInput--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2EventInput( |
| api.GoogleCloudDialogflowV2EventInput o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2EventInput++; |
| if (buildCounterGoogleCloudDialogflowV2EventInput < 3) { |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed37(o.parameters!); |
| } |
| buildCounterGoogleCloudDialogflowV2EventInput--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ExportAgentRequest = 0; |
| api.GoogleCloudDialogflowV2ExportAgentRequest |
| buildGoogleCloudDialogflowV2ExportAgentRequest() { |
| final o = api.GoogleCloudDialogflowV2ExportAgentRequest(); |
| buildCounterGoogleCloudDialogflowV2ExportAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ExportAgentRequest < 3) { |
| o.agentUri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ExportAgentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ExportAgentRequest( |
| api.GoogleCloudDialogflowV2ExportAgentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ExportAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ExportAgentRequest < 3) { |
| unittest.expect(o.agentUri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ExportAgentRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ExportDocumentRequest = 0; |
| api.GoogleCloudDialogflowV2ExportDocumentRequest |
| buildGoogleCloudDialogflowV2ExportDocumentRequest() { |
| final o = api.GoogleCloudDialogflowV2ExportDocumentRequest(); |
| buildCounterGoogleCloudDialogflowV2ExportDocumentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ExportDocumentRequest < 3) { |
| o.exportFullContent = true; |
| o.gcsDestination = buildGoogleCloudDialogflowV2GcsDestination(); |
| o.smartMessagingPartialUpdate = true; |
| } |
| buildCounterGoogleCloudDialogflowV2ExportDocumentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ExportDocumentRequest( |
| api.GoogleCloudDialogflowV2ExportDocumentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ExportDocumentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ExportDocumentRequest < 3) { |
| unittest.expect(o.exportFullContent!, unittest.isTrue); |
| checkGoogleCloudDialogflowV2GcsDestination(o.gcsDestination!); |
| unittest.expect(o.smartMessagingPartialUpdate!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2ExportDocumentRequest--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed38() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed38(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2FaqAnswer = 0; |
| api.GoogleCloudDialogflowV2FaqAnswer buildGoogleCloudDialogflowV2FaqAnswer() { |
| final o = api.GoogleCloudDialogflowV2FaqAnswer(); |
| buildCounterGoogleCloudDialogflowV2FaqAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2FaqAnswer < 3) { |
| o.answer = 'foo'; |
| o.answerRecord = 'foo'; |
| o.confidence = 42.0; |
| o.metadata = buildUnnamed38(); |
| o.question = 'foo'; |
| o.source = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2FaqAnswer--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2FaqAnswer( |
| api.GoogleCloudDialogflowV2FaqAnswer o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2FaqAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2FaqAnswer < 3) { |
| unittest.expect(o.answer!, unittest.equals('foo')); |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.confidence!, unittest.equals(42.0)); |
| checkUnnamed38(o.metadata!); |
| unittest.expect(o.question!, unittest.equals('foo')); |
| unittest.expect(o.source!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2FaqAnswer--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed39() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed39(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2FewShotExample = 0; |
| api.GoogleCloudDialogflowV2FewShotExample |
| buildGoogleCloudDialogflowV2FewShotExample() { |
| final o = api.GoogleCloudDialogflowV2FewShotExample(); |
| buildCounterGoogleCloudDialogflowV2FewShotExample++; |
| if (buildCounterGoogleCloudDialogflowV2FewShotExample < 3) { |
| o.conversationContext = buildGoogleCloudDialogflowV2ConversationContext(); |
| o.extraInfo = buildUnnamed39(); |
| o.output = buildGoogleCloudDialogflowV2GeneratorSuggestion(); |
| o.summarizationSectionList = |
| buildGoogleCloudDialogflowV2SummarizationSectionList(); |
| } |
| buildCounterGoogleCloudDialogflowV2FewShotExample--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2FewShotExample( |
| api.GoogleCloudDialogflowV2FewShotExample o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2FewShotExample++; |
| if (buildCounterGoogleCloudDialogflowV2FewShotExample < 3) { |
| checkGoogleCloudDialogflowV2ConversationContext(o.conversationContext!); |
| checkUnnamed39(o.extraInfo!); |
| checkGoogleCloudDialogflowV2GeneratorSuggestion(o.output!); |
| checkGoogleCloudDialogflowV2SummarizationSectionList( |
| o.summarizationSectionList!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2FewShotExample--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2FreeFormContext = 0; |
| api.GoogleCloudDialogflowV2FreeFormContext |
| buildGoogleCloudDialogflowV2FreeFormContext() { |
| final o = api.GoogleCloudDialogflowV2FreeFormContext(); |
| buildCounterGoogleCloudDialogflowV2FreeFormContext++; |
| if (buildCounterGoogleCloudDialogflowV2FreeFormContext < 3) { |
| o.text = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2FreeFormContext--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2FreeFormContext( |
| api.GoogleCloudDialogflowV2FreeFormContext o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2FreeFormContext++; |
| if (buildCounterGoogleCloudDialogflowV2FreeFormContext < 3) { |
| unittest.expect(o.text!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2FreeFormContext--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2FreeFormSuggestion = 0; |
| api.GoogleCloudDialogflowV2FreeFormSuggestion |
| buildGoogleCloudDialogflowV2FreeFormSuggestion() { |
| final o = api.GoogleCloudDialogflowV2FreeFormSuggestion(); |
| buildCounterGoogleCloudDialogflowV2FreeFormSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2FreeFormSuggestion < 3) { |
| o.response = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2FreeFormSuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2FreeFormSuggestion( |
| api.GoogleCloudDialogflowV2FreeFormSuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2FreeFormSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2FreeFormSuggestion < 3) { |
| unittest.expect(o.response!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2FreeFormSuggestion--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2FulfillmentFeature> buildUnnamed40() => [ |
| buildGoogleCloudDialogflowV2FulfillmentFeature(), |
| buildGoogleCloudDialogflowV2FulfillmentFeature(), |
| ]; |
| |
| void checkUnnamed40( |
| core.List<api.GoogleCloudDialogflowV2FulfillmentFeature> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2FulfillmentFeature(o[0]); |
| checkGoogleCloudDialogflowV2FulfillmentFeature(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Fulfillment = 0; |
| api.GoogleCloudDialogflowV2Fulfillment |
| buildGoogleCloudDialogflowV2Fulfillment() { |
| final o = api.GoogleCloudDialogflowV2Fulfillment(); |
| buildCounterGoogleCloudDialogflowV2Fulfillment++; |
| if (buildCounterGoogleCloudDialogflowV2Fulfillment < 3) { |
| o.displayName = 'foo'; |
| o.enabled = true; |
| o.features = buildUnnamed40(); |
| o.genericWebService = |
| buildGoogleCloudDialogflowV2FulfillmentGenericWebService(); |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Fulfillment--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Fulfillment( |
| api.GoogleCloudDialogflowV2Fulfillment o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Fulfillment++; |
| if (buildCounterGoogleCloudDialogflowV2Fulfillment < 3) { |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.enabled!, unittest.isTrue); |
| checkUnnamed40(o.features!); |
| checkGoogleCloudDialogflowV2FulfillmentGenericWebService( |
| o.genericWebService!, |
| ); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Fulfillment--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2FulfillmentFeature = 0; |
| api.GoogleCloudDialogflowV2FulfillmentFeature |
| buildGoogleCloudDialogflowV2FulfillmentFeature() { |
| final o = api.GoogleCloudDialogflowV2FulfillmentFeature(); |
| buildCounterGoogleCloudDialogflowV2FulfillmentFeature++; |
| if (buildCounterGoogleCloudDialogflowV2FulfillmentFeature < 3) { |
| o.type = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2FulfillmentFeature--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2FulfillmentFeature( |
| api.GoogleCloudDialogflowV2FulfillmentFeature o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2FulfillmentFeature++; |
| if (buildCounterGoogleCloudDialogflowV2FulfillmentFeature < 3) { |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2FulfillmentFeature--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed41() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed41(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2FulfillmentGenericWebService = 0; |
| api.GoogleCloudDialogflowV2FulfillmentGenericWebService |
| buildGoogleCloudDialogflowV2FulfillmentGenericWebService() { |
| final o = api.GoogleCloudDialogflowV2FulfillmentGenericWebService(); |
| buildCounterGoogleCloudDialogflowV2FulfillmentGenericWebService++; |
| if (buildCounterGoogleCloudDialogflowV2FulfillmentGenericWebService < 3) { |
| o.isCloudFunction = true; |
| o.password = 'foo'; |
| o.requestHeaders = buildUnnamed41(); |
| o.uri = 'foo'; |
| o.username = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2FulfillmentGenericWebService--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2FulfillmentGenericWebService( |
| api.GoogleCloudDialogflowV2FulfillmentGenericWebService o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2FulfillmentGenericWebService++; |
| if (buildCounterGoogleCloudDialogflowV2FulfillmentGenericWebService < 3) { |
| unittest.expect(o.isCloudFunction!, unittest.isTrue); |
| unittest.expect(o.password!, unittest.equals('foo')); |
| checkUnnamed41(o.requestHeaders!); |
| unittest.expect(o.uri!, unittest.equals('foo')); |
| unittest.expect(o.username!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2FulfillmentGenericWebService--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GcsDestination = 0; |
| api.GoogleCloudDialogflowV2GcsDestination |
| buildGoogleCloudDialogflowV2GcsDestination() { |
| final o = api.GoogleCloudDialogflowV2GcsDestination(); |
| buildCounterGoogleCloudDialogflowV2GcsDestination++; |
| if (buildCounterGoogleCloudDialogflowV2GcsDestination < 3) { |
| o.uri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2GcsDestination--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GcsDestination( |
| api.GoogleCloudDialogflowV2GcsDestination o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GcsDestination++; |
| if (buildCounterGoogleCloudDialogflowV2GcsDestination < 3) { |
| unittest.expect(o.uri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2GcsDestination--; |
| } |
| |
| core.List<core.String> buildUnnamed42() => ['foo', 'foo']; |
| |
| void checkUnnamed42(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GcsSources = 0; |
| api.GoogleCloudDialogflowV2GcsSources buildGoogleCloudDialogflowV2GcsSources() { |
| final o = api.GoogleCloudDialogflowV2GcsSources(); |
| buildCounterGoogleCloudDialogflowV2GcsSources++; |
| if (buildCounterGoogleCloudDialogflowV2GcsSources < 3) { |
| o.uris = buildUnnamed42(); |
| } |
| buildCounterGoogleCloudDialogflowV2GcsSources--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GcsSources( |
| api.GoogleCloudDialogflowV2GcsSources o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GcsSources++; |
| if (buildCounterGoogleCloudDialogflowV2GcsSources < 3) { |
| checkUnnamed42(o.uris!); |
| } |
| buildCounterGoogleCloudDialogflowV2GcsSources--; |
| } |
| |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| buildUnnamed43() => { |
| 'x': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| 'y': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| }; |
| |
| void checkUnnamed43( |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['x']!); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['y']!); |
| } |
| |
| core.List<core.String> buildUnnamed44() => ['foo', 'foo']; |
| |
| void checkUnnamed44(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest = |
| 0; |
| api.GoogleCloudDialogflowV2GenerateStatelessSuggestionRequest |
| buildGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest() { |
| final o = api.GoogleCloudDialogflowV2GenerateStatelessSuggestionRequest(); |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest < |
| 3) { |
| o.contextReferences = buildUnnamed43(); |
| o.conversationContext = buildGoogleCloudDialogflowV2ConversationContext(); |
| o.generator = buildGoogleCloudDialogflowV2Generator(); |
| o.generatorName = 'foo'; |
| o.securitySettings = 'foo'; |
| o.triggerEvents = buildUnnamed44(); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest( |
| api.GoogleCloudDialogflowV2GenerateStatelessSuggestionRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest < |
| 3) { |
| checkUnnamed43(o.contextReferences!); |
| checkGoogleCloudDialogflowV2ConversationContext(o.conversationContext!); |
| checkGoogleCloudDialogflowV2Generator(o.generator!); |
| unittest.expect(o.generatorName!, unittest.equals('foo')); |
| unittest.expect(o.securitySettings!, unittest.equals('foo')); |
| checkUnnamed44(o.triggerEvents!); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse = 0; |
| api.GoogleCloudDialogflowV2GenerateStatelessSuggestionResponse |
| buildGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse() { |
| final o = api.GoogleCloudDialogflowV2GenerateStatelessSuggestionResponse(); |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse < |
| 3) { |
| o.generatorSuggestion = buildGoogleCloudDialogflowV2GeneratorSuggestion(); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse( |
| api.GoogleCloudDialogflowV2GenerateStatelessSuggestionResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse < |
| 3) { |
| checkGoogleCloudDialogflowV2GeneratorSuggestion(o.generatorSuggestion!); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequest = 0; |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequest |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryRequest() { |
| final o = api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequest(); |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequest++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequest < 3) { |
| o.conversationProfile = buildGoogleCloudDialogflowV2ConversationProfile(); |
| o.latestMessage = 'foo'; |
| o.maxContextSize = 42; |
| o.statelessConversation = |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation(); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GenerateStatelessSummaryRequest( |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequest++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequest < 3) { |
| checkGoogleCloudDialogflowV2ConversationProfile(o.conversationProfile!); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| unittest.expect(o.maxContextSize!, unittest.equals(42)); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation( |
| o.statelessConversation!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Message> buildUnnamed45() => [ |
| buildGoogleCloudDialogflowV2Message(), |
| buildGoogleCloudDialogflowV2Message(), |
| ]; |
| |
| void checkUnnamed45(core.List<api.GoogleCloudDialogflowV2Message> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Message(o[0]); |
| checkGoogleCloudDialogflowV2Message(o[1]); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation = |
| 0; |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation() { |
| final o = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation(); |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation < |
| 3) { |
| o.messages = buildUnnamed45(); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation( |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation < |
| 3) { |
| checkUnnamed45(o.messages!); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponse = |
| 0; |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponse |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryResponse() { |
| final o = api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponse(); |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponse++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponse < 3) { |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| o.summary = |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary(); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GenerateStatelessSummaryResponse( |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponse++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponse < 3) { |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary( |
| o.summary!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponse--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed46() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed46(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary = 0; |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary() { |
| final o = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary(); |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary < |
| 3) { |
| o.baselineModelVersion = 'foo'; |
| o.text = 'foo'; |
| o.textSections = buildUnnamed46(); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary( |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary < |
| 3) { |
| unittest.expect(o.baselineModelVersion!, unittest.equals('foo')); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| checkUnnamed46(o.textSections!); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary--; |
| } |
| |
| core.List<core.String> buildUnnamed47() => ['foo', 'foo']; |
| |
| void checkUnnamed47(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GenerateSuggestionsRequest = 0; |
| api.GoogleCloudDialogflowV2GenerateSuggestionsRequest |
| buildGoogleCloudDialogflowV2GenerateSuggestionsRequest() { |
| final o = api.GoogleCloudDialogflowV2GenerateSuggestionsRequest(); |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateSuggestionsRequest < 3) { |
| o.latestMessage = 'foo'; |
| o.triggerEvents = buildUnnamed47(); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GenerateSuggestionsRequest( |
| api.GoogleCloudDialogflowV2GenerateSuggestionsRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateSuggestionsRequest < 3) { |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| checkUnnamed47(o.triggerEvents!); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsRequest--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer |
| > |
| buildUnnamed48() => [ |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer(), |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer(), |
| ]; |
| |
| void checkUnnamed48( |
| core.List< |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer( |
| o[1], |
| ); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponse = 0; |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponse |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponse() { |
| final o = api.GoogleCloudDialogflowV2GenerateSuggestionsResponse(); |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponse < 3) { |
| o.generatorSuggestionAnswers = buildUnnamed48(); |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GenerateSuggestionsResponse( |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponse < 3) { |
| checkUnnamed48(o.generatorSuggestionAnswers!); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponse--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer = |
| 0; |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer() { |
| final o = |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer(); |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer < |
| 3) { |
| o.answerRecord = 'foo'; |
| o.generatorSuggestion = buildGoogleCloudDialogflowV2GeneratorSuggestion(); |
| o.sourceGenerator = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer( |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer < |
| 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2GeneratorSuggestion(o.generatorSuggestion!); |
| unittest.expect(o.sourceGenerator!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2CesAppSpec> buildUnnamed49() => [ |
| buildGoogleCloudDialogflowV2CesAppSpec(), |
| buildGoogleCloudDialogflowV2CesAppSpec(), |
| ]; |
| |
| void checkUnnamed49(core.List<api.GoogleCloudDialogflowV2CesAppSpec> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2CesAppSpec(o[0]); |
| checkGoogleCloudDialogflowV2CesAppSpec(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2CesToolSpec> buildUnnamed50() => [ |
| buildGoogleCloudDialogflowV2CesToolSpec(), |
| buildGoogleCloudDialogflowV2CesToolSpec(), |
| ]; |
| |
| void checkUnnamed50(core.List<api.GoogleCloudDialogflowV2CesToolSpec> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2CesToolSpec(o[0]); |
| checkGoogleCloudDialogflowV2CesToolSpec(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed51() => ['foo', 'foo']; |
| |
| void checkUnnamed51(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ToolsetTool> buildUnnamed52() => [ |
| buildGoogleCloudDialogflowV2ToolsetTool(), |
| buildGoogleCloudDialogflowV2ToolsetTool(), |
| ]; |
| |
| void checkUnnamed52(core.List<api.GoogleCloudDialogflowV2ToolsetTool> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ToolsetTool(o[0]); |
| checkGoogleCloudDialogflowV2ToolsetTool(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Generator = 0; |
| api.GoogleCloudDialogflowV2Generator buildGoogleCloudDialogflowV2Generator() { |
| final o = api.GoogleCloudDialogflowV2Generator(); |
| buildCounterGoogleCloudDialogflowV2Generator++; |
| if (buildCounterGoogleCloudDialogflowV2Generator < 3) { |
| o.agentCoachingContext = buildGoogleCloudDialogflowV2AgentCoachingContext(); |
| o.cesAppSpecs = buildUnnamed49(); |
| o.cesToolSpecs = buildUnnamed50(); |
| o.createTime = 'foo'; |
| o.description = 'foo'; |
| o.freeFormContext = buildGoogleCloudDialogflowV2FreeFormContext(); |
| o.inferenceParameter = buildGoogleCloudDialogflowV2InferenceParameter(); |
| o.name = 'foo'; |
| o.publishedModel = 'foo'; |
| o.suggestionDedupingConfig = |
| buildGoogleCloudDialogflowV2SuggestionDedupingConfig(); |
| o.summarizationContext = buildGoogleCloudDialogflowV2SummarizationContext(); |
| o.tools = buildUnnamed51(); |
| o.toolsetTools = buildUnnamed52(); |
| o.triggerEvent = 'foo'; |
| o.updateTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Generator--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Generator( |
| api.GoogleCloudDialogflowV2Generator o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Generator++; |
| if (buildCounterGoogleCloudDialogflowV2Generator < 3) { |
| checkGoogleCloudDialogflowV2AgentCoachingContext(o.agentCoachingContext!); |
| checkUnnamed49(o.cesAppSpecs!); |
| checkUnnamed50(o.cesToolSpecs!); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2FreeFormContext(o.freeFormContext!); |
| checkGoogleCloudDialogflowV2InferenceParameter(o.inferenceParameter!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.publishedModel!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SuggestionDedupingConfig( |
| o.suggestionDedupingConfig!, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationContext(o.summarizationContext!); |
| checkUnnamed51(o.tools!); |
| checkUnnamed52(o.toolsetTools!); |
| unittest.expect(o.triggerEvent!, unittest.equals('foo')); |
| unittest.expect(o.updateTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Generator--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GeneratorEvaluation = 0; |
| api.GoogleCloudDialogflowV2GeneratorEvaluation |
| buildGoogleCloudDialogflowV2GeneratorEvaluation() { |
| final o = api.GoogleCloudDialogflowV2GeneratorEvaluation(); |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluation++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluation < 3) { |
| o.completeTime = 'foo'; |
| o.createTime = 'foo'; |
| o.displayName = 'foo'; |
| o.evaluationStatus = buildGoogleCloudDialogflowV2EvaluationStatus(); |
| o.generatorEvaluationConfig = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfig(); |
| o.initialGenerator = buildGoogleCloudDialogflowV2Generator(); |
| o.name = 'foo'; |
| o.satisfiesPzi = true; |
| o.satisfiesPzs = true; |
| o.summarizationMetrics = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetrics(); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluation--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GeneratorEvaluation( |
| api.GoogleCloudDialogflowV2GeneratorEvaluation o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluation++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluation < 3) { |
| unittest.expect(o.completeTime!, unittest.equals('foo')); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2EvaluationStatus(o.evaluationStatus!); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfig( |
| o.generatorEvaluationConfig!, |
| ); |
| checkGoogleCloudDialogflowV2Generator(o.initialGenerator!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.satisfiesPzi!, unittest.isTrue); |
| unittest.expect(o.satisfiesPzs!, unittest.isTrue); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetrics( |
| o.summarizationMetrics!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluation--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfig = 0; |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfig |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfig() { |
| final o = api.GoogleCloudDialogflowV2GeneratorEvaluationConfig(); |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfig < 3) { |
| o.inputDataConfig = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig(); |
| o.outputGcsBucketPath = 'foo'; |
| o.summarizationConfig = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GeneratorEvaluationConfig( |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfig < 3) { |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig( |
| o.inputDataConfig!, |
| ); |
| unittest.expect(o.outputGcsBucketPath!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig( |
| o.summarizationConfig!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig = |
| 0; |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig(); |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig < |
| 3) { |
| o.endTime = 'foo'; |
| o.startTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig( |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig < |
| 3) { |
| unittest.expect(o.endTime!, unittest.equals('foo')); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig = |
| 0; |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig(); |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig < |
| 3) { |
| o.dataset = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig( |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig < |
| 3) { |
| unittest.expect(o.dataset!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig = 0; |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig(); |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig < |
| 3) { |
| o.agentAssistInputDataConfig = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig(); |
| o.datasetInputDataConfig = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig(); |
| o.endTime = 'foo'; |
| o.inputDataSourceType = 'foo'; |
| o.isSummaryGenerationAllowed = true; |
| o.sampleSize = 42; |
| o.startTime = 'foo'; |
| o.summaryGenerationOption = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig( |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig < |
| 3) { |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig( |
| o.agentAssistInputDataConfig!, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig( |
| o.datasetInputDataConfig!, |
| ); |
| unittest.expect(o.endTime!, unittest.equals('foo')); |
| unittest.expect(o.inputDataSourceType!, unittest.equals('foo')); |
| unittest.expect(o.isSummaryGenerationAllowed!, unittest.isTrue); |
| unittest.expect(o.sampleSize!, unittest.equals(42)); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| unittest.expect(o.summaryGenerationOption!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig = |
| 0; |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig(); |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig < |
| 3) { |
| o.accuracyEvaluationVersion = 'foo'; |
| o.completenessEvaluationVersion = 'foo'; |
| o.enableAccuracyEvaluation = true; |
| o.enableCompletenessEvaluation = true; |
| o.evaluatorVersion = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig( |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig < |
| 3) { |
| unittest.expect(o.accuracyEvaluationVersion!, unittest.equals('foo')); |
| unittest.expect(o.completenessEvaluationVersion!, unittest.equals('foo')); |
| unittest.expect(o.enableAccuracyEvaluation!, unittest.isTrue); |
| unittest.expect(o.enableCompletenessEvaluation!, unittest.isTrue); |
| unittest.expect(o.evaluatorVersion!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo> |
| buildUnnamed53() => [ |
| buildGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo(), |
| buildGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo(), |
| ]; |
| |
| void checkUnnamed53( |
| core.List<api.GoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo(o[0]); |
| checkGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GeneratorSuggestion = 0; |
| api.GoogleCloudDialogflowV2GeneratorSuggestion |
| buildGoogleCloudDialogflowV2GeneratorSuggestion() { |
| final o = api.GoogleCloudDialogflowV2GeneratorSuggestion(); |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorSuggestion < 3) { |
| o.agentCoachingSuggestion = |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestion(); |
| o.freeFormSuggestion = buildGoogleCloudDialogflowV2FreeFormSuggestion(); |
| o.summarySuggestion = buildGoogleCloudDialogflowV2SummarySuggestion(); |
| o.toolCallInfo = buildUnnamed53(); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GeneratorSuggestion( |
| api.GoogleCloudDialogflowV2GeneratorSuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorSuggestion < 3) { |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestion( |
| o.agentCoachingSuggestion!, |
| ); |
| checkGoogleCloudDialogflowV2FreeFormSuggestion(o.freeFormSuggestion!); |
| checkGoogleCloudDialogflowV2SummarySuggestion(o.summarySuggestion!); |
| checkUnnamed53(o.toolCallInfo!); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestion--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo = 0; |
| api.GoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo |
| buildGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo() { |
| final o = api.GoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo(); |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo < 3) { |
| o.toolCall = buildGoogleCloudDialogflowV2ToolCall(); |
| o.toolCallResult = buildGoogleCloudDialogflowV2ToolCallResult(); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo( |
| api.GoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo++; |
| if (buildCounterGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo < 3) { |
| checkGoogleCloudDialogflowV2ToolCall(o.toolCall!); |
| checkGoogleCloudDialogflowV2ToolCallResult(o.toolCallResult!); |
| } |
| buildCounterGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfig = 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfig() { |
| final o = api.GoogleCloudDialogflowV2HumanAgentAssistantConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfig < 3) { |
| o.endUserSuggestionConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig(); |
| o.humanAgentSuggestionConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig(); |
| o.messageAnalysisConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig(); |
| o.notificationConfig = buildGoogleCloudDialogflowV2NotificationConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2HumanAgentAssistantConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfig < 3) { |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig( |
| o.endUserSuggestionConfig!, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig( |
| o.humanAgentSuggestionConfig!, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig( |
| o.messageAnalysisConfig!, |
| ); |
| checkGoogleCloudDialogflowV2NotificationConfig(o.notificationConfig!); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig < |
| 3) { |
| o.baselineModelVersion = 'foo'; |
| o.model = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig < |
| 3) { |
| unittest.expect(o.baselineModelVersion!, unittest.equals('foo')); |
| unittest.expect(o.model!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig < |
| 3) { |
| o.recentSentencesCount = 42; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig < |
| 3) { |
| unittest.expect(o.recentSentencesCount!, unittest.equals(42)); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig < |
| 3) { |
| o.enableEntityExtraction = true; |
| o.enableSentimentAnalysis = true; |
| o.enableSentimentAnalysisV3 = true; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig < |
| 3) { |
| unittest.expect(o.enableEntityExtraction!, unittest.isTrue); |
| unittest.expect(o.enableSentimentAnalysis!, unittest.isTrue); |
| unittest.expect(o.enableSentimentAnalysisV3!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig |
| > |
| buildUnnamed54() => [ |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig(), |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig(), |
| ]; |
| |
| void checkUnnamed54( |
| core.List< |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig( |
| o[1], |
| ); |
| } |
| |
| core.List<core.String> buildUnnamed55() => ['foo', 'foo']; |
| |
| void checkUnnamed55(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig < |
| 3) { |
| o.disableHighLatencyFeaturesSyncDelivery = true; |
| o.enableAsyncToolCall = true; |
| o.featureConfigs = buildUnnamed54(); |
| o.generators = buildUnnamed55(); |
| o.groupSuggestionResponses = true; |
| o.skipEmptyEventBasedSuggestion = true; |
| o.useUnredactedConversationData = true; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig < |
| 3) { |
| unittest.expect(o.disableHighLatencyFeaturesSyncDelivery!, unittest.isTrue); |
| unittest.expect(o.enableAsyncToolCall!, unittest.isTrue); |
| checkUnnamed54(o.featureConfigs!); |
| checkUnnamed55(o.generators!); |
| unittest.expect(o.groupSuggestionResponses!, unittest.isTrue); |
| unittest.expect(o.skipEmptyEventBasedSuggestion!, unittest.isTrue); |
| unittest.expect(o.useUnredactedConversationData!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig < |
| 3) { |
| o.conversationModelConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig(); |
| o.conversationProcessConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig(); |
| o.disableAgentQueryLogging = true; |
| o.enableConversationAugmentedQuery = true; |
| o.enableEventBasedSuggestion = true; |
| o.enableQuerySuggestionOnly = true; |
| o.enableQuerySuggestionWhenNoAnswer = true; |
| o.enableResponseDebugInfo = true; |
| o.queryConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig(); |
| o.raiSettings = buildGoogleCloudDialogflowV2RaiSettings(); |
| o.suggestionFeature = buildGoogleCloudDialogflowV2SuggestionFeature(); |
| o.suggestionTriggerSettings = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig < |
| 3) { |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig( |
| o.conversationModelConfig!, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig( |
| o.conversationProcessConfig!, |
| ); |
| unittest.expect(o.disableAgentQueryLogging!, unittest.isTrue); |
| unittest.expect(o.enableConversationAugmentedQuery!, unittest.isTrue); |
| unittest.expect(o.enableEventBasedSuggestion!, unittest.isTrue); |
| unittest.expect(o.enableQuerySuggestionOnly!, unittest.isTrue); |
| unittest.expect(o.enableQuerySuggestionWhenNoAnswer!, unittest.isTrue); |
| unittest.expect(o.enableResponseDebugInfo!, unittest.isTrue); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig( |
| o.queryConfig!, |
| ); |
| checkGoogleCloudDialogflowV2RaiSettings(o.raiSettings!); |
| checkGoogleCloudDialogflowV2SuggestionFeature(o.suggestionFeature!); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings( |
| o.suggestionTriggerSettings!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig < |
| 3) { |
| o.confidenceThreshold = 42.0; |
| o.contextFilterSettings = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings(); |
| o.contextSize = 42; |
| o.dialogflowQuerySource = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource(); |
| o.documentQuerySource = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource(); |
| o.knowledgeBaseQuerySource = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource(); |
| o.maxResults = 42; |
| o.sections = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig < |
| 3) { |
| unittest.expect(o.confidenceThreshold!, unittest.equals(42.0)); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings( |
| o.contextFilterSettings!, |
| ); |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource( |
| o.dialogflowQuerySource!, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource( |
| o.documentQuerySource!, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource( |
| o.knowledgeBaseQuerySource!, |
| ); |
| unittest.expect(o.maxResults!, unittest.equals(42)); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections( |
| o.sections!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings < |
| 3) { |
| o.dropHandoffMessages = true; |
| o.dropIvrMessages = true; |
| o.dropVirtualAgentMessages = true; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings < |
| 3) { |
| unittest.expect(o.dropHandoffMessages!, unittest.isTrue); |
| unittest.expect(o.dropIvrMessages!, unittest.isTrue); |
| unittest.expect(o.dropVirtualAgentMessages!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource < |
| 3) { |
| o.agent = 'foo'; |
| o.humanAgentSideConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource < |
| 3) { |
| unittest.expect(o.agent!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig( |
| o.humanAgentSideConfig!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig < |
| 3) { |
| o.agent = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig < |
| 3) { |
| unittest.expect(o.agent!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig--; |
| } |
| |
| core.List<core.String> buildUnnamed56() => ['foo', 'foo']; |
| |
| void checkUnnamed56(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource < |
| 3) { |
| o.documents = buildUnnamed56(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource < |
| 3) { |
| checkUnnamed56(o.documents!); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource--; |
| } |
| |
| core.List<core.String> buildUnnamed57() => ['foo', 'foo']; |
| |
| void checkUnnamed57(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource < |
| 3) { |
| o.knowledgeBases = buildUnnamed57(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource < |
| 3) { |
| checkUnnamed57(o.knowledgeBases!); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource--; |
| } |
| |
| core.List<core.String> buildUnnamed58() => ['foo', 'foo']; |
| |
| void checkUnnamed58(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections < |
| 3) { |
| o.sectionTypes = buildUnnamed58(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections < |
| 3) { |
| checkUnnamed58(o.sectionTypes!); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings < |
| 3) { |
| o.noSmalltalk = true; |
| o.onlyEndUser = true; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings( |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings < |
| 3) { |
| unittest.expect(o.noSmalltalk!, unittest.isTrue); |
| unittest.expect(o.onlyEndUser!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfig = 0; |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfig |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfig() { |
| final o = api.GoogleCloudDialogflowV2HumanAgentHandoffConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfig < 3) { |
| o.livePersonConfig = |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig(); |
| o.salesforceLiveAgentConfig = |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2HumanAgentHandoffConfig( |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfig < 3) { |
| checkGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig( |
| o.livePersonConfig!, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig( |
| o.salesforceLiveAgentConfig!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig = 0; |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig < |
| 3) { |
| o.accountNumber = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig( |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig < |
| 3) { |
| unittest.expect(o.accountNumber!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig = |
| 0; |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig(); |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig < |
| 3) { |
| o.buttonId = 'foo'; |
| o.deploymentId = 'foo'; |
| o.endpointDomain = 'foo'; |
| o.organizationId = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig( |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig++; |
| if (buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig < |
| 3) { |
| unittest.expect(o.buttonId!, unittest.equals('foo')); |
| unittest.expect(o.deploymentId!, unittest.equals('foo')); |
| unittest.expect(o.endpointDomain!, unittest.equals('foo')); |
| unittest.expect(o.organizationId!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ImportAgentRequest = 0; |
| api.GoogleCloudDialogflowV2ImportAgentRequest |
| buildGoogleCloudDialogflowV2ImportAgentRequest() { |
| final o = api.GoogleCloudDialogflowV2ImportAgentRequest(); |
| buildCounterGoogleCloudDialogflowV2ImportAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ImportAgentRequest < 3) { |
| o.agentContent = 'foo'; |
| o.agentUri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ImportAgentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ImportAgentRequest( |
| api.GoogleCloudDialogflowV2ImportAgentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ImportAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ImportAgentRequest < 3) { |
| unittest.expect(o.agentContent!, unittest.equals('foo')); |
| unittest.expect(o.agentUri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ImportAgentRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ImportConversationDataRequest = 0; |
| api.GoogleCloudDialogflowV2ImportConversationDataRequest |
| buildGoogleCloudDialogflowV2ImportConversationDataRequest() { |
| final o = api.GoogleCloudDialogflowV2ImportConversationDataRequest(); |
| buildCounterGoogleCloudDialogflowV2ImportConversationDataRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ImportConversationDataRequest < 3) { |
| o.inputConfig = buildGoogleCloudDialogflowV2InputConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2ImportConversationDataRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ImportConversationDataRequest( |
| api.GoogleCloudDialogflowV2ImportConversationDataRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ImportConversationDataRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ImportConversationDataRequest < 3) { |
| checkGoogleCloudDialogflowV2InputConfig(o.inputConfig!); |
| } |
| buildCounterGoogleCloudDialogflowV2ImportConversationDataRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed59() => ['foo', 'foo']; |
| |
| void checkUnnamed59(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed60() => {'x': 'foo', 'y': 'foo'}; |
| |
| void checkUnnamed60(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ImportDocumentTemplate = 0; |
| api.GoogleCloudDialogflowV2ImportDocumentTemplate |
| buildGoogleCloudDialogflowV2ImportDocumentTemplate() { |
| final o = api.GoogleCloudDialogflowV2ImportDocumentTemplate(); |
| buildCounterGoogleCloudDialogflowV2ImportDocumentTemplate++; |
| if (buildCounterGoogleCloudDialogflowV2ImportDocumentTemplate < 3) { |
| o.knowledgeTypes = buildUnnamed59(); |
| o.metadata = buildUnnamed60(); |
| o.mimeType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ImportDocumentTemplate--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ImportDocumentTemplate( |
| api.GoogleCloudDialogflowV2ImportDocumentTemplate o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ImportDocumentTemplate++; |
| if (buildCounterGoogleCloudDialogflowV2ImportDocumentTemplate < 3) { |
| checkUnnamed59(o.knowledgeTypes!); |
| checkUnnamed60(o.metadata!); |
| unittest.expect(o.mimeType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ImportDocumentTemplate--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ImportDocumentsRequest = 0; |
| api.GoogleCloudDialogflowV2ImportDocumentsRequest |
| buildGoogleCloudDialogflowV2ImportDocumentsRequest() { |
| final o = api.GoogleCloudDialogflowV2ImportDocumentsRequest(); |
| buildCounterGoogleCloudDialogflowV2ImportDocumentsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ImportDocumentsRequest < 3) { |
| o.documentTemplate = buildGoogleCloudDialogflowV2ImportDocumentTemplate(); |
| o.gcsSource = buildGoogleCloudDialogflowV2GcsSources(); |
| o.importGcsCustomMetadata = true; |
| } |
| buildCounterGoogleCloudDialogflowV2ImportDocumentsRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ImportDocumentsRequest( |
| api.GoogleCloudDialogflowV2ImportDocumentsRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ImportDocumentsRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ImportDocumentsRequest < 3) { |
| checkGoogleCloudDialogflowV2ImportDocumentTemplate(o.documentTemplate!); |
| checkGoogleCloudDialogflowV2GcsSources(o.gcsSource!); |
| unittest.expect(o.importGcsCustomMetadata!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2ImportDocumentsRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2InferenceParameter = 0; |
| api.GoogleCloudDialogflowV2InferenceParameter |
| buildGoogleCloudDialogflowV2InferenceParameter() { |
| final o = api.GoogleCloudDialogflowV2InferenceParameter(); |
| buildCounterGoogleCloudDialogflowV2InferenceParameter++; |
| if (buildCounterGoogleCloudDialogflowV2InferenceParameter < 3) { |
| o.maxOutputTokens = 42; |
| o.temperature = 42.0; |
| o.topK = 42; |
| o.topP = 42.0; |
| } |
| buildCounterGoogleCloudDialogflowV2InferenceParameter--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2InferenceParameter( |
| api.GoogleCloudDialogflowV2InferenceParameter o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2InferenceParameter++; |
| if (buildCounterGoogleCloudDialogflowV2InferenceParameter < 3) { |
| unittest.expect(o.maxOutputTokens!, unittest.equals(42)); |
| unittest.expect(o.temperature!, unittest.equals(42.0)); |
| unittest.expect(o.topK!, unittest.equals(42)); |
| unittest.expect(o.topP!, unittest.equals(42.0)); |
| } |
| buildCounterGoogleCloudDialogflowV2InferenceParameter--; |
| } |
| |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| buildUnnamed61() => { |
| 'x': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| 'y': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| }; |
| |
| void checkUnnamed61( |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['x']!); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['y']!); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IngestContextReferencesRequest = 0; |
| api.GoogleCloudDialogflowV2IngestContextReferencesRequest |
| buildGoogleCloudDialogflowV2IngestContextReferencesRequest() { |
| final o = api.GoogleCloudDialogflowV2IngestContextReferencesRequest(); |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2IngestContextReferencesRequest < 3) { |
| o.contextReferences = buildUnnamed61(); |
| } |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IngestContextReferencesRequest( |
| api.GoogleCloudDialogflowV2IngestContextReferencesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2IngestContextReferencesRequest < 3) { |
| checkUnnamed61(o.contextReferences!); |
| } |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesRequest--; |
| } |
| |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| buildUnnamed62() => { |
| 'x': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| 'y': buildGoogleCloudDialogflowV2ConversationContextReference(), |
| }; |
| |
| void checkUnnamed62( |
| core.Map<core.String, api.GoogleCloudDialogflowV2ConversationContextReference> |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['x']!); |
| checkGoogleCloudDialogflowV2ConversationContextReference(o['y']!); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IngestContextReferencesResponse = 0; |
| api.GoogleCloudDialogflowV2IngestContextReferencesResponse |
| buildGoogleCloudDialogflowV2IngestContextReferencesResponse() { |
| final o = api.GoogleCloudDialogflowV2IngestContextReferencesResponse(); |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2IngestContextReferencesResponse < 3) { |
| o.ingestedContextReferences = buildUnnamed62(); |
| } |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IngestContextReferencesResponse( |
| api.GoogleCloudDialogflowV2IngestContextReferencesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2IngestContextReferencesResponse < 3) { |
| checkUnnamed62(o.ingestedContextReferences!); |
| } |
| buildCounterGoogleCloudDialogflowV2IngestContextReferencesResponse--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo |
| > |
| buildUnnamed63() => [ |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo(), |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo(), |
| ]; |
| |
| void checkUnnamed63( |
| core.List< |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo( |
| o[1], |
| ); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo = |
| 0; |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfo |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo() { |
| final o = api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfo(); |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo < |
| 3) { |
| o.contextReferenceRetrieved = true; |
| o.ingestedParametersDebugInfo = buildUnnamed63(); |
| o.projectNotAllowlisted = true; |
| } |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo( |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo < |
| 3) { |
| unittest.expect(o.contextReferenceRetrieved!, unittest.isTrue); |
| checkUnnamed63(o.ingestedParametersDebugInfo!); |
| unittest.expect(o.projectNotAllowlisted!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo = |
| 0; |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo() { |
| final o = |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo(); |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo < |
| 3) { |
| o.ingestionStatus = 'foo'; |
| o.parameter = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo( |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo < |
| 3) { |
| unittest.expect(o.ingestionStatus!, unittest.equals('foo')); |
| unittest.expect(o.parameter!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2InitializeEncryptionSpecRequest = 0; |
| api.GoogleCloudDialogflowV2InitializeEncryptionSpecRequest |
| buildGoogleCloudDialogflowV2InitializeEncryptionSpecRequest() { |
| final o = api.GoogleCloudDialogflowV2InitializeEncryptionSpecRequest(); |
| buildCounterGoogleCloudDialogflowV2InitializeEncryptionSpecRequest++; |
| if (buildCounterGoogleCloudDialogflowV2InitializeEncryptionSpecRequest < 3) { |
| o.encryptionSpec = buildGoogleCloudDialogflowV2EncryptionSpec(); |
| } |
| buildCounterGoogleCloudDialogflowV2InitializeEncryptionSpecRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2InitializeEncryptionSpecRequest( |
| api.GoogleCloudDialogflowV2InitializeEncryptionSpecRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2InitializeEncryptionSpecRequest++; |
| if (buildCounterGoogleCloudDialogflowV2InitializeEncryptionSpecRequest < 3) { |
| checkGoogleCloudDialogflowV2EncryptionSpec(o.encryptionSpec!); |
| } |
| buildCounterGoogleCloudDialogflowV2InitializeEncryptionSpecRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed64() => ['foo', 'foo']; |
| |
| void checkUnnamed64(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed65() => ['foo', 'foo']; |
| |
| void checkUnnamed65(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SpeechContext> buildUnnamed66() => [ |
| buildGoogleCloudDialogflowV2SpeechContext(), |
| buildGoogleCloudDialogflowV2SpeechContext(), |
| ]; |
| |
| void checkUnnamed66(core.List<api.GoogleCloudDialogflowV2SpeechContext> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SpeechContext(o[0]); |
| checkGoogleCloudDialogflowV2SpeechContext(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2InputAudioConfig = 0; |
| api.GoogleCloudDialogflowV2InputAudioConfig |
| buildGoogleCloudDialogflowV2InputAudioConfig() { |
| final o = api.GoogleCloudDialogflowV2InputAudioConfig(); |
| buildCounterGoogleCloudDialogflowV2InputAudioConfig++; |
| if (buildCounterGoogleCloudDialogflowV2InputAudioConfig < 3) { |
| o.audioEncoding = 'foo'; |
| o.disableNoSpeechRecognizedEvent = true; |
| o.enableAutomaticPunctuation = true; |
| o.enableWordInfo = true; |
| o.languageCode = 'foo'; |
| o.model = 'foo'; |
| o.modelVariant = 'foo'; |
| o.optOutConformerModelMigration = true; |
| o.phraseHints = buildUnnamed64(); |
| o.phraseSets = buildUnnamed65(); |
| o.sampleRateHertz = 42; |
| o.singleUtterance = true; |
| o.speechContexts = buildUnnamed66(); |
| } |
| buildCounterGoogleCloudDialogflowV2InputAudioConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2InputAudioConfig( |
| api.GoogleCloudDialogflowV2InputAudioConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2InputAudioConfig++; |
| if (buildCounterGoogleCloudDialogflowV2InputAudioConfig < 3) { |
| unittest.expect(o.audioEncoding!, unittest.equals('foo')); |
| unittest.expect(o.disableNoSpeechRecognizedEvent!, unittest.isTrue); |
| unittest.expect(o.enableAutomaticPunctuation!, unittest.isTrue); |
| unittest.expect(o.enableWordInfo!, unittest.isTrue); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.model!, unittest.equals('foo')); |
| unittest.expect(o.modelVariant!, unittest.equals('foo')); |
| unittest.expect(o.optOutConformerModelMigration!, unittest.isTrue); |
| checkUnnamed64(o.phraseHints!); |
| checkUnnamed65(o.phraseSets!); |
| unittest.expect(o.sampleRateHertz!, unittest.equals(42)); |
| unittest.expect(o.singleUtterance!, unittest.isTrue); |
| checkUnnamed66(o.speechContexts!); |
| } |
| buildCounterGoogleCloudDialogflowV2InputAudioConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2InputConfig = 0; |
| api.GoogleCloudDialogflowV2InputConfig |
| buildGoogleCloudDialogflowV2InputConfig() { |
| final o = api.GoogleCloudDialogflowV2InputConfig(); |
| buildCounterGoogleCloudDialogflowV2InputConfig++; |
| if (buildCounterGoogleCloudDialogflowV2InputConfig < 3) { |
| o.gcsSource = buildGoogleCloudDialogflowV2GcsSources(); |
| } |
| buildCounterGoogleCloudDialogflowV2InputConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2InputConfig( |
| api.GoogleCloudDialogflowV2InputConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2InputConfig++; |
| if (buildCounterGoogleCloudDialogflowV2InputConfig < 3) { |
| checkGoogleCloudDialogflowV2GcsSources(o.gcsSource!); |
| } |
| buildCounterGoogleCloudDialogflowV2InputConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2InputDataset = 0; |
| api.GoogleCloudDialogflowV2InputDataset |
| buildGoogleCloudDialogflowV2InputDataset() { |
| final o = api.GoogleCloudDialogflowV2InputDataset(); |
| buildCounterGoogleCloudDialogflowV2InputDataset++; |
| if (buildCounterGoogleCloudDialogflowV2InputDataset < 3) { |
| o.dataset = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2InputDataset--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2InputDataset( |
| api.GoogleCloudDialogflowV2InputDataset o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2InputDataset++; |
| if (buildCounterGoogleCloudDialogflowV2InputDataset < 3) { |
| unittest.expect(o.dataset!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2InputDataset--; |
| } |
| |
| core.List<core.String> buildUnnamed67() => ['foo', 'foo']; |
| |
| void checkUnnamed67(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed68() => ['foo', 'foo']; |
| |
| void checkUnnamed68(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentFollowupIntentInfo> |
| buildUnnamed69() => [ |
| buildGoogleCloudDialogflowV2IntentFollowupIntentInfo(), |
| buildGoogleCloudDialogflowV2IntentFollowupIntentInfo(), |
| ]; |
| |
| void checkUnnamed69( |
| core.List<api.GoogleCloudDialogflowV2IntentFollowupIntentInfo> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentFollowupIntentInfo(o[0]); |
| checkGoogleCloudDialogflowV2IntentFollowupIntentInfo(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed70() => ['foo', 'foo']; |
| |
| void checkUnnamed70(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessage> buildUnnamed71() => [ |
| buildGoogleCloudDialogflowV2IntentMessage(), |
| buildGoogleCloudDialogflowV2IntentMessage(), |
| ]; |
| |
| void checkUnnamed71(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessage(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessage(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Context> buildUnnamed72() => [ |
| buildGoogleCloudDialogflowV2Context(), |
| buildGoogleCloudDialogflowV2Context(), |
| ]; |
| |
| void checkUnnamed72(core.List<api.GoogleCloudDialogflowV2Context> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Context(o[0]); |
| checkGoogleCloudDialogflowV2Context(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentParameter> buildUnnamed73() => [ |
| buildGoogleCloudDialogflowV2IntentParameter(), |
| buildGoogleCloudDialogflowV2IntentParameter(), |
| ]; |
| |
| void checkUnnamed73(core.List<api.GoogleCloudDialogflowV2IntentParameter> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentParameter(o[0]); |
| checkGoogleCloudDialogflowV2IntentParameter(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase> buildUnnamed74() => [ |
| buildGoogleCloudDialogflowV2IntentTrainingPhrase(), |
| buildGoogleCloudDialogflowV2IntentTrainingPhrase(), |
| ]; |
| |
| void checkUnnamed74( |
| core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrase> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentTrainingPhrase(o[0]); |
| checkGoogleCloudDialogflowV2IntentTrainingPhrase(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Intent = 0; |
| api.GoogleCloudDialogflowV2Intent buildGoogleCloudDialogflowV2Intent() { |
| final o = api.GoogleCloudDialogflowV2Intent(); |
| buildCounterGoogleCloudDialogflowV2Intent++; |
| if (buildCounterGoogleCloudDialogflowV2Intent < 3) { |
| o.action = 'foo'; |
| o.defaultResponsePlatforms = buildUnnamed67(); |
| o.displayName = 'foo'; |
| o.endInteraction = true; |
| o.events = buildUnnamed68(); |
| o.followupIntentInfo = buildUnnamed69(); |
| o.inputContextNames = buildUnnamed70(); |
| o.isFallback = true; |
| o.liveAgentHandoff = true; |
| o.messages = buildUnnamed71(); |
| o.mlDisabled = true; |
| o.name = 'foo'; |
| o.outputContexts = buildUnnamed72(); |
| o.parameters = buildUnnamed73(); |
| o.parentFollowupIntentName = 'foo'; |
| o.priority = 42; |
| o.resetContexts = true; |
| o.rootFollowupIntentName = 'foo'; |
| o.trainingPhrases = buildUnnamed74(); |
| o.webhookState = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Intent--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Intent(api.GoogleCloudDialogflowV2Intent o) { |
| buildCounterGoogleCloudDialogflowV2Intent++; |
| if (buildCounterGoogleCloudDialogflowV2Intent < 3) { |
| unittest.expect(o.action!, unittest.equals('foo')); |
| checkUnnamed67(o.defaultResponsePlatforms!); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.endInteraction!, unittest.isTrue); |
| checkUnnamed68(o.events!); |
| checkUnnamed69(o.followupIntentInfo!); |
| checkUnnamed70(o.inputContextNames!); |
| unittest.expect(o.isFallback!, unittest.isTrue); |
| unittest.expect(o.liveAgentHandoff!, unittest.isTrue); |
| checkUnnamed71(o.messages!); |
| unittest.expect(o.mlDisabled!, unittest.isTrue); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed72(o.outputContexts!); |
| checkUnnamed73(o.parameters!); |
| unittest.expect(o.parentFollowupIntentName!, unittest.equals('foo')); |
| unittest.expect(o.priority!, unittest.equals(42)); |
| unittest.expect(o.resetContexts!, unittest.isTrue); |
| unittest.expect(o.rootFollowupIntentName!, unittest.equals('foo')); |
| checkUnnamed74(o.trainingPhrases!); |
| unittest.expect(o.webhookState!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Intent--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Intent> buildUnnamed75() => [ |
| buildGoogleCloudDialogflowV2Intent(), |
| buildGoogleCloudDialogflowV2Intent(), |
| ]; |
| |
| void checkUnnamed75(core.List<api.GoogleCloudDialogflowV2Intent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Intent(o[0]); |
| checkGoogleCloudDialogflowV2Intent(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentBatch = 0; |
| api.GoogleCloudDialogflowV2IntentBatch |
| buildGoogleCloudDialogflowV2IntentBatch() { |
| final o = api.GoogleCloudDialogflowV2IntentBatch(); |
| buildCounterGoogleCloudDialogflowV2IntentBatch++; |
| if (buildCounterGoogleCloudDialogflowV2IntentBatch < 3) { |
| o.intents = buildUnnamed75(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentBatch--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentBatch( |
| api.GoogleCloudDialogflowV2IntentBatch o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentBatch++; |
| if (buildCounterGoogleCloudDialogflowV2IntentBatch < 3) { |
| checkUnnamed75(o.intents!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentBatch--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo = 0; |
| api.GoogleCloudDialogflowV2IntentFollowupIntentInfo |
| buildGoogleCloudDialogflowV2IntentFollowupIntentInfo() { |
| final o = api.GoogleCloudDialogflowV2IntentFollowupIntentInfo(); |
| buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo < 3) { |
| o.followupIntentName = 'foo'; |
| o.parentFollowupIntentName = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentFollowupIntentInfo( |
| api.GoogleCloudDialogflowV2IntentFollowupIntentInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo < 3) { |
| unittest.expect(o.followupIntentName!, unittest.equals('foo')); |
| unittest.expect(o.parentFollowupIntentName!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentFollowupIntentInfo--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed76() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed76(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted8 = (o['x']!) as core.Map; |
| unittest.expect(casted8, unittest.hasLength(3)); |
| unittest.expect(casted8['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted8['bool'], unittest.equals(true)); |
| unittest.expect(casted8['string'], unittest.equals('foo')); |
| var casted9 = (o['y']!) as core.Map; |
| unittest.expect(casted9, unittest.hasLength(3)); |
| unittest.expect(casted9['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted9['bool'], unittest.equals(true)); |
| unittest.expect(casted9['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessage = 0; |
| api.GoogleCloudDialogflowV2IntentMessage |
| buildGoogleCloudDialogflowV2IntentMessage() { |
| final o = api.GoogleCloudDialogflowV2IntentMessage(); |
| buildCounterGoogleCloudDialogflowV2IntentMessage++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessage < 3) { |
| o.basicCard = buildGoogleCloudDialogflowV2IntentMessageBasicCard(); |
| o.browseCarouselCard = |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard(); |
| o.card = buildGoogleCloudDialogflowV2IntentMessageCard(); |
| o.carouselSelect = |
| buildGoogleCloudDialogflowV2IntentMessageCarouselSelect(); |
| o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.linkOutSuggestion = |
| buildGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion(); |
| o.listSelect = buildGoogleCloudDialogflowV2IntentMessageListSelect(); |
| o.mediaContent = buildGoogleCloudDialogflowV2IntentMessageMediaContent(); |
| o.payload = buildUnnamed76(); |
| o.platform = 'foo'; |
| o.quickReplies = buildGoogleCloudDialogflowV2IntentMessageQuickReplies(); |
| o.simpleResponses = |
| buildGoogleCloudDialogflowV2IntentMessageSimpleResponses(); |
| o.suggestions = buildGoogleCloudDialogflowV2IntentMessageSuggestions(); |
| o.tableCard = buildGoogleCloudDialogflowV2IntentMessageTableCard(); |
| o.text = buildGoogleCloudDialogflowV2IntentMessageText(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessage--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessage( |
| api.GoogleCloudDialogflowV2IntentMessage o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessage++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessage < 3) { |
| checkGoogleCloudDialogflowV2IntentMessageBasicCard(o.basicCard!); |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard( |
| o.browseCarouselCard!, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageCard(o.card!); |
| checkGoogleCloudDialogflowV2IntentMessageCarouselSelect(o.carouselSelect!); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.image!); |
| checkGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion( |
| o.linkOutSuggestion!, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageListSelect(o.listSelect!); |
| checkGoogleCloudDialogflowV2IntentMessageMediaContent(o.mediaContent!); |
| checkUnnamed76(o.payload!); |
| unittest.expect(o.platform!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IntentMessageQuickReplies(o.quickReplies!); |
| checkGoogleCloudDialogflowV2IntentMessageSimpleResponses( |
| o.simpleResponses!, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageSuggestions(o.suggestions!); |
| checkGoogleCloudDialogflowV2IntentMessageTableCard(o.tableCard!); |
| checkGoogleCloudDialogflowV2IntentMessageText(o.text!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessage--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton> |
| buildUnnamed77() => [ |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButton(), |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButton(), |
| ]; |
| |
| void checkUnnamed77( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageBasicCardButton(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageBasicCardButton(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard = 0; |
| api.GoogleCloudDialogflowV2IntentMessageBasicCard |
| buildGoogleCloudDialogflowV2IntentMessageBasicCard() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageBasicCard(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard < 3) { |
| o.buttons = buildUnnamed77(); |
| o.formattedText = 'foo'; |
| o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.subtitle = 'foo'; |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageBasicCard( |
| api.GoogleCloudDialogflowV2IntentMessageBasicCard o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard < 3) { |
| checkUnnamed77(o.buttons!); |
| unittest.expect(o.formattedText!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.image!); |
| unittest.expect(o.subtitle!, unittest.equals('foo')); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCard--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButton = 0; |
| api.GoogleCloudDialogflowV2IntentMessageBasicCardButton |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButton() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageBasicCardButton(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButton++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButton < 3) { |
| o.openUriAction = |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction(); |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButton--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageBasicCardButton( |
| api.GoogleCloudDialogflowV2IntentMessageBasicCardButton o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButton++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButton < 3) { |
| checkGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction( |
| o.openUriAction!, |
| ); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButton--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction = |
| 0; |
| api.GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction() { |
| final o = |
| api.GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction < |
| 3) { |
| o.uri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction( |
| api.GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction < |
| 3) { |
| unittest.expect(o.uri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem |
| > |
| buildUnnamed78() => [ |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem(), |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem(), |
| ]; |
| |
| void checkUnnamed78( |
| core.List< |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem( |
| o[1], |
| ); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard = 0; |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard < 3) { |
| o.imageDisplayOptions = 'foo'; |
| o.items = buildUnnamed78(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard( |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard < 3) { |
| unittest.expect(o.imageDisplayOptions!, unittest.equals('foo')); |
| checkUnnamed78(o.items!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem = |
| 0; |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem() { |
| final o = |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem < |
| 3) { |
| o.description = 'foo'; |
| o.footer = 'foo'; |
| o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.openUriAction = |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction(); |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem( |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem < |
| 3) { |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.footer!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.image!); |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction( |
| o.openUriAction!, |
| ); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction = |
| 0; |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction() { |
| final o = |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction < |
| 3) { |
| o.url = 'foo'; |
| o.urlTypeHint = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction( |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction < |
| 3) { |
| unittest.expect(o.url!, unittest.equals('foo')); |
| unittest.expect(o.urlTypeHint!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageCardButton> |
| buildUnnamed79() => [ |
| buildGoogleCloudDialogflowV2IntentMessageCardButton(), |
| buildGoogleCloudDialogflowV2IntentMessageCardButton(), |
| ]; |
| |
| void checkUnnamed79( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageCardButton> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageCardButton(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageCardButton(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageCard = 0; |
| api.GoogleCloudDialogflowV2IntentMessageCard |
| buildGoogleCloudDialogflowV2IntentMessageCard() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageCard(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCard < 3) { |
| o.buttons = buildUnnamed79(); |
| o.imageUri = 'foo'; |
| o.subtitle = 'foo'; |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCard--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageCard( |
| api.GoogleCloudDialogflowV2IntentMessageCard o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCard < 3) { |
| checkUnnamed79(o.buttons!); |
| unittest.expect(o.imageUri!, unittest.equals('foo')); |
| unittest.expect(o.subtitle!, unittest.equals('foo')); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCard--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageCardButton = 0; |
| api.GoogleCloudDialogflowV2IntentMessageCardButton |
| buildGoogleCloudDialogflowV2IntentMessageCardButton() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageCardButton(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageCardButton++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCardButton < 3) { |
| o.postback = 'foo'; |
| o.text = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCardButton--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageCardButton( |
| api.GoogleCloudDialogflowV2IntentMessageCardButton o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageCardButton++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCardButton < 3) { |
| unittest.expect(o.postback!, unittest.equals('foo')); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCardButton--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem> |
| buildUnnamed80() => [ |
| buildGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(), |
| buildGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(), |
| ]; |
| |
| void checkUnnamed80( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect = 0; |
| api.GoogleCloudDialogflowV2IntentMessageCarouselSelect |
| buildGoogleCloudDialogflowV2IntentMessageCarouselSelect() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageCarouselSelect(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect < 3) { |
| o.items = buildUnnamed80(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageCarouselSelect( |
| api.GoogleCloudDialogflowV2IntentMessageCarouselSelect o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect < 3) { |
| checkUnnamed80(o.items!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelect--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelectItem = 0; |
| api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem |
| buildGoogleCloudDialogflowV2IntentMessageCarouselSelectItem() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelectItem++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelectItem < 3) { |
| o.description = 'foo'; |
| o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.info = buildGoogleCloudDialogflowV2IntentMessageSelectItemInfo(); |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelectItem--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageCarouselSelectItem( |
| api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelectItem++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelectItem < 3) { |
| unittest.expect(o.description!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.image!); |
| checkGoogleCloudDialogflowV2IntentMessageSelectItemInfo(o.info!); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageCarouselSelectItem--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageColumnProperties = 0; |
| api.GoogleCloudDialogflowV2IntentMessageColumnProperties |
| buildGoogleCloudDialogflowV2IntentMessageColumnProperties() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageColumnProperties(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageColumnProperties++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageColumnProperties < 3) { |
| o.header = 'foo'; |
| o.horizontalAlignment = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageColumnProperties--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageColumnProperties( |
| api.GoogleCloudDialogflowV2IntentMessageColumnProperties o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageColumnProperties++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageColumnProperties < 3) { |
| unittest.expect(o.header!, unittest.equals('foo')); |
| unittest.expect(o.horizontalAlignment!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageColumnProperties--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageImage = 0; |
| api.GoogleCloudDialogflowV2IntentMessageImage |
| buildGoogleCloudDialogflowV2IntentMessageImage() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageImage(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageImage++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageImage < 3) { |
| o.accessibilityText = 'foo'; |
| o.imageUri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageImage--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageImage( |
| api.GoogleCloudDialogflowV2IntentMessageImage o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageImage++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageImage < 3) { |
| unittest.expect(o.accessibilityText!, unittest.equals('foo')); |
| unittest.expect(o.imageUri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageImage--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion = 0; |
| api.GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion |
| buildGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion < 3) { |
| o.destinationName = 'foo'; |
| o.uri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion( |
| api.GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion < 3) { |
| unittest.expect(o.destinationName!, unittest.equals('foo')); |
| unittest.expect(o.uri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageListSelectItem> |
| buildUnnamed81() => [ |
| buildGoogleCloudDialogflowV2IntentMessageListSelectItem(), |
| buildGoogleCloudDialogflowV2IntentMessageListSelectItem(), |
| ]; |
| |
| void checkUnnamed81( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageListSelectItem> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageListSelectItem(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageListSelectItem(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageListSelect = 0; |
| api.GoogleCloudDialogflowV2IntentMessageListSelect |
| buildGoogleCloudDialogflowV2IntentMessageListSelect() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageListSelect(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelect++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelect < 3) { |
| o.items = buildUnnamed81(); |
| o.subtitle = 'foo'; |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelect--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageListSelect( |
| api.GoogleCloudDialogflowV2IntentMessageListSelect o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelect++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelect < 3) { |
| checkUnnamed81(o.items!); |
| unittest.expect(o.subtitle!, unittest.equals('foo')); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelect--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem = 0; |
| api.GoogleCloudDialogflowV2IntentMessageListSelectItem |
| buildGoogleCloudDialogflowV2IntentMessageListSelectItem() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageListSelectItem(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem < 3) { |
| o.description = 'foo'; |
| o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.info = buildGoogleCloudDialogflowV2IntentMessageSelectItemInfo(); |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageListSelectItem( |
| api.GoogleCloudDialogflowV2IntentMessageListSelectItem o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem < 3) { |
| unittest.expect(o.description!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.image!); |
| checkGoogleCloudDialogflowV2IntentMessageSelectItemInfo(o.info!); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageListSelectItem--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject |
| > |
| buildUnnamed82() => [ |
| buildGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject(), |
| buildGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject(), |
| ]; |
| |
| void checkUnnamed82( |
| core.List< |
| api.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject( |
| o[1], |
| ); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageMediaContent = 0; |
| api.GoogleCloudDialogflowV2IntentMessageMediaContent |
| buildGoogleCloudDialogflowV2IntentMessageMediaContent() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageMediaContent(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContent++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageMediaContent < 3) { |
| o.mediaObjects = buildUnnamed82(); |
| o.mediaType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContent--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageMediaContent( |
| api.GoogleCloudDialogflowV2IntentMessageMediaContent o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContent++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageMediaContent < 3) { |
| checkUnnamed82(o.mediaObjects!); |
| unittest.expect(o.mediaType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContent--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject = |
| 0; |
| api.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject |
| buildGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject() { |
| final o = |
| api.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject < |
| 3) { |
| o.contentUrl = 'foo'; |
| o.description = 'foo'; |
| o.icon = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.largeImage = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject( |
| api.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject < |
| 3) { |
| unittest.expect(o.contentUrl!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.icon!); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.largeImage!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject--; |
| } |
| |
| core.List<core.String> buildUnnamed83() => ['foo', 'foo']; |
| |
| void checkUnnamed83(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies = 0; |
| api.GoogleCloudDialogflowV2IntentMessageQuickReplies |
| buildGoogleCloudDialogflowV2IntentMessageQuickReplies() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageQuickReplies(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies < 3) { |
| o.quickReplies = buildUnnamed83(); |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageQuickReplies( |
| api.GoogleCloudDialogflowV2IntentMessageQuickReplies o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies < 3) { |
| checkUnnamed83(o.quickReplies!); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageQuickReplies--; |
| } |
| |
| core.List<core.String> buildUnnamed84() => ['foo', 'foo']; |
| |
| void checkUnnamed84(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo = 0; |
| api.GoogleCloudDialogflowV2IntentMessageSelectItemInfo |
| buildGoogleCloudDialogflowV2IntentMessageSelectItemInfo() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageSelectItemInfo(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo < 3) { |
| o.key = 'foo'; |
| o.synonyms = buildUnnamed84(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageSelectItemInfo( |
| api.GoogleCloudDialogflowV2IntentMessageSelectItemInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo < 3) { |
| unittest.expect(o.key!, unittest.equals('foo')); |
| checkUnnamed84(o.synonyms!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSelectItemInfo--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse = 0; |
| api.GoogleCloudDialogflowV2IntentMessageSimpleResponse |
| buildGoogleCloudDialogflowV2IntentMessageSimpleResponse() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageSimpleResponse(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse < 3) { |
| o.displayText = 'foo'; |
| o.ssml = 'foo'; |
| o.textToSpeech = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageSimpleResponse( |
| api.GoogleCloudDialogflowV2IntentMessageSimpleResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse < 3) { |
| unittest.expect(o.displayText!, unittest.equals('foo')); |
| unittest.expect(o.ssml!, unittest.equals('foo')); |
| unittest.expect(o.textToSpeech!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageSimpleResponse> |
| buildUnnamed85() => [ |
| buildGoogleCloudDialogflowV2IntentMessageSimpleResponse(), |
| buildGoogleCloudDialogflowV2IntentMessageSimpleResponse(), |
| ]; |
| |
| void checkUnnamed85( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageSimpleResponse> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageSimpleResponse(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageSimpleResponse(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses = 0; |
| api.GoogleCloudDialogflowV2IntentMessageSimpleResponses |
| buildGoogleCloudDialogflowV2IntentMessageSimpleResponses() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageSimpleResponses(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses < 3) { |
| o.simpleResponses = buildUnnamed85(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageSimpleResponses( |
| api.GoogleCloudDialogflowV2IntentMessageSimpleResponses o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses < 3) { |
| checkUnnamed85(o.simpleResponses!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSimpleResponses--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion = 0; |
| api.GoogleCloudDialogflowV2IntentMessageSuggestion |
| buildGoogleCloudDialogflowV2IntentMessageSuggestion() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageSuggestion(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion < 3) { |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageSuggestion( |
| api.GoogleCloudDialogflowV2IntentMessageSuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion < 3) { |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestion--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageSuggestion> |
| buildUnnamed86() => [ |
| buildGoogleCloudDialogflowV2IntentMessageSuggestion(), |
| buildGoogleCloudDialogflowV2IntentMessageSuggestion(), |
| ]; |
| |
| void checkUnnamed86( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageSuggestion> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageSuggestion(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageSuggestion(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions = 0; |
| api.GoogleCloudDialogflowV2IntentMessageSuggestions |
| buildGoogleCloudDialogflowV2IntentMessageSuggestions() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageSuggestions(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions < 3) { |
| o.suggestions = buildUnnamed86(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageSuggestions( |
| api.GoogleCloudDialogflowV2IntentMessageSuggestions o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions < 3) { |
| checkUnnamed86(o.suggestions!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageSuggestions--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton> |
| buildUnnamed87() => [ |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButton(), |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButton(), |
| ]; |
| |
| void checkUnnamed87( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageBasicCardButton> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageBasicCardButton(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageBasicCardButton(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageColumnProperties> |
| buildUnnamed88() => [ |
| buildGoogleCloudDialogflowV2IntentMessageColumnProperties(), |
| buildGoogleCloudDialogflowV2IntentMessageColumnProperties(), |
| ]; |
| |
| void checkUnnamed88( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageColumnProperties> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageColumnProperties(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageColumnProperties(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageTableCardRow> |
| buildUnnamed89() => [ |
| buildGoogleCloudDialogflowV2IntentMessageTableCardRow(), |
| buildGoogleCloudDialogflowV2IntentMessageTableCardRow(), |
| ]; |
| |
| void checkUnnamed89( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageTableCardRow> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageTableCardRow(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageTableCardRow(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageTableCard = 0; |
| api.GoogleCloudDialogflowV2IntentMessageTableCard |
| buildGoogleCloudDialogflowV2IntentMessageTableCard() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageTableCard(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageTableCard < 3) { |
| o.buttons = buildUnnamed87(); |
| o.columnProperties = buildUnnamed88(); |
| o.image = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| o.rows = buildUnnamed89(); |
| o.subtitle = 'foo'; |
| o.title = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCard--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageTableCard( |
| api.GoogleCloudDialogflowV2IntentMessageTableCard o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCard++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageTableCard < 3) { |
| checkUnnamed87(o.buttons!); |
| checkUnnamed88(o.columnProperties!); |
| checkGoogleCloudDialogflowV2IntentMessageImage(o.image!); |
| checkUnnamed89(o.rows!); |
| unittest.expect(o.subtitle!, unittest.equals('foo')); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCard--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageTableCardCell = 0; |
| api.GoogleCloudDialogflowV2IntentMessageTableCardCell |
| buildGoogleCloudDialogflowV2IntentMessageTableCardCell() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageTableCardCell(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardCell++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageTableCardCell < 3) { |
| o.text = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardCell--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageTableCardCell( |
| api.GoogleCloudDialogflowV2IntentMessageTableCardCell o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardCell++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageTableCardCell < 3) { |
| unittest.expect(o.text!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardCell--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessageTableCardCell> |
| buildUnnamed90() => [ |
| buildGoogleCloudDialogflowV2IntentMessageTableCardCell(), |
| buildGoogleCloudDialogflowV2IntentMessageTableCardCell(), |
| ]; |
| |
| void checkUnnamed90( |
| core.List<api.GoogleCloudDialogflowV2IntentMessageTableCardCell> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessageTableCardCell(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessageTableCardCell(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageTableCardRow = 0; |
| api.GoogleCloudDialogflowV2IntentMessageTableCardRow |
| buildGoogleCloudDialogflowV2IntentMessageTableCardRow() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageTableCardRow(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardRow++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageTableCardRow < 3) { |
| o.cells = buildUnnamed90(); |
| o.dividerAfter = true; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardRow--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageTableCardRow( |
| api.GoogleCloudDialogflowV2IntentMessageTableCardRow o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardRow++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageTableCardRow < 3) { |
| checkUnnamed90(o.cells!); |
| unittest.expect(o.dividerAfter!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageTableCardRow--; |
| } |
| |
| core.List<core.String> buildUnnamed91() => ['foo', 'foo']; |
| |
| void checkUnnamed91(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentMessageText = 0; |
| api.GoogleCloudDialogflowV2IntentMessageText |
| buildGoogleCloudDialogflowV2IntentMessageText() { |
| final o = api.GoogleCloudDialogflowV2IntentMessageText(); |
| buildCounterGoogleCloudDialogflowV2IntentMessageText++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageText < 3) { |
| o.text = buildUnnamed91(); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageText--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentMessageText( |
| api.GoogleCloudDialogflowV2IntentMessageText o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentMessageText++; |
| if (buildCounterGoogleCloudDialogflowV2IntentMessageText < 3) { |
| checkUnnamed91(o.text!); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentMessageText--; |
| } |
| |
| core.List<core.String> buildUnnamed92() => ['foo', 'foo']; |
| |
| void checkUnnamed92(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentParameter = 0; |
| api.GoogleCloudDialogflowV2IntentParameter |
| buildGoogleCloudDialogflowV2IntentParameter() { |
| final o = api.GoogleCloudDialogflowV2IntentParameter(); |
| buildCounterGoogleCloudDialogflowV2IntentParameter++; |
| if (buildCounterGoogleCloudDialogflowV2IntentParameter < 3) { |
| o.defaultValue = 'foo'; |
| o.displayName = 'foo'; |
| o.entityTypeDisplayName = 'foo'; |
| o.isList = true; |
| o.mandatory = true; |
| o.name = 'foo'; |
| o.prompts = buildUnnamed92(); |
| o.value = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentParameter--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentParameter( |
| api.GoogleCloudDialogflowV2IntentParameter o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentParameter++; |
| if (buildCounterGoogleCloudDialogflowV2IntentParameter < 3) { |
| unittest.expect(o.defaultValue!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.entityTypeDisplayName!, unittest.equals('foo')); |
| unittest.expect(o.isList!, unittest.isTrue); |
| unittest.expect(o.mandatory!, unittest.isTrue); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed92(o.prompts!); |
| unittest.expect(o.value!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentParameter--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentSuggestion = 0; |
| api.GoogleCloudDialogflowV2IntentSuggestion |
| buildGoogleCloudDialogflowV2IntentSuggestion() { |
| final o = api.GoogleCloudDialogflowV2IntentSuggestion(); |
| buildCounterGoogleCloudDialogflowV2IntentSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2IntentSuggestion < 3) { |
| o.description = 'foo'; |
| o.displayName = 'foo'; |
| o.intentV2 = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentSuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentSuggestion( |
| api.GoogleCloudDialogflowV2IntentSuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentSuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2IntentSuggestion < 3) { |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.intentV2!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentSuggestion--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrasePart> |
| buildUnnamed93() => [ |
| buildGoogleCloudDialogflowV2IntentTrainingPhrasePart(), |
| buildGoogleCloudDialogflowV2IntentTrainingPhrasePart(), |
| ]; |
| |
| void checkUnnamed93( |
| core.List<api.GoogleCloudDialogflowV2IntentTrainingPhrasePart> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentTrainingPhrasePart(o[0]); |
| checkGoogleCloudDialogflowV2IntentTrainingPhrasePart(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase = 0; |
| api.GoogleCloudDialogflowV2IntentTrainingPhrase |
| buildGoogleCloudDialogflowV2IntentTrainingPhrase() { |
| final o = api.GoogleCloudDialogflowV2IntentTrainingPhrase(); |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase++; |
| if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase < 3) { |
| o.name = 'foo'; |
| o.parts = buildUnnamed93(); |
| o.timesAddedCount = 42; |
| o.type = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentTrainingPhrase( |
| api.GoogleCloudDialogflowV2IntentTrainingPhrase o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase++; |
| if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase < 3) { |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed93(o.parts!); |
| unittest.expect(o.timesAddedCount!, unittest.equals(42)); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrase--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart = 0; |
| api.GoogleCloudDialogflowV2IntentTrainingPhrasePart |
| buildGoogleCloudDialogflowV2IntentTrainingPhrasePart() { |
| final o = api.GoogleCloudDialogflowV2IntentTrainingPhrasePart(); |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart++; |
| if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart < 3) { |
| o.alias = 'foo'; |
| o.entityType = 'foo'; |
| o.text = 'foo'; |
| o.userDefined = true; |
| } |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2IntentTrainingPhrasePart( |
| api.GoogleCloudDialogflowV2IntentTrainingPhrasePart o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart++; |
| if (buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart < 3) { |
| unittest.expect(o.alias!, unittest.equals('foo')); |
| unittest.expect(o.entityType!, unittest.equals('foo')); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| unittest.expect(o.userDefined!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2IntentTrainingPhrasePart--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswer = 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswer |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswer() { |
| final o = api.GoogleCloudDialogflowV2KnowledgeAssistAnswer(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswer < 3) { |
| o.answerRecord = 'foo'; |
| o.knowledgeAssistDebugInfo = |
| buildGoogleCloudDialogflowV2KnowledgeAssistDebugInfo(); |
| o.suggestedQuery = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery(); |
| o.suggestedQueryAnswer = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer(); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswer--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2KnowledgeAssistAnswer( |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswer o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswer < 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2KnowledgeAssistDebugInfo( |
| o.knowledgeAssistDebugInfo!, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery( |
| o.suggestedQuery!, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer( |
| o.suggestedQueryAnswer!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswer--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer = 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer() { |
| final o = api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer < |
| 3) { |
| o.answerText = 'foo'; |
| o.faqSource = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource(); |
| o.generativeSource = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource(); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer( |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer < |
| 3) { |
| unittest.expect(o.answerText!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource( |
| o.faqSource!, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource( |
| o.generativeSource!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource = |
| 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource() { |
| final o = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource < |
| 3) { |
| o.question = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource( |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource < |
| 3) { |
| unittest.expect(o.question!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet |
| > |
| buildUnnamed94() => [ |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet(), |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet(), |
| ]; |
| |
| void checkUnnamed94( |
| core.List< |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource = |
| 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource() { |
| final o = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource < |
| 3) { |
| o.snippets = buildUnnamed94(); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource( |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource < |
| 3) { |
| checkUnnamed94(o.snippets!); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed95() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed95(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted10 = (o['x']!) as core.Map; |
| unittest.expect(casted10, unittest.hasLength(3)); |
| unittest.expect(casted10['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted10['bool'], unittest.equals(true)); |
| unittest.expect(casted10['string'], unittest.equals('foo')); |
| var casted11 = (o['y']!) as core.Map; |
| unittest.expect(casted11, unittest.hasLength(3)); |
| unittest.expect(casted11['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted11['bool'], unittest.equals(true)); |
| unittest.expect(casted11['string'], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet = |
| 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet() { |
| final o = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet < |
| 3) { |
| o.metadata = buildUnnamed95(); |
| o.text = 'foo'; |
| o.title = 'foo'; |
| o.uri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet( |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet < |
| 3) { |
| checkUnnamed95(o.metadata!); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| unittest.expect(o.uri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery = 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery() { |
| final o = api.GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery < |
| 3) { |
| o.queryText = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery( |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery < |
| 3) { |
| unittest.expect(o.queryText!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfo = 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfo |
| buildGoogleCloudDialogflowV2KnowledgeAssistDebugInfo() { |
| final o = api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfo(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfo < 3) { |
| o.datastoreResponseReason = 'foo'; |
| o.ingestedContextReferenceDebugInfo = |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo(); |
| o.knowledgeAssistBehavior = |
| buildGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior(); |
| o.queryCategorizationFailureReason = 'foo'; |
| o.queryGenerationFailureReason = 'foo'; |
| o.serviceLatency = buildGoogleCloudDialogflowV2ServiceLatency(); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2KnowledgeAssistDebugInfo( |
| api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfo < 3) { |
| unittest.expect(o.datastoreResponseReason!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo( |
| o.ingestedContextReferenceDebugInfo!, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior( |
| o.knowledgeAssistBehavior!, |
| ); |
| unittest.expect( |
| o.queryCategorizationFailureReason!, |
| unittest.equals('foo'), |
| ); |
| unittest.expect(o.queryGenerationFailureReason!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ServiceLatency(o.serviceLatency!); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfo--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior = |
| 0; |
| api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior |
| buildGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior() { |
| final o = |
| api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior < |
| 3) { |
| o.answerGenerationRewriterOn = true; |
| o.appendedSearchContextCount = 42; |
| o.conversationTranscriptHasMixedLanguages = true; |
| o.disableSyncDelivery = true; |
| o.endUserMetadataIncluded = true; |
| o.invalidItemsQuerySuggestionSkipped = true; |
| o.multipleQueriesGenerated = true; |
| o.previousQueriesIncluded = true; |
| o.primaryQueryRedactedAndReplaced = true; |
| o.queryContainedSearchContext = true; |
| o.queryGenerationAgentLanguageMismatch = true; |
| o.queryGenerationEndUserLanguageMismatch = true; |
| o.returnQueryOnly = true; |
| o.thirdPartyConnectorAllowed = true; |
| o.useCustomSafetyFilterLevel = true; |
| o.usePubsubDelivery = true; |
| o.useTranslatedMessage = true; |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior( |
| api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior < |
| 3) { |
| unittest.expect(o.answerGenerationRewriterOn!, unittest.isTrue); |
| unittest.expect(o.appendedSearchContextCount!, unittest.equals(42)); |
| unittest.expect( |
| o.conversationTranscriptHasMixedLanguages!, |
| unittest.isTrue, |
| ); |
| unittest.expect(o.disableSyncDelivery!, unittest.isTrue); |
| unittest.expect(o.endUserMetadataIncluded!, unittest.isTrue); |
| unittest.expect(o.invalidItemsQuerySuggestionSkipped!, unittest.isTrue); |
| unittest.expect(o.multipleQueriesGenerated!, unittest.isTrue); |
| unittest.expect(o.previousQueriesIncluded!, unittest.isTrue); |
| unittest.expect(o.primaryQueryRedactedAndReplaced!, unittest.isTrue); |
| unittest.expect(o.queryContainedSearchContext!, unittest.isTrue); |
| unittest.expect(o.queryGenerationAgentLanguageMismatch!, unittest.isTrue); |
| unittest.expect(o.queryGenerationEndUserLanguageMismatch!, unittest.isTrue); |
| unittest.expect(o.returnQueryOnly!, unittest.isTrue); |
| unittest.expect(o.thirdPartyConnectorAllowed!, unittest.isTrue); |
| unittest.expect(o.useCustomSafetyFilterLevel!, unittest.isTrue); |
| unittest.expect(o.usePubsubDelivery!, unittest.isTrue); |
| unittest.expect(o.useTranslatedMessage!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2KnowledgeBase = 0; |
| api.GoogleCloudDialogflowV2KnowledgeBase |
| buildGoogleCloudDialogflowV2KnowledgeBase() { |
| final o = api.GoogleCloudDialogflowV2KnowledgeBase(); |
| buildCounterGoogleCloudDialogflowV2KnowledgeBase++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeBase < 3) { |
| o.displayName = 'foo'; |
| o.languageCode = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeBase--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2KnowledgeBase( |
| api.GoogleCloudDialogflowV2KnowledgeBase o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2KnowledgeBase++; |
| if (buildCounterGoogleCloudDialogflowV2KnowledgeBase < 3) { |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2KnowledgeBase--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2AnswerRecord> buildUnnamed96() => [ |
| buildGoogleCloudDialogflowV2AnswerRecord(), |
| buildGoogleCloudDialogflowV2AnswerRecord(), |
| ]; |
| |
| void checkUnnamed96(core.List<api.GoogleCloudDialogflowV2AnswerRecord> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AnswerRecord(o[0]); |
| checkGoogleCloudDialogflowV2AnswerRecord(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListAnswerRecordsResponse = 0; |
| api.GoogleCloudDialogflowV2ListAnswerRecordsResponse |
| buildGoogleCloudDialogflowV2ListAnswerRecordsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListAnswerRecordsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListAnswerRecordsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListAnswerRecordsResponse < 3) { |
| o.answerRecords = buildUnnamed96(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListAnswerRecordsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListAnswerRecordsResponse( |
| api.GoogleCloudDialogflowV2ListAnswerRecordsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListAnswerRecordsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListAnswerRecordsResponse < 3) { |
| checkUnnamed96(o.answerRecords!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListAnswerRecordsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Context> buildUnnamed97() => [ |
| buildGoogleCloudDialogflowV2Context(), |
| buildGoogleCloudDialogflowV2Context(), |
| ]; |
| |
| void checkUnnamed97(core.List<api.GoogleCloudDialogflowV2Context> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Context(o[0]); |
| checkGoogleCloudDialogflowV2Context(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListContextsResponse = 0; |
| api.GoogleCloudDialogflowV2ListContextsResponse |
| buildGoogleCloudDialogflowV2ListContextsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListContextsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListContextsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListContextsResponse < 3) { |
| o.contexts = buildUnnamed97(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListContextsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListContextsResponse( |
| api.GoogleCloudDialogflowV2ListContextsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListContextsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListContextsResponse < 3) { |
| checkUnnamed97(o.contexts!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListContextsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ConversationDataset> buildUnnamed98() => [ |
| buildGoogleCloudDialogflowV2ConversationDataset(), |
| buildGoogleCloudDialogflowV2ConversationDataset(), |
| ]; |
| |
| void checkUnnamed98( |
| core.List<api.GoogleCloudDialogflowV2ConversationDataset> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationDataset(o[0]); |
| checkGoogleCloudDialogflowV2ConversationDataset(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListConversationDatasetsResponse = |
| 0; |
| api.GoogleCloudDialogflowV2ListConversationDatasetsResponse |
| buildGoogleCloudDialogflowV2ListConversationDatasetsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListConversationDatasetsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListConversationDatasetsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationDatasetsResponse < 3) { |
| o.conversationDatasets = buildUnnamed98(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationDatasetsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListConversationDatasetsResponse( |
| api.GoogleCloudDialogflowV2ListConversationDatasetsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListConversationDatasetsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationDatasetsResponse < 3) { |
| checkUnnamed98(o.conversationDatasets!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationDatasetsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ConversationModelEvaluation> |
| buildUnnamed99() => [ |
| buildGoogleCloudDialogflowV2ConversationModelEvaluation(), |
| buildGoogleCloudDialogflowV2ConversationModelEvaluation(), |
| ]; |
| |
| void checkUnnamed99( |
| core.List<api.GoogleCloudDialogflowV2ConversationModelEvaluation> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationModelEvaluation(o[0]); |
| checkGoogleCloudDialogflowV2ConversationModelEvaluation(o[1]); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse = 0; |
| api.GoogleCloudDialogflowV2ListConversationModelEvaluationsResponse |
| buildGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse() { |
| final o = |
| api.GoogleCloudDialogflowV2ListConversationModelEvaluationsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse < |
| 3) { |
| o.conversationModelEvaluations = buildUnnamed99(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse( |
| api.GoogleCloudDialogflowV2ListConversationModelEvaluationsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse < |
| 3) { |
| checkUnnamed99(o.conversationModelEvaluations!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ConversationModel> buildUnnamed100() => [ |
| buildGoogleCloudDialogflowV2ConversationModel(), |
| buildGoogleCloudDialogflowV2ConversationModel(), |
| ]; |
| |
| void checkUnnamed100( |
| core.List<api.GoogleCloudDialogflowV2ConversationModel> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationModel(o[0]); |
| checkGoogleCloudDialogflowV2ConversationModel(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListConversationModelsResponse = 0; |
| api.GoogleCloudDialogflowV2ListConversationModelsResponse |
| buildGoogleCloudDialogflowV2ListConversationModelsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListConversationModelsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListConversationModelsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationModelsResponse < 3) { |
| o.conversationModels = buildUnnamed100(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationModelsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListConversationModelsResponse( |
| api.GoogleCloudDialogflowV2ListConversationModelsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListConversationModelsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationModelsResponse < 3) { |
| checkUnnamed100(o.conversationModels!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationModelsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ConversationProfile> buildUnnamed101() => [ |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| ]; |
| |
| void checkUnnamed101( |
| core.List<api.GoogleCloudDialogflowV2ConversationProfile> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ConversationProfile(o[0]); |
| checkGoogleCloudDialogflowV2ConversationProfile(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListConversationProfilesResponse = |
| 0; |
| api.GoogleCloudDialogflowV2ListConversationProfilesResponse |
| buildGoogleCloudDialogflowV2ListConversationProfilesResponse() { |
| final o = api.GoogleCloudDialogflowV2ListConversationProfilesResponse(); |
| buildCounterGoogleCloudDialogflowV2ListConversationProfilesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationProfilesResponse < 3) { |
| o.conversationProfiles = buildUnnamed101(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationProfilesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListConversationProfilesResponse( |
| api.GoogleCloudDialogflowV2ListConversationProfilesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListConversationProfilesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationProfilesResponse < 3) { |
| checkUnnamed101(o.conversationProfiles!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationProfilesResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Conversation> buildUnnamed102() => [ |
| buildGoogleCloudDialogflowV2Conversation(), |
| buildGoogleCloudDialogflowV2Conversation(), |
| ]; |
| |
| void checkUnnamed102(core.List<api.GoogleCloudDialogflowV2Conversation> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Conversation(o[0]); |
| checkGoogleCloudDialogflowV2Conversation(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListConversationsResponse = 0; |
| api.GoogleCloudDialogflowV2ListConversationsResponse |
| buildGoogleCloudDialogflowV2ListConversationsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListConversationsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListConversationsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationsResponse < 3) { |
| o.conversations = buildUnnamed102(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListConversationsResponse( |
| api.GoogleCloudDialogflowV2ListConversationsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListConversationsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListConversationsResponse < 3) { |
| checkUnnamed102(o.conversations!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListConversationsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Document> buildUnnamed103() => [ |
| buildGoogleCloudDialogflowV2Document(), |
| buildGoogleCloudDialogflowV2Document(), |
| ]; |
| |
| void checkUnnamed103(core.List<api.GoogleCloudDialogflowV2Document> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Document(o[0]); |
| checkGoogleCloudDialogflowV2Document(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListDocumentsResponse = 0; |
| api.GoogleCloudDialogflowV2ListDocumentsResponse |
| buildGoogleCloudDialogflowV2ListDocumentsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListDocumentsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListDocumentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListDocumentsResponse < 3) { |
| o.documents = buildUnnamed103(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListDocumentsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListDocumentsResponse( |
| api.GoogleCloudDialogflowV2ListDocumentsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListDocumentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListDocumentsResponse < 3) { |
| checkUnnamed103(o.documents!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListDocumentsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2EntityType> buildUnnamed104() => [ |
| buildGoogleCloudDialogflowV2EntityType(), |
| buildGoogleCloudDialogflowV2EntityType(), |
| ]; |
| |
| void checkUnnamed104(core.List<api.GoogleCloudDialogflowV2EntityType> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2EntityType(o[0]); |
| checkGoogleCloudDialogflowV2EntityType(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListEntityTypesResponse = 0; |
| api.GoogleCloudDialogflowV2ListEntityTypesResponse |
| buildGoogleCloudDialogflowV2ListEntityTypesResponse() { |
| final o = api.GoogleCloudDialogflowV2ListEntityTypesResponse(); |
| buildCounterGoogleCloudDialogflowV2ListEntityTypesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListEntityTypesResponse < 3) { |
| o.entityTypes = buildUnnamed104(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListEntityTypesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListEntityTypesResponse( |
| api.GoogleCloudDialogflowV2ListEntityTypesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListEntityTypesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListEntityTypesResponse < 3) { |
| checkUnnamed104(o.entityTypes!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListEntityTypesResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Environment> buildUnnamed105() => [ |
| buildGoogleCloudDialogflowV2Environment(), |
| buildGoogleCloudDialogflowV2Environment(), |
| ]; |
| |
| void checkUnnamed105(core.List<api.GoogleCloudDialogflowV2Environment> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Environment(o[0]); |
| checkGoogleCloudDialogflowV2Environment(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListEnvironmentsResponse = 0; |
| api.GoogleCloudDialogflowV2ListEnvironmentsResponse |
| buildGoogleCloudDialogflowV2ListEnvironmentsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListEnvironmentsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListEnvironmentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListEnvironmentsResponse < 3) { |
| o.environments = buildUnnamed105(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListEnvironmentsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListEnvironmentsResponse( |
| api.GoogleCloudDialogflowV2ListEnvironmentsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListEnvironmentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListEnvironmentsResponse < 3) { |
| checkUnnamed105(o.environments!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListEnvironmentsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2GeneratorEvaluation> buildUnnamed106() => [ |
| buildGoogleCloudDialogflowV2GeneratorEvaluation(), |
| buildGoogleCloudDialogflowV2GeneratorEvaluation(), |
| ]; |
| |
| void checkUnnamed106( |
| core.List<api.GoogleCloudDialogflowV2GeneratorEvaluation> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2GeneratorEvaluation(o[0]); |
| checkGoogleCloudDialogflowV2GeneratorEvaluation(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse = |
| 0; |
| api.GoogleCloudDialogflowV2ListGeneratorEvaluationsResponse |
| buildGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListGeneratorEvaluationsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse < 3) { |
| o.generatorEvaluations = buildUnnamed106(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse( |
| api.GoogleCloudDialogflowV2ListGeneratorEvaluationsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse < 3) { |
| checkUnnamed106(o.generatorEvaluations!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Generator> buildUnnamed107() => [ |
| buildGoogleCloudDialogflowV2Generator(), |
| buildGoogleCloudDialogflowV2Generator(), |
| ]; |
| |
| void checkUnnamed107(core.List<api.GoogleCloudDialogflowV2Generator> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Generator(o[0]); |
| checkGoogleCloudDialogflowV2Generator(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListGeneratorsResponse = 0; |
| api.GoogleCloudDialogflowV2ListGeneratorsResponse |
| buildGoogleCloudDialogflowV2ListGeneratorsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListGeneratorsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListGeneratorsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListGeneratorsResponse < 3) { |
| o.generators = buildUnnamed107(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListGeneratorsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListGeneratorsResponse( |
| api.GoogleCloudDialogflowV2ListGeneratorsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListGeneratorsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListGeneratorsResponse < 3) { |
| checkUnnamed107(o.generators!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListGeneratorsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Intent> buildUnnamed108() => [ |
| buildGoogleCloudDialogflowV2Intent(), |
| buildGoogleCloudDialogflowV2Intent(), |
| ]; |
| |
| void checkUnnamed108(core.List<api.GoogleCloudDialogflowV2Intent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Intent(o[0]); |
| checkGoogleCloudDialogflowV2Intent(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListIntentsResponse = 0; |
| api.GoogleCloudDialogflowV2ListIntentsResponse |
| buildGoogleCloudDialogflowV2ListIntentsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListIntentsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListIntentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListIntentsResponse < 3) { |
| o.intents = buildUnnamed108(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListIntentsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListIntentsResponse( |
| api.GoogleCloudDialogflowV2ListIntentsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListIntentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListIntentsResponse < 3) { |
| checkUnnamed108(o.intents!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListIntentsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2KnowledgeBase> buildUnnamed109() => [ |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ]; |
| |
| void checkUnnamed109(core.List<api.GoogleCloudDialogflowV2KnowledgeBase> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2KnowledgeBase(o[0]); |
| checkGoogleCloudDialogflowV2KnowledgeBase(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListKnowledgeBasesResponse = 0; |
| api.GoogleCloudDialogflowV2ListKnowledgeBasesResponse |
| buildGoogleCloudDialogflowV2ListKnowledgeBasesResponse() { |
| final o = api.GoogleCloudDialogflowV2ListKnowledgeBasesResponse(); |
| buildCounterGoogleCloudDialogflowV2ListKnowledgeBasesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListKnowledgeBasesResponse < 3) { |
| o.knowledgeBases = buildUnnamed109(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListKnowledgeBasesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListKnowledgeBasesResponse( |
| api.GoogleCloudDialogflowV2ListKnowledgeBasesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListKnowledgeBasesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListKnowledgeBasesResponse < 3) { |
| checkUnnamed109(o.knowledgeBases!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListKnowledgeBasesResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Message> buildUnnamed110() => [ |
| buildGoogleCloudDialogflowV2Message(), |
| buildGoogleCloudDialogflowV2Message(), |
| ]; |
| |
| void checkUnnamed110(core.List<api.GoogleCloudDialogflowV2Message> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Message(o[0]); |
| checkGoogleCloudDialogflowV2Message(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListMessagesResponse = 0; |
| api.GoogleCloudDialogflowV2ListMessagesResponse |
| buildGoogleCloudDialogflowV2ListMessagesResponse() { |
| final o = api.GoogleCloudDialogflowV2ListMessagesResponse(); |
| buildCounterGoogleCloudDialogflowV2ListMessagesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListMessagesResponse < 3) { |
| o.messages = buildUnnamed110(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ListMessagesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListMessagesResponse( |
| api.GoogleCloudDialogflowV2ListMessagesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListMessagesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListMessagesResponse < 3) { |
| checkUnnamed110(o.messages!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ListMessagesResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Participant> buildUnnamed111() => [ |
| buildGoogleCloudDialogflowV2Participant(), |
| buildGoogleCloudDialogflowV2Participant(), |
| ]; |
| |
| void checkUnnamed111(core.List<api.GoogleCloudDialogflowV2Participant> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Participant(o[0]); |
| checkGoogleCloudDialogflowV2Participant(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListParticipantsResponse = 0; |
| api.GoogleCloudDialogflowV2ListParticipantsResponse |
| buildGoogleCloudDialogflowV2ListParticipantsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListParticipantsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListParticipantsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListParticipantsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.participants = buildUnnamed111(); |
| } |
| buildCounterGoogleCloudDialogflowV2ListParticipantsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListParticipantsResponse( |
| api.GoogleCloudDialogflowV2ListParticipantsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListParticipantsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListParticipantsResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed111(o.participants!); |
| } |
| buildCounterGoogleCloudDialogflowV2ListParticipantsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SessionEntityType> buildUnnamed112() => [ |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ]; |
| |
| void checkUnnamed112( |
| core.List<api.GoogleCloudDialogflowV2SessionEntityType> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SessionEntityType(o[0]); |
| checkGoogleCloudDialogflowV2SessionEntityType(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListSessionEntityTypesResponse = 0; |
| api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse |
| buildGoogleCloudDialogflowV2ListSessionEntityTypesResponse() { |
| final o = api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse(); |
| buildCounterGoogleCloudDialogflowV2ListSessionEntityTypesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListSessionEntityTypesResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.sessionEntityTypes = buildUnnamed112(); |
| } |
| buildCounterGoogleCloudDialogflowV2ListSessionEntityTypesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListSessionEntityTypesResponse( |
| api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListSessionEntityTypesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListSessionEntityTypesResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed112(o.sessionEntityTypes!); |
| } |
| buildCounterGoogleCloudDialogflowV2ListSessionEntityTypesResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SipTrunk> buildUnnamed113() => [ |
| buildGoogleCloudDialogflowV2SipTrunk(), |
| buildGoogleCloudDialogflowV2SipTrunk(), |
| ]; |
| |
| void checkUnnamed113(core.List<api.GoogleCloudDialogflowV2SipTrunk> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SipTrunk(o[0]); |
| checkGoogleCloudDialogflowV2SipTrunk(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListSipTrunksResponse = 0; |
| api.GoogleCloudDialogflowV2ListSipTrunksResponse |
| buildGoogleCloudDialogflowV2ListSipTrunksResponse() { |
| final o = api.GoogleCloudDialogflowV2ListSipTrunksResponse(); |
| buildCounterGoogleCloudDialogflowV2ListSipTrunksResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListSipTrunksResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.sipTrunks = buildUnnamed113(); |
| } |
| buildCounterGoogleCloudDialogflowV2ListSipTrunksResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListSipTrunksResponse( |
| api.GoogleCloudDialogflowV2ListSipTrunksResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListSipTrunksResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListSipTrunksResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed113(o.sipTrunks!); |
| } |
| buildCounterGoogleCloudDialogflowV2ListSipTrunksResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Tool> buildUnnamed114() => [ |
| buildGoogleCloudDialogflowV2Tool(), |
| buildGoogleCloudDialogflowV2Tool(), |
| ]; |
| |
| void checkUnnamed114(core.List<api.GoogleCloudDialogflowV2Tool> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Tool(o[0]); |
| checkGoogleCloudDialogflowV2Tool(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListToolsResponse = 0; |
| api.GoogleCloudDialogflowV2ListToolsResponse |
| buildGoogleCloudDialogflowV2ListToolsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListToolsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListToolsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListToolsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.tools = buildUnnamed114(); |
| } |
| buildCounterGoogleCloudDialogflowV2ListToolsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListToolsResponse( |
| api.GoogleCloudDialogflowV2ListToolsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListToolsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListToolsResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed114(o.tools!); |
| } |
| buildCounterGoogleCloudDialogflowV2ListToolsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Version> buildUnnamed115() => [ |
| buildGoogleCloudDialogflowV2Version(), |
| buildGoogleCloudDialogflowV2Version(), |
| ]; |
| |
| void checkUnnamed115(core.List<api.GoogleCloudDialogflowV2Version> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Version(o[0]); |
| checkGoogleCloudDialogflowV2Version(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ListVersionsResponse = 0; |
| api.GoogleCloudDialogflowV2ListVersionsResponse |
| buildGoogleCloudDialogflowV2ListVersionsResponse() { |
| final o = api.GoogleCloudDialogflowV2ListVersionsResponse(); |
| buildCounterGoogleCloudDialogflowV2ListVersionsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListVersionsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.versions = buildUnnamed115(); |
| } |
| buildCounterGoogleCloudDialogflowV2ListVersionsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ListVersionsResponse( |
| api.GoogleCloudDialogflowV2ListVersionsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ListVersionsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2ListVersionsResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed115(o.versions!); |
| } |
| buildCounterGoogleCloudDialogflowV2ListVersionsResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2LoggingConfig = 0; |
| api.GoogleCloudDialogflowV2LoggingConfig |
| buildGoogleCloudDialogflowV2LoggingConfig() { |
| final o = api.GoogleCloudDialogflowV2LoggingConfig(); |
| buildCounterGoogleCloudDialogflowV2LoggingConfig++; |
| if (buildCounterGoogleCloudDialogflowV2LoggingConfig < 3) { |
| o.enableStackdriverLogging = true; |
| } |
| buildCounterGoogleCloudDialogflowV2LoggingConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2LoggingConfig( |
| api.GoogleCloudDialogflowV2LoggingConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2LoggingConfig++; |
| if (buildCounterGoogleCloudDialogflowV2LoggingConfig < 3) { |
| unittest.expect(o.enableStackdriverLogging!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2LoggingConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Message = 0; |
| api.GoogleCloudDialogflowV2Message buildGoogleCloudDialogflowV2Message() { |
| final o = api.GoogleCloudDialogflowV2Message(); |
| buildCounterGoogleCloudDialogflowV2Message++; |
| if (buildCounterGoogleCloudDialogflowV2Message < 3) { |
| o.content = 'foo'; |
| o.createTime = 'foo'; |
| o.languageCode = 'foo'; |
| o.messageAnnotation = buildGoogleCloudDialogflowV2MessageAnnotation(); |
| o.name = 'foo'; |
| o.participant = 'foo'; |
| o.participantRole = 'foo'; |
| o.sendTime = 'foo'; |
| o.sentimentAnalysis = buildGoogleCloudDialogflowV2SentimentAnalysisResult(); |
| } |
| buildCounterGoogleCloudDialogflowV2Message--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Message(api.GoogleCloudDialogflowV2Message o) { |
| buildCounterGoogleCloudDialogflowV2Message++; |
| if (buildCounterGoogleCloudDialogflowV2Message < 3) { |
| unittest.expect(o.content!, unittest.equals('foo')); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2MessageAnnotation(o.messageAnnotation!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.participant!, unittest.equals('foo')); |
| unittest.expect(o.participantRole!, unittest.equals('foo')); |
| unittest.expect(o.sendTime!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SentimentAnalysisResult(o.sentimentAnalysis!); |
| } |
| buildCounterGoogleCloudDialogflowV2Message--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2AnnotatedMessagePart> buildUnnamed116() => |
| [ |
| buildGoogleCloudDialogflowV2AnnotatedMessagePart(), |
| buildGoogleCloudDialogflowV2AnnotatedMessagePart(), |
| ]; |
| |
| void checkUnnamed116( |
| core.List<api.GoogleCloudDialogflowV2AnnotatedMessagePart> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2AnnotatedMessagePart(o[0]); |
| checkGoogleCloudDialogflowV2AnnotatedMessagePart(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2MessageAnnotation = 0; |
| api.GoogleCloudDialogflowV2MessageAnnotation |
| buildGoogleCloudDialogflowV2MessageAnnotation() { |
| final o = api.GoogleCloudDialogflowV2MessageAnnotation(); |
| buildCounterGoogleCloudDialogflowV2MessageAnnotation++; |
| if (buildCounterGoogleCloudDialogflowV2MessageAnnotation < 3) { |
| o.containEntities = true; |
| o.parts = buildUnnamed116(); |
| } |
| buildCounterGoogleCloudDialogflowV2MessageAnnotation--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2MessageAnnotation( |
| api.GoogleCloudDialogflowV2MessageAnnotation o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2MessageAnnotation++; |
| if (buildCounterGoogleCloudDialogflowV2MessageAnnotation < 3) { |
| unittest.expect(o.containEntities!, unittest.isTrue); |
| checkUnnamed116(o.parts!); |
| } |
| buildCounterGoogleCloudDialogflowV2MessageAnnotation--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2MessageEntry = 0; |
| api.GoogleCloudDialogflowV2MessageEntry |
| buildGoogleCloudDialogflowV2MessageEntry() { |
| final o = api.GoogleCloudDialogflowV2MessageEntry(); |
| buildCounterGoogleCloudDialogflowV2MessageEntry++; |
| if (buildCounterGoogleCloudDialogflowV2MessageEntry < 3) { |
| o.createTime = 'foo'; |
| o.languageCode = 'foo'; |
| o.role = 'foo'; |
| o.text = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2MessageEntry--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2MessageEntry( |
| api.GoogleCloudDialogflowV2MessageEntry o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2MessageEntry++; |
| if (buildCounterGoogleCloudDialogflowV2MessageEntry < 3) { |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.role!, unittest.equals('foo')); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2MessageEntry--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2NotificationConfig = 0; |
| api.GoogleCloudDialogflowV2NotificationConfig |
| buildGoogleCloudDialogflowV2NotificationConfig() { |
| final o = api.GoogleCloudDialogflowV2NotificationConfig(); |
| buildCounterGoogleCloudDialogflowV2NotificationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2NotificationConfig < 3) { |
| o.messageFormat = 'foo'; |
| o.topic = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2NotificationConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2NotificationConfig( |
| api.GoogleCloudDialogflowV2NotificationConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2NotificationConfig++; |
| if (buildCounterGoogleCloudDialogflowV2NotificationConfig < 3) { |
| unittest.expect(o.messageFormat!, unittest.equals('foo')); |
| unittest.expect(o.topic!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2NotificationConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2OutputAudio = 0; |
| api.GoogleCloudDialogflowV2OutputAudio |
| buildGoogleCloudDialogflowV2OutputAudio() { |
| final o = api.GoogleCloudDialogflowV2OutputAudio(); |
| buildCounterGoogleCloudDialogflowV2OutputAudio++; |
| if (buildCounterGoogleCloudDialogflowV2OutputAudio < 3) { |
| o.audio = 'foo'; |
| o.config = buildGoogleCloudDialogflowV2OutputAudioConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2OutputAudio--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2OutputAudio( |
| api.GoogleCloudDialogflowV2OutputAudio o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2OutputAudio++; |
| if (buildCounterGoogleCloudDialogflowV2OutputAudio < 3) { |
| unittest.expect(o.audio!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2OutputAudioConfig(o.config!); |
| } |
| buildCounterGoogleCloudDialogflowV2OutputAudio--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2OutputAudioConfig = 0; |
| api.GoogleCloudDialogflowV2OutputAudioConfig |
| buildGoogleCloudDialogflowV2OutputAudioConfig() { |
| final o = api.GoogleCloudDialogflowV2OutputAudioConfig(); |
| buildCounterGoogleCloudDialogflowV2OutputAudioConfig++; |
| if (buildCounterGoogleCloudDialogflowV2OutputAudioConfig < 3) { |
| o.audioEncoding = 'foo'; |
| o.sampleRateHertz = 42; |
| o.synthesizeSpeechConfig = |
| buildGoogleCloudDialogflowV2SynthesizeSpeechConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2OutputAudioConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2OutputAudioConfig( |
| api.GoogleCloudDialogflowV2OutputAudioConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2OutputAudioConfig++; |
| if (buildCounterGoogleCloudDialogflowV2OutputAudioConfig < 3) { |
| unittest.expect(o.audioEncoding!, unittest.equals('foo')); |
| unittest.expect(o.sampleRateHertz!, unittest.equals(42)); |
| checkGoogleCloudDialogflowV2SynthesizeSpeechConfig( |
| o.synthesizeSpeechConfig!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2OutputAudioConfig--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed117() => { |
| 'x': 'foo', |
| 'y': 'foo', |
| }; |
| |
| void checkUnnamed117(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Participant = 0; |
| api.GoogleCloudDialogflowV2Participant |
| buildGoogleCloudDialogflowV2Participant() { |
| final o = api.GoogleCloudDialogflowV2Participant(); |
| buildCounterGoogleCloudDialogflowV2Participant++; |
| if (buildCounterGoogleCloudDialogflowV2Participant < 3) { |
| o.agentDesktopSource = 'foo'; |
| o.documentsMetadataFilters = buildUnnamed117(); |
| o.name = 'foo'; |
| o.obfuscatedExternalUserId = 'foo'; |
| o.role = 'foo'; |
| o.sipRecordingMediaLabel = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Participant--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Participant( |
| api.GoogleCloudDialogflowV2Participant o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Participant++; |
| if (buildCounterGoogleCloudDialogflowV2Participant < 3) { |
| unittest.expect(o.agentDesktopSource!, unittest.equals('foo')); |
| checkUnnamed117(o.documentsMetadataFilters!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.obfuscatedExternalUserId!, unittest.equals('foo')); |
| unittest.expect(o.role!, unittest.equals('foo')); |
| unittest.expect(o.sipRecordingMediaLabel!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Participant--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2QueryInput = 0; |
| api.GoogleCloudDialogflowV2QueryInput buildGoogleCloudDialogflowV2QueryInput() { |
| final o = api.GoogleCloudDialogflowV2QueryInput(); |
| buildCounterGoogleCloudDialogflowV2QueryInput++; |
| if (buildCounterGoogleCloudDialogflowV2QueryInput < 3) { |
| o.audioConfig = buildGoogleCloudDialogflowV2InputAudioConfig(); |
| o.event = buildGoogleCloudDialogflowV2EventInput(); |
| o.text = buildGoogleCloudDialogflowV2TextInput(); |
| } |
| buildCounterGoogleCloudDialogflowV2QueryInput--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2QueryInput( |
| api.GoogleCloudDialogflowV2QueryInput o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2QueryInput++; |
| if (buildCounterGoogleCloudDialogflowV2QueryInput < 3) { |
| checkGoogleCloudDialogflowV2InputAudioConfig(o.audioConfig!); |
| checkGoogleCloudDialogflowV2EventInput(o.event!); |
| checkGoogleCloudDialogflowV2TextInput(o.text!); |
| } |
| buildCounterGoogleCloudDialogflowV2QueryInput--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Context> buildUnnamed118() => [ |
| buildGoogleCloudDialogflowV2Context(), |
| buildGoogleCloudDialogflowV2Context(), |
| ]; |
| |
| void checkUnnamed118(core.List<api.GoogleCloudDialogflowV2Context> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Context(o[0]); |
| checkGoogleCloudDialogflowV2Context(o[1]); |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed119() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed119(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted12 = (o['x']!) as core.Map; |
| unittest.expect(casted12, unittest.hasLength(3)); |
| unittest.expect(casted12['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted12['bool'], unittest.equals(true)); |
| unittest.expect(casted12['string'], unittest.equals('foo')); |
| var casted13 = (o['y']!) as core.Map; |
| unittest.expect(casted13, unittest.hasLength(3)); |
| unittest.expect(casted13['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted13['bool'], unittest.equals(true)); |
| unittest.expect(casted13['string'], unittest.equals('foo')); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SessionEntityType> buildUnnamed120() => [ |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ]; |
| |
| void checkUnnamed120( |
| core.List<api.GoogleCloudDialogflowV2SessionEntityType> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SessionEntityType(o[0]); |
| checkGoogleCloudDialogflowV2SessionEntityType(o[1]); |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed121() => { |
| 'x': 'foo', |
| 'y': 'foo', |
| }; |
| |
| void checkUnnamed121(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2QueryParameters = 0; |
| api.GoogleCloudDialogflowV2QueryParameters |
| buildGoogleCloudDialogflowV2QueryParameters() { |
| final o = api.GoogleCloudDialogflowV2QueryParameters(); |
| buildCounterGoogleCloudDialogflowV2QueryParameters++; |
| if (buildCounterGoogleCloudDialogflowV2QueryParameters < 3) { |
| o.contexts = buildUnnamed118(); |
| o.geoLocation = buildGoogleTypeLatLng(); |
| o.payload = buildUnnamed119(); |
| o.platform = 'foo'; |
| o.resetContexts = true; |
| o.sentimentAnalysisRequestConfig = |
| buildGoogleCloudDialogflowV2SentimentAnalysisRequestConfig(); |
| o.sessionEntityTypes = buildUnnamed120(); |
| o.timeZone = 'foo'; |
| o.webhookHeaders = buildUnnamed121(); |
| } |
| buildCounterGoogleCloudDialogflowV2QueryParameters--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2QueryParameters( |
| api.GoogleCloudDialogflowV2QueryParameters o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2QueryParameters++; |
| if (buildCounterGoogleCloudDialogflowV2QueryParameters < 3) { |
| checkUnnamed118(o.contexts!); |
| checkGoogleTypeLatLng(o.geoLocation!); |
| checkUnnamed119(o.payload!); |
| unittest.expect(o.platform!, unittest.equals('foo')); |
| unittest.expect(o.resetContexts!, unittest.isTrue); |
| checkGoogleCloudDialogflowV2SentimentAnalysisRequestConfig( |
| o.sentimentAnalysisRequestConfig!, |
| ); |
| checkUnnamed120(o.sessionEntityTypes!); |
| unittest.expect(o.timeZone!, unittest.equals('foo')); |
| checkUnnamed121(o.webhookHeaders!); |
| } |
| buildCounterGoogleCloudDialogflowV2QueryParameters--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed122() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed122(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted14 = (o['x']!) as core.Map; |
| unittest.expect(casted14, unittest.hasLength(3)); |
| unittest.expect(casted14['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted14['bool'], unittest.equals(true)); |
| unittest.expect(casted14['string'], unittest.equals('foo')); |
| var casted15 = (o['y']!) as core.Map; |
| unittest.expect(casted15, unittest.hasLength(3)); |
| unittest.expect(casted15['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted15['bool'], unittest.equals(true)); |
| unittest.expect(casted15['string'], unittest.equals('foo')); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2IntentMessage> buildUnnamed123() => [ |
| buildGoogleCloudDialogflowV2IntentMessage(), |
| buildGoogleCloudDialogflowV2IntentMessage(), |
| ]; |
| |
| void checkUnnamed123(core.List<api.GoogleCloudDialogflowV2IntentMessage> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2IntentMessage(o[0]); |
| checkGoogleCloudDialogflowV2IntentMessage(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Context> buildUnnamed124() => [ |
| buildGoogleCloudDialogflowV2Context(), |
| buildGoogleCloudDialogflowV2Context(), |
| ]; |
| |
| void checkUnnamed124(core.List<api.GoogleCloudDialogflowV2Context> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Context(o[0]); |
| checkGoogleCloudDialogflowV2Context(o[1]); |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed125() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed125(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted16 = (o['x']!) as core.Map; |
| unittest.expect(casted16, unittest.hasLength(3)); |
| unittest.expect(casted16['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted16['bool'], unittest.equals(true)); |
| unittest.expect(casted16['string'], unittest.equals('foo')); |
| var casted17 = (o['y']!) as core.Map; |
| unittest.expect(casted17, unittest.hasLength(3)); |
| unittest.expect(casted17['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted17['bool'], unittest.equals(true)); |
| unittest.expect(casted17['string'], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed126() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed126(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted18 = (o['x']!) as core.Map; |
| unittest.expect(casted18, unittest.hasLength(3)); |
| unittest.expect(casted18['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted18['bool'], unittest.equals(true)); |
| unittest.expect(casted18['string'], unittest.equals('foo')); |
| var casted19 = (o['y']!) as core.Map; |
| unittest.expect(casted19, unittest.hasLength(3)); |
| unittest.expect(casted19['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted19['bool'], unittest.equals(true)); |
| unittest.expect(casted19['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2QueryResult = 0; |
| api.GoogleCloudDialogflowV2QueryResult |
| buildGoogleCloudDialogflowV2QueryResult() { |
| final o = api.GoogleCloudDialogflowV2QueryResult(); |
| buildCounterGoogleCloudDialogflowV2QueryResult++; |
| if (buildCounterGoogleCloudDialogflowV2QueryResult < 3) { |
| o.action = 'foo'; |
| o.allRequiredParamsPresent = true; |
| o.cancelsSlotFilling = true; |
| o.diagnosticInfo = buildUnnamed122(); |
| o.fulfillmentMessages = buildUnnamed123(); |
| o.fulfillmentText = 'foo'; |
| o.intent = buildGoogleCloudDialogflowV2Intent(); |
| o.intentDetectionConfidence = 42.0; |
| o.languageCode = 'foo'; |
| o.outputContexts = buildUnnamed124(); |
| o.parameters = buildUnnamed125(); |
| o.queryText = 'foo'; |
| o.sentimentAnalysisResult = |
| buildGoogleCloudDialogflowV2SentimentAnalysisResult(); |
| o.speechRecognitionConfidence = 42.0; |
| o.webhookPayload = buildUnnamed126(); |
| o.webhookSource = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2QueryResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2QueryResult( |
| api.GoogleCloudDialogflowV2QueryResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2QueryResult++; |
| if (buildCounterGoogleCloudDialogflowV2QueryResult < 3) { |
| unittest.expect(o.action!, unittest.equals('foo')); |
| unittest.expect(o.allRequiredParamsPresent!, unittest.isTrue); |
| unittest.expect(o.cancelsSlotFilling!, unittest.isTrue); |
| checkUnnamed122(o.diagnosticInfo!); |
| checkUnnamed123(o.fulfillmentMessages!); |
| unittest.expect(o.fulfillmentText!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2Intent(o.intent!); |
| unittest.expect(o.intentDetectionConfidence!, unittest.equals(42.0)); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| checkUnnamed124(o.outputContexts!); |
| checkUnnamed125(o.parameters!); |
| unittest.expect(o.queryText!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SentimentAnalysisResult( |
| o.sentimentAnalysisResult!, |
| ); |
| unittest.expect(o.speechRecognitionConfidence!, unittest.equals(42.0)); |
| checkUnnamed126(o.webhookPayload!); |
| unittest.expect(o.webhookSource!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2QueryResult--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig> |
| buildUnnamed127() => [ |
| buildGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig(), |
| buildGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig(), |
| ]; |
| |
| void checkUnnamed127( |
| core.List<api.GoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig(o[0]); |
| checkGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2RaiSettings = 0; |
| api.GoogleCloudDialogflowV2RaiSettings |
| buildGoogleCloudDialogflowV2RaiSettings() { |
| final o = api.GoogleCloudDialogflowV2RaiSettings(); |
| buildCounterGoogleCloudDialogflowV2RaiSettings++; |
| if (buildCounterGoogleCloudDialogflowV2RaiSettings < 3) { |
| o.raiCategoryConfigs = buildUnnamed127(); |
| } |
| buildCounterGoogleCloudDialogflowV2RaiSettings--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2RaiSettings( |
| api.GoogleCloudDialogflowV2RaiSettings o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2RaiSettings++; |
| if (buildCounterGoogleCloudDialogflowV2RaiSettings < 3) { |
| checkUnnamed127(o.raiCategoryConfigs!); |
| } |
| buildCounterGoogleCloudDialogflowV2RaiSettings--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig = 0; |
| api.GoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig |
| buildGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig() { |
| final o = api.GoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig(); |
| buildCounterGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig++; |
| if (buildCounterGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig < 3) { |
| o.category = 'foo'; |
| o.sensitivityLevel = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig( |
| api.GoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig++; |
| if (buildCounterGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig < 3) { |
| unittest.expect(o.category!, unittest.equals('foo')); |
| unittest.expect(o.sensitivityLevel!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ReloadDocumentRequest = 0; |
| api.GoogleCloudDialogflowV2ReloadDocumentRequest |
| buildGoogleCloudDialogflowV2ReloadDocumentRequest() { |
| final o = api.GoogleCloudDialogflowV2ReloadDocumentRequest(); |
| buildCounterGoogleCloudDialogflowV2ReloadDocumentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ReloadDocumentRequest < 3) { |
| o.contentUri = 'foo'; |
| o.importGcsCustomMetadata = true; |
| o.smartMessagingPartialUpdate = true; |
| } |
| buildCounterGoogleCloudDialogflowV2ReloadDocumentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ReloadDocumentRequest( |
| api.GoogleCloudDialogflowV2ReloadDocumentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ReloadDocumentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2ReloadDocumentRequest < 3) { |
| unittest.expect(o.contentUri!, unittest.equals('foo')); |
| unittest.expect(o.importGcsCustomMetadata!, unittest.isTrue); |
| unittest.expect(o.smartMessagingPartialUpdate!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2ReloadDocumentRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2RestoreAgentRequest = 0; |
| api.GoogleCloudDialogflowV2RestoreAgentRequest |
| buildGoogleCloudDialogflowV2RestoreAgentRequest() { |
| final o = api.GoogleCloudDialogflowV2RestoreAgentRequest(); |
| buildCounterGoogleCloudDialogflowV2RestoreAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2RestoreAgentRequest < 3) { |
| o.agentContent = 'foo'; |
| o.agentUri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2RestoreAgentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2RestoreAgentRequest( |
| api.GoogleCloudDialogflowV2RestoreAgentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2RestoreAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2RestoreAgentRequest < 3) { |
| unittest.expect(o.agentContent!, unittest.equals('foo')); |
| unittest.expect(o.agentUri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2RestoreAgentRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Agent> buildUnnamed128() => [ |
| buildGoogleCloudDialogflowV2Agent(), |
| buildGoogleCloudDialogflowV2Agent(), |
| ]; |
| |
| void checkUnnamed128(core.List<api.GoogleCloudDialogflowV2Agent> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Agent(o[0]); |
| checkGoogleCloudDialogflowV2Agent(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SearchAgentsResponse = 0; |
| api.GoogleCloudDialogflowV2SearchAgentsResponse |
| buildGoogleCloudDialogflowV2SearchAgentsResponse() { |
| final o = api.GoogleCloudDialogflowV2SearchAgentsResponse(); |
| buildCounterGoogleCloudDialogflowV2SearchAgentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SearchAgentsResponse < 3) { |
| o.agents = buildUnnamed128(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchAgentsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchAgentsResponse( |
| api.GoogleCloudDialogflowV2SearchAgentsResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchAgentsResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SearchAgentsResponse < 3) { |
| checkUnnamed128(o.agents!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchAgentsResponse--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource> |
| buildUnnamed129() => [ |
| buildGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource(), |
| buildGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource(), |
| ]; |
| |
| void checkUnnamed129( |
| core.List<api.GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource(o[0]); |
| checkGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswer = 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeAnswer |
| buildGoogleCloudDialogflowV2SearchKnowledgeAnswer() { |
| final o = api.GoogleCloudDialogflowV2SearchKnowledgeAnswer(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswer < 3) { |
| o.answer = 'foo'; |
| o.answerRecord = 'foo'; |
| o.answerSources = buildUnnamed129(); |
| o.answerType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswer--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeAnswer( |
| api.GoogleCloudDialogflowV2SearchKnowledgeAnswer o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswer < 3) { |
| unittest.expect(o.answer!, unittest.equals('foo')); |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| checkUnnamed129(o.answerSources!); |
| unittest.expect(o.answerType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswer--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed130() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed130(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted20 = (o['x']!) as core.Map; |
| unittest.expect(casted20, unittest.hasLength(3)); |
| unittest.expect(casted20['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted20['bool'], unittest.equals(true)); |
| unittest.expect(casted20['string'], unittest.equals('foo')); |
| var casted21 = (o['y']!) as core.Map; |
| unittest.expect(casted21, unittest.hasLength(3)); |
| unittest.expect(casted21['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted21['bool'], unittest.equals(true)); |
| unittest.expect(casted21['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource |
| buildGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource() { |
| final o = api.GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource < |
| 3) { |
| o.metadata = buildUnnamed130(); |
| o.snippet = 'foo'; |
| o.title = 'foo'; |
| o.uri = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource( |
| api.GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource < |
| 3) { |
| checkUnnamed130(o.metadata!); |
| unittest.expect(o.snippet!, unittest.equals('foo')); |
| unittest.expect(o.title!, unittest.equals('foo')); |
| unittest.expect(o.uri!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfo = 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfo |
| buildGoogleCloudDialogflowV2SearchKnowledgeDebugInfo() { |
| final o = api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfo(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfo < 3) { |
| o.datastoreResponseReason = 'foo'; |
| o.ingestedContextReferenceDebugInfo = |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo(); |
| o.searchKnowledgeBehavior = |
| buildGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior(); |
| o.serviceLatency = buildGoogleCloudDialogflowV2ServiceLatency(); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfo--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeDebugInfo( |
| api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfo o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfo++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfo < 3) { |
| unittest.expect(o.datastoreResponseReason!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo( |
| o.ingestedContextReferenceDebugInfo!, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior( |
| o.searchKnowledgeBehavior!, |
| ); |
| checkGoogleCloudDialogflowV2ServiceLatency(o.serviceLatency!); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfo--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior |
| buildGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior() { |
| final o = |
| api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior < |
| 3) { |
| o.answerGenerationRewriterOn = true; |
| o.endUserMetadataIncluded = true; |
| o.thirdPartyConnectorAllowed = true; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior( |
| api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior < |
| 3) { |
| unittest.expect(o.answerGenerationRewriterOn!, unittest.isTrue); |
| unittest.expect(o.endUserMetadataIncluded!, unittest.isTrue); |
| unittest.expect(o.thirdPartyConnectorAllowed!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed131() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed131(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted22 = (o['x']!) as core.Map; |
| unittest.expect(casted22, unittest.hasLength(3)); |
| unittest.expect(casted22['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted22['bool'], unittest.equals(true)); |
| unittest.expect(casted22['string'], unittest.equals('foo')); |
| var casted23 = (o['y']!) as core.Map; |
| unittest.expect(casted23, unittest.hasLength(3)); |
| unittest.expect(casted23['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted23['bool'], unittest.equals(true)); |
| unittest.expect(casted23['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequest = 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequest |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequest() { |
| final o = api.GoogleCloudDialogflowV2SearchKnowledgeRequest(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequest < 3) { |
| o.conversation = 'foo'; |
| o.conversationProfile = 'foo'; |
| o.endUserMetadata = buildUnnamed131(); |
| o.exactSearch = true; |
| o.latestMessage = 'foo'; |
| o.parent = 'foo'; |
| o.query = buildGoogleCloudDialogflowV2TextInput(); |
| o.querySource = 'foo'; |
| o.searchConfig = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig(); |
| o.sessionId = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeRequest( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequest < 3) { |
| unittest.expect(o.conversation!, unittest.equals('foo')); |
| unittest.expect(o.conversationProfile!, unittest.equals('foo')); |
| checkUnnamed131(o.endUserMetadata!); |
| unittest.expect(o.exactSearch!, unittest.isTrue); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| unittest.expect(o.parent!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2TextInput(o.query!); |
| unittest.expect(o.querySource!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig( |
| o.searchConfig!, |
| ); |
| unittest.expect(o.sessionId!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequest--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs |
| > |
| buildUnnamed132() => [ |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs(), |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs(), |
| ]; |
| |
| void checkUnnamed132( |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs( |
| o[1], |
| ); |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs |
| > |
| buildUnnamed133() => [ |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs(), |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs(), |
| ]; |
| |
| void checkUnnamed133( |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs( |
| o[1], |
| ); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig() { |
| final o = api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig < |
| 3) { |
| o.boostSpecs = buildUnnamed132(); |
| o.filterSpecs = buildUnnamed133(); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig < |
| 3) { |
| checkUnnamed132(o.boostSpecs!); |
| checkUnnamed133(o.filterSpecs!); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig--; |
| } |
| |
| core.List<core.String> buildUnnamed134() => ['foo', 'foo']; |
| |
| void checkUnnamed134(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec |
| > |
| buildUnnamed135() => [ |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec(), |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec(), |
| ]; |
| |
| void checkUnnamed135( |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs() { |
| final o = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs < |
| 3) { |
| o.dataStores = buildUnnamed134(); |
| o.spec = buildUnnamed135(); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs < |
| 3) { |
| checkUnnamed134(o.dataStores!); |
| checkUnnamed135(o.spec!); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec |
| > |
| buildUnnamed136() => [ |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec(), |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec(), |
| ]; |
| |
| void checkUnnamed136( |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec() { |
| final o = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec < |
| 3) { |
| o.conditionBoostSpecs = buildUnnamed136(); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec < |
| 3) { |
| checkUnnamed136(o.conditionBoostSpecs!); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec() { |
| final o = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec < |
| 3) { |
| o.boost = 42.0; |
| o.boostControlSpec = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec(); |
| o.condition = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec < |
| 3) { |
| unittest.expect(o.boost!, unittest.equals(42.0)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec( |
| o.boostControlSpec!, |
| ); |
| unittest.expect(o.condition!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint |
| > |
| buildUnnamed137() => [ |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint(), |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint(), |
| ]; |
| |
| void checkUnnamed137( |
| core.List< |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec() { |
| final o = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec < |
| 3) { |
| o.attributeType = 'foo'; |
| o.controlPoints = buildUnnamed137(); |
| o.fieldName = 'foo'; |
| o.interpolationType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec < |
| 3) { |
| unittest.expect(o.attributeType!, unittest.equals('foo')); |
| checkUnnamed137(o.controlPoints!); |
| unittest.expect(o.fieldName!, unittest.equals('foo')); |
| unittest.expect(o.interpolationType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint() { |
| final o = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint < |
| 3) { |
| o.attributeValue = 'foo'; |
| o.boostAmount = 42.0; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint < |
| 3) { |
| unittest.expect(o.attributeValue!, unittest.equals('foo')); |
| unittest.expect(o.boostAmount!, unittest.equals(42.0)); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint--; |
| } |
| |
| core.List<core.String> buildUnnamed138() => ['foo', 'foo']; |
| |
| void checkUnnamed138(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs = |
| 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs() { |
| final o = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs < |
| 3) { |
| o.dataStores = buildUnnamed138(); |
| o.filter = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs( |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs < |
| 3) { |
| checkUnnamed138(o.dataStores!); |
| unittest.expect(o.filter!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SearchKnowledgeAnswer> buildUnnamed139() => |
| [ |
| buildGoogleCloudDialogflowV2SearchKnowledgeAnswer(), |
| buildGoogleCloudDialogflowV2SearchKnowledgeAnswer(), |
| ]; |
| |
| void checkUnnamed139( |
| core.List<api.GoogleCloudDialogflowV2SearchKnowledgeAnswer> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SearchKnowledgeAnswer(o[0]); |
| checkGoogleCloudDialogflowV2SearchKnowledgeAnswer(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SearchKnowledgeResponse = 0; |
| api.GoogleCloudDialogflowV2SearchKnowledgeResponse |
| buildGoogleCloudDialogflowV2SearchKnowledgeResponse() { |
| final o = api.GoogleCloudDialogflowV2SearchKnowledgeResponse(); |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeResponse < 3) { |
| o.answers = buildUnnamed139(); |
| o.rewrittenQuery = 'foo'; |
| o.searchKnowledgeDebugInfo = |
| buildGoogleCloudDialogflowV2SearchKnowledgeDebugInfo(); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SearchKnowledgeResponse( |
| api.GoogleCloudDialogflowV2SearchKnowledgeResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SearchKnowledgeResponse < 3) { |
| checkUnnamed139(o.answers!); |
| unittest.expect(o.rewrittenQuery!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SearchKnowledgeDebugInfo( |
| o.searchKnowledgeDebugInfo!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2SearchKnowledgeResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Sentiment = 0; |
| api.GoogleCloudDialogflowV2Sentiment buildGoogleCloudDialogflowV2Sentiment() { |
| final o = api.GoogleCloudDialogflowV2Sentiment(); |
| buildCounterGoogleCloudDialogflowV2Sentiment++; |
| if (buildCounterGoogleCloudDialogflowV2Sentiment < 3) { |
| o.magnitude = 42.0; |
| o.score = 42.0; |
| } |
| buildCounterGoogleCloudDialogflowV2Sentiment--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Sentiment( |
| api.GoogleCloudDialogflowV2Sentiment o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2Sentiment++; |
| if (buildCounterGoogleCloudDialogflowV2Sentiment < 3) { |
| unittest.expect(o.magnitude!, unittest.equals(42.0)); |
| unittest.expect(o.score!, unittest.equals(42.0)); |
| } |
| buildCounterGoogleCloudDialogflowV2Sentiment--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SentimentAnalysisRequestConfig = 0; |
| api.GoogleCloudDialogflowV2SentimentAnalysisRequestConfig |
| buildGoogleCloudDialogflowV2SentimentAnalysisRequestConfig() { |
| final o = api.GoogleCloudDialogflowV2SentimentAnalysisRequestConfig(); |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisRequestConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SentimentAnalysisRequestConfig < 3) { |
| o.analyzeQueryTextSentiment = true; |
| } |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisRequestConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SentimentAnalysisRequestConfig( |
| api.GoogleCloudDialogflowV2SentimentAnalysisRequestConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisRequestConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SentimentAnalysisRequestConfig < 3) { |
| unittest.expect(o.analyzeQueryTextSentiment!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisRequestConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SentimentAnalysisResult = 0; |
| api.GoogleCloudDialogflowV2SentimentAnalysisResult |
| buildGoogleCloudDialogflowV2SentimentAnalysisResult() { |
| final o = api.GoogleCloudDialogflowV2SentimentAnalysisResult(); |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisResult++; |
| if (buildCounterGoogleCloudDialogflowV2SentimentAnalysisResult < 3) { |
| o.queryTextSentiment = buildGoogleCloudDialogflowV2Sentiment(); |
| } |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SentimentAnalysisResult( |
| api.GoogleCloudDialogflowV2SentimentAnalysisResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisResult++; |
| if (buildCounterGoogleCloudDialogflowV2SentimentAnalysisResult < 3) { |
| checkGoogleCloudDialogflowV2Sentiment(o.queryTextSentiment!); |
| } |
| buildCounterGoogleCloudDialogflowV2SentimentAnalysisResult--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency> |
| buildUnnamed140() => [ |
| buildGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency(), |
| buildGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency(), |
| ]; |
| |
| void checkUnnamed140( |
| core.List<api.GoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency(o[0]); |
| checkGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ServiceLatency = 0; |
| api.GoogleCloudDialogflowV2ServiceLatency |
| buildGoogleCloudDialogflowV2ServiceLatency() { |
| final o = api.GoogleCloudDialogflowV2ServiceLatency(); |
| buildCounterGoogleCloudDialogflowV2ServiceLatency++; |
| if (buildCounterGoogleCloudDialogflowV2ServiceLatency < 3) { |
| o.internalServiceLatencies = buildUnnamed140(); |
| } |
| buildCounterGoogleCloudDialogflowV2ServiceLatency--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ServiceLatency( |
| api.GoogleCloudDialogflowV2ServiceLatency o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ServiceLatency++; |
| if (buildCounterGoogleCloudDialogflowV2ServiceLatency < 3) { |
| checkUnnamed140(o.internalServiceLatencies!); |
| } |
| buildCounterGoogleCloudDialogflowV2ServiceLatency--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency = 0; |
| api.GoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency |
| buildGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency() { |
| final o = api.GoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency(); |
| buildCounterGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency++; |
| if (buildCounterGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency < |
| 3) { |
| o.completeTime = 'foo'; |
| o.latencyMs = 42.0; |
| o.startTime = 'foo'; |
| o.step = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency( |
| api.GoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency++; |
| if (buildCounterGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency < |
| 3) { |
| unittest.expect(o.completeTime!, unittest.equals('foo')); |
| unittest.expect(o.latencyMs!, unittest.equals(42.0)); |
| unittest.expect(o.startTime!, unittest.equals('foo')); |
| unittest.expect(o.step!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> buildUnnamed141() => [ |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| buildGoogleCloudDialogflowV2EntityTypeEntity(), |
| ]; |
| |
| void checkUnnamed141(core.List<api.GoogleCloudDialogflowV2EntityTypeEntity> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[0]); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SessionEntityType = 0; |
| api.GoogleCloudDialogflowV2SessionEntityType |
| buildGoogleCloudDialogflowV2SessionEntityType() { |
| final o = api.GoogleCloudDialogflowV2SessionEntityType(); |
| buildCounterGoogleCloudDialogflowV2SessionEntityType++; |
| if (buildCounterGoogleCloudDialogflowV2SessionEntityType < 3) { |
| o.entities = buildUnnamed141(); |
| o.entityOverrideMode = 'foo'; |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SessionEntityType--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SessionEntityType( |
| api.GoogleCloudDialogflowV2SessionEntityType o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SessionEntityType++; |
| if (buildCounterGoogleCloudDialogflowV2SessionEntityType < 3) { |
| checkUnnamed141(o.entities!); |
| unittest.expect(o.entityOverrideMode!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SessionEntityType--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest = |
| 0; |
| api.GoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest |
| buildGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest() { |
| final o = api.GoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest(); |
| buildCounterGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest < |
| 3) { |
| o.participantRole = 'foo'; |
| o.suggestionFeatureConfig = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest( |
| api.GoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest < |
| 3) { |
| unittest.expect(o.participantRole!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig( |
| o.suggestionFeatureConfig!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2Connection> buildUnnamed142() => [ |
| buildGoogleCloudDialogflowV2Connection(), |
| buildGoogleCloudDialogflowV2Connection(), |
| ]; |
| |
| void checkUnnamed142(core.List<api.GoogleCloudDialogflowV2Connection> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2Connection(o[0]); |
| checkGoogleCloudDialogflowV2Connection(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed143() => ['foo', 'foo']; |
| |
| void checkUnnamed143(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SipTrunk = 0; |
| api.GoogleCloudDialogflowV2SipTrunk buildGoogleCloudDialogflowV2SipTrunk() { |
| final o = api.GoogleCloudDialogflowV2SipTrunk(); |
| buildCounterGoogleCloudDialogflowV2SipTrunk++; |
| if (buildCounterGoogleCloudDialogflowV2SipTrunk < 3) { |
| o.connections = buildUnnamed142(); |
| o.displayName = 'foo'; |
| o.expectedHostname = buildUnnamed143(); |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SipTrunk--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SipTrunk( |
| api.GoogleCloudDialogflowV2SipTrunk o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SipTrunk++; |
| if (buildCounterGoogleCloudDialogflowV2SipTrunk < 3) { |
| checkUnnamed142(o.connections!); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkUnnamed143(o.expectedHostname!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SipTrunk--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SmartReplyAnswer = 0; |
| api.GoogleCloudDialogflowV2SmartReplyAnswer |
| buildGoogleCloudDialogflowV2SmartReplyAnswer() { |
| final o = api.GoogleCloudDialogflowV2SmartReplyAnswer(); |
| buildCounterGoogleCloudDialogflowV2SmartReplyAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyAnswer < 3) { |
| o.answerRecord = 'foo'; |
| o.confidence = 42.0; |
| o.reply = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyAnswer--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SmartReplyAnswer( |
| api.GoogleCloudDialogflowV2SmartReplyAnswer o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SmartReplyAnswer++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyAnswer < 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.confidence!, unittest.equals(42.0)); |
| unittest.expect(o.reply!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyAnswer--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics> |
| buildUnnamed144() => [ |
| buildGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics(), |
| buildGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics(), |
| ]; |
| |
| void checkUnnamed144( |
| core.List<api.GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics(o[0]); |
| checkGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SmartReplyMetrics = 0; |
| api.GoogleCloudDialogflowV2SmartReplyMetrics |
| buildGoogleCloudDialogflowV2SmartReplyMetrics() { |
| final o = api.GoogleCloudDialogflowV2SmartReplyMetrics(); |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetrics++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyMetrics < 3) { |
| o.allowlistCoverage = 42.0; |
| o.conversationCount = 'foo'; |
| o.topNMetrics = buildUnnamed144(); |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetrics--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SmartReplyMetrics( |
| api.GoogleCloudDialogflowV2SmartReplyMetrics o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetrics++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyMetrics < 3) { |
| unittest.expect(o.allowlistCoverage!, unittest.equals(42.0)); |
| unittest.expect(o.conversationCount!, unittest.equals('foo')); |
| checkUnnamed144(o.topNMetrics!); |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetrics--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics = 0; |
| api.GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics |
| buildGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics() { |
| final o = api.GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics(); |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics < 3) { |
| o.n = 42; |
| o.recall = 42.0; |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics( |
| api.GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics < 3) { |
| unittest.expect(o.n!, unittest.equals(42)); |
| unittest.expect(o.recall!, unittest.equals(42.0)); |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SmartReplyModelMetadata = 0; |
| api.GoogleCloudDialogflowV2SmartReplyModelMetadata |
| buildGoogleCloudDialogflowV2SmartReplyModelMetadata() { |
| final o = api.GoogleCloudDialogflowV2SmartReplyModelMetadata(); |
| buildCounterGoogleCloudDialogflowV2SmartReplyModelMetadata++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyModelMetadata < 3) { |
| o.trainingModelType = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyModelMetadata--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SmartReplyModelMetadata( |
| api.GoogleCloudDialogflowV2SmartReplyModelMetadata o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SmartReplyModelMetadata++; |
| if (buildCounterGoogleCloudDialogflowV2SmartReplyModelMetadata < 3) { |
| unittest.expect(o.trainingModelType!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SmartReplyModelMetadata--; |
| } |
| |
| core.List<core.String> buildUnnamed145() => ['foo', 'foo']; |
| |
| void checkUnnamed145(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SpeechContext = 0; |
| api.GoogleCloudDialogflowV2SpeechContext |
| buildGoogleCloudDialogflowV2SpeechContext() { |
| final o = api.GoogleCloudDialogflowV2SpeechContext(); |
| buildCounterGoogleCloudDialogflowV2SpeechContext++; |
| if (buildCounterGoogleCloudDialogflowV2SpeechContext < 3) { |
| o.boost = 42.0; |
| o.phrases = buildUnnamed145(); |
| } |
| buildCounterGoogleCloudDialogflowV2SpeechContext--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SpeechContext( |
| api.GoogleCloudDialogflowV2SpeechContext o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SpeechContext++; |
| if (buildCounterGoogleCloudDialogflowV2SpeechContext < 3) { |
| unittest.expect(o.boost!, unittest.equals(42.0)); |
| checkUnnamed145(o.phrases!); |
| } |
| buildCounterGoogleCloudDialogflowV2SpeechContext--; |
| } |
| |
| core.List<core.String> buildUnnamed146() => ['foo', 'foo']; |
| |
| void checkUnnamed146(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SpeechToTextConfig = 0; |
| api.GoogleCloudDialogflowV2SpeechToTextConfig |
| buildGoogleCloudDialogflowV2SpeechToTextConfig() { |
| final o = api.GoogleCloudDialogflowV2SpeechToTextConfig(); |
| buildCounterGoogleCloudDialogflowV2SpeechToTextConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SpeechToTextConfig < 3) { |
| o.audioEncoding = 'foo'; |
| o.enableWordInfo = true; |
| o.languageCode = 'foo'; |
| o.model = 'foo'; |
| o.phraseSets = buildUnnamed146(); |
| o.sampleRateHertz = 42; |
| o.speechModelVariant = 'foo'; |
| o.useTimeoutBasedEndpointing = true; |
| } |
| buildCounterGoogleCloudDialogflowV2SpeechToTextConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SpeechToTextConfig( |
| api.GoogleCloudDialogflowV2SpeechToTextConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SpeechToTextConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SpeechToTextConfig < 3) { |
| unittest.expect(o.audioEncoding!, unittest.equals('foo')); |
| unittest.expect(o.enableWordInfo!, unittest.isTrue); |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.model!, unittest.equals('foo')); |
| checkUnnamed146(o.phraseSets!); |
| unittest.expect(o.sampleRateHertz!, unittest.equals(42)); |
| unittest.expect(o.speechModelVariant!, unittest.equals('foo')); |
| unittest.expect(o.useTimeoutBasedEndpointing!, unittest.isTrue); |
| } |
| buildCounterGoogleCloudDialogflowV2SpeechToTextConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestArticlesRequest = 0; |
| api.GoogleCloudDialogflowV2SuggestArticlesRequest |
| buildGoogleCloudDialogflowV2SuggestArticlesRequest() { |
| final o = api.GoogleCloudDialogflowV2SuggestArticlesRequest(); |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestArticlesRequest < 3) { |
| o.assistQueryParams = buildGoogleCloudDialogflowV2AssistQueryParameters(); |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestArticlesRequest( |
| api.GoogleCloudDialogflowV2SuggestArticlesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestArticlesRequest < 3) { |
| checkGoogleCloudDialogflowV2AssistQueryParameters(o.assistQueryParams!); |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ArticleAnswer> buildUnnamed147() => [ |
| buildGoogleCloudDialogflowV2ArticleAnswer(), |
| buildGoogleCloudDialogflowV2ArticleAnswer(), |
| ]; |
| |
| void checkUnnamed147(core.List<api.GoogleCloudDialogflowV2ArticleAnswer> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ArticleAnswer(o[0]); |
| checkGoogleCloudDialogflowV2ArticleAnswer(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestArticlesResponse = 0; |
| api.GoogleCloudDialogflowV2SuggestArticlesResponse |
| buildGoogleCloudDialogflowV2SuggestArticlesResponse() { |
| final o = api.GoogleCloudDialogflowV2SuggestArticlesResponse(); |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestArticlesResponse < 3) { |
| o.articleAnswers = buildUnnamed147(); |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestArticlesResponse( |
| api.GoogleCloudDialogflowV2SuggestArticlesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestArticlesResponse < 3) { |
| checkUnnamed147(o.articleAnswers!); |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestArticlesResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryRequest = |
| 0; |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryRequest |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryRequest() { |
| final o = api.GoogleCloudDialogflowV2SuggestConversationSummaryRequest(); |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryRequest < |
| 3) { |
| o.assistQueryParams = buildGoogleCloudDialogflowV2AssistQueryParameters(); |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestConversationSummaryRequest( |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryRequest < |
| 3) { |
| checkGoogleCloudDialogflowV2AssistQueryParameters(o.assistQueryParams!); |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponse = |
| 0; |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponse |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponse() { |
| final o = api.GoogleCloudDialogflowV2SuggestConversationSummaryResponse(); |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponse < |
| 3) { |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| o.summary = |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary(); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestConversationSummaryResponse( |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponse < |
| 3) { |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary( |
| o.summary!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponse--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection |
| > |
| buildUnnamed148() => [ |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection(), |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection(), |
| ]; |
| |
| void checkUnnamed148( |
| core.List< |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection( |
| o[1], |
| ); |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed149() => { |
| 'x': 'foo', |
| 'y': 'foo', |
| }; |
| |
| void checkUnnamed149(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary = |
| 0; |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary() { |
| final o = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary(); |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary < |
| 3) { |
| o.answerRecord = 'foo'; |
| o.baselineModelVersion = 'foo'; |
| o.sortedTextSections = buildUnnamed148(); |
| o.text = 'foo'; |
| o.textSections = buildUnnamed149(); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary( |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary < |
| 3) { |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.baselineModelVersion!, unittest.equals('foo')); |
| checkUnnamed148(o.sortedTextSections!); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| checkUnnamed149(o.textSections!); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection = |
| 0; |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection() { |
| final o = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection(); |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection < |
| 3) { |
| o.section = 'foo'; |
| o.summary = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection( |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection < |
| 3) { |
| unittest.expect(o.section!, unittest.equals('foo')); |
| unittest.expect(o.summary!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersRequest = 0; |
| api.GoogleCloudDialogflowV2SuggestFaqAnswersRequest |
| buildGoogleCloudDialogflowV2SuggestFaqAnswersRequest() { |
| final o = api.GoogleCloudDialogflowV2SuggestFaqAnswersRequest(); |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersRequest < 3) { |
| o.assistQueryParams = buildGoogleCloudDialogflowV2AssistQueryParameters(); |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestFaqAnswersRequest( |
| api.GoogleCloudDialogflowV2SuggestFaqAnswersRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersRequest < 3) { |
| checkGoogleCloudDialogflowV2AssistQueryParameters(o.assistQueryParams!); |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2FaqAnswer> buildUnnamed150() => [ |
| buildGoogleCloudDialogflowV2FaqAnswer(), |
| buildGoogleCloudDialogflowV2FaqAnswer(), |
| ]; |
| |
| void checkUnnamed150(core.List<api.GoogleCloudDialogflowV2FaqAnswer> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2FaqAnswer(o[0]); |
| checkGoogleCloudDialogflowV2FaqAnswer(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersResponse = 0; |
| api.GoogleCloudDialogflowV2SuggestFaqAnswersResponse |
| buildGoogleCloudDialogflowV2SuggestFaqAnswersResponse() { |
| final o = api.GoogleCloudDialogflowV2SuggestFaqAnswersResponse(); |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersResponse < 3) { |
| o.contextSize = 42; |
| o.faqAnswers = buildUnnamed150(); |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestFaqAnswersResponse( |
| api.GoogleCloudDialogflowV2SuggestFaqAnswersResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersResponse < 3) { |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| checkUnnamed150(o.faqAnswers!); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestFaqAnswersResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest = 0; |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest |
| buildGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest() { |
| final o = api.GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest(); |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest < 3) { |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| o.previousSuggestedQuery = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest( |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest < 3) { |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| unittest.expect(o.previousSuggestedQuery!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse = 0; |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse |
| buildGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse() { |
| final o = api.GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse(); |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse < 3) { |
| o.contextSize = 42; |
| o.knowledgeAssistAnswer = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswer(); |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse( |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse < 3) { |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswer(o.knowledgeAssistAnswer!); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesRequest = 0; |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesRequest |
| buildGoogleCloudDialogflowV2SuggestSmartRepliesRequest() { |
| final o = api.GoogleCloudDialogflowV2SuggestSmartRepliesRequest(); |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesRequest < 3) { |
| o.contextSize = 42; |
| o.currentTextInput = buildGoogleCloudDialogflowV2TextInput(); |
| o.latestMessage = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestSmartRepliesRequest( |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesRequest++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesRequest < 3) { |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| checkGoogleCloudDialogflowV2TextInput(o.currentTextInput!); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesRequest--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SmartReplyAnswer> buildUnnamed151() => [ |
| buildGoogleCloudDialogflowV2SmartReplyAnswer(), |
| buildGoogleCloudDialogflowV2SmartReplyAnswer(), |
| ]; |
| |
| void checkUnnamed151(core.List<api.GoogleCloudDialogflowV2SmartReplyAnswer> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SmartReplyAnswer(o[0]); |
| checkGoogleCloudDialogflowV2SmartReplyAnswer(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesResponse = 0; |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesResponse |
| buildGoogleCloudDialogflowV2SuggestSmartRepliesResponse() { |
| final o = api.GoogleCloudDialogflowV2SuggestSmartRepliesResponse(); |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesResponse < 3) { |
| o.contextSize = 42; |
| o.latestMessage = 'foo'; |
| o.smartReplyAnswers = buildUnnamed151(); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestSmartRepliesResponse( |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesResponse o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesResponse++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesResponse < 3) { |
| unittest.expect(o.contextSize!, unittest.equals(42)); |
| unittest.expect(o.latestMessage!, unittest.equals('foo')); |
| checkUnnamed151(o.smartReplyAnswers!); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestSmartRepliesResponse--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestionDedupingConfig = 0; |
| api.GoogleCloudDialogflowV2SuggestionDedupingConfig |
| buildGoogleCloudDialogflowV2SuggestionDedupingConfig() { |
| final o = api.GoogleCloudDialogflowV2SuggestionDedupingConfig(); |
| buildCounterGoogleCloudDialogflowV2SuggestionDedupingConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionDedupingConfig < 3) { |
| o.enableDeduping = true; |
| o.similarityThreshold = 42.0; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionDedupingConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestionDedupingConfig( |
| api.GoogleCloudDialogflowV2SuggestionDedupingConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestionDedupingConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionDedupingConfig < 3) { |
| unittest.expect(o.enableDeduping!, unittest.isTrue); |
| unittest.expect(o.similarityThreshold!, unittest.equals(42.0)); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionDedupingConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestionFeature = 0; |
| api.GoogleCloudDialogflowV2SuggestionFeature |
| buildGoogleCloudDialogflowV2SuggestionFeature() { |
| final o = api.GoogleCloudDialogflowV2SuggestionFeature(); |
| buildCounterGoogleCloudDialogflowV2SuggestionFeature++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionFeature < 3) { |
| o.type = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionFeature--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestionFeature( |
| api.GoogleCloudDialogflowV2SuggestionFeature o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestionFeature++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionFeature < 3) { |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionFeature--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed152() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed152(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted24 = (o['x']!) as core.Map; |
| unittest.expect(casted24, unittest.hasLength(3)); |
| unittest.expect(casted24['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted24['bool'], unittest.equals(true)); |
| unittest.expect(casted24['string'], unittest.equals('foo')); |
| var casted25 = (o['y']!) as core.Map; |
| unittest.expect(casted25, unittest.hasLength(3)); |
| unittest.expect(casted25['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted25['bool'], unittest.equals(true)); |
| unittest.expect(casted25['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestionInput = 0; |
| api.GoogleCloudDialogflowV2SuggestionInput |
| buildGoogleCloudDialogflowV2SuggestionInput() { |
| final o = api.GoogleCloudDialogflowV2SuggestionInput(); |
| buildCounterGoogleCloudDialogflowV2SuggestionInput++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionInput < 3) { |
| o.action = 'foo'; |
| o.answerRecord = 'foo'; |
| o.parameters = buildUnnamed152(); |
| o.sendTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionInput--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestionInput( |
| api.GoogleCloudDialogflowV2SuggestionInput o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestionInput++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionInput < 3) { |
| unittest.expect(o.action!, unittest.equals('foo')); |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| checkUnnamed152(o.parameters!); |
| unittest.expect(o.sendTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionInput--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SuggestionResult = 0; |
| api.GoogleCloudDialogflowV2SuggestionResult |
| buildGoogleCloudDialogflowV2SuggestionResult() { |
| final o = api.GoogleCloudDialogflowV2SuggestionResult(); |
| buildCounterGoogleCloudDialogflowV2SuggestionResult++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionResult < 3) { |
| o.error = buildGoogleRpcStatus(); |
| o.generateSuggestionsResponse = |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponse(); |
| o.suggestArticlesResponse = |
| buildGoogleCloudDialogflowV2SuggestArticlesResponse(); |
| o.suggestFaqAnswersResponse = |
| buildGoogleCloudDialogflowV2SuggestFaqAnswersResponse(); |
| o.suggestKnowledgeAssistResponse = |
| buildGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse(); |
| o.suggestSmartRepliesResponse = |
| buildGoogleCloudDialogflowV2SuggestSmartRepliesResponse(); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SuggestionResult( |
| api.GoogleCloudDialogflowV2SuggestionResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SuggestionResult++; |
| if (buildCounterGoogleCloudDialogflowV2SuggestionResult < 3) { |
| checkGoogleRpcStatus(o.error!); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponse( |
| o.generateSuggestionsResponse!, |
| ); |
| checkGoogleCloudDialogflowV2SuggestArticlesResponse( |
| o.suggestArticlesResponse!, |
| ); |
| checkGoogleCloudDialogflowV2SuggestFaqAnswersResponse( |
| o.suggestFaqAnswersResponse!, |
| ); |
| checkGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse( |
| o.suggestKnowledgeAssistResponse!, |
| ); |
| checkGoogleCloudDialogflowV2SuggestSmartRepliesResponse( |
| o.suggestSmartRepliesResponse!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2SuggestionResult--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2FewShotExample> buildUnnamed153() => [ |
| buildGoogleCloudDialogflowV2FewShotExample(), |
| buildGoogleCloudDialogflowV2FewShotExample(), |
| ]; |
| |
| void checkUnnamed153(core.List<api.GoogleCloudDialogflowV2FewShotExample> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2FewShotExample(o[0]); |
| checkGoogleCloudDialogflowV2FewShotExample(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SummarizationSection> buildUnnamed154() => |
| [ |
| buildGoogleCloudDialogflowV2SummarizationSection(), |
| buildGoogleCloudDialogflowV2SummarizationSection(), |
| ]; |
| |
| void checkUnnamed154( |
| core.List<api.GoogleCloudDialogflowV2SummarizationSection> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationSection(o[0]); |
| checkGoogleCloudDialogflowV2SummarizationSection(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SummarizationContext = 0; |
| api.GoogleCloudDialogflowV2SummarizationContext |
| buildGoogleCloudDialogflowV2SummarizationContext() { |
| final o = api.GoogleCloudDialogflowV2SummarizationContext(); |
| buildCounterGoogleCloudDialogflowV2SummarizationContext++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationContext < 3) { |
| o.fewShotExamples = buildUnnamed153(); |
| o.outputLanguageCode = 'foo'; |
| o.summarizationSections = buildUnnamed154(); |
| o.version = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationContext--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationContext( |
| api.GoogleCloudDialogflowV2SummarizationContext o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationContext++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationContext < 3) { |
| checkUnnamed153(o.fewShotExamples!); |
| unittest.expect(o.outputLanguageCode!, unittest.equals('foo')); |
| checkUnnamed154(o.summarizationSections!); |
| unittest.expect(o.version!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationContext--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail |
| > |
| buildUnnamed155() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail(), |
| ]; |
| |
| void checkUnnamed155( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail( |
| o[1], |
| ); |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric |
| > |
| buildUnnamed156() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric(), |
| ]; |
| |
| void checkUnnamed156( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric( |
| o[1], |
| ); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken> |
| buildUnnamed157() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(), |
| ]; |
| |
| void checkUnnamed157( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(o[0]); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(o[1]); |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult |
| > |
| buildUnnamed158() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult(), |
| ]; |
| |
| void checkUnnamed158( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult( |
| o[1], |
| ); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetrics = 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetrics |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetrics() { |
| final o = api.GoogleCloudDialogflowV2SummarizationEvaluationMetrics(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetrics++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetrics < 3) { |
| o.conversationDetails = buildUnnamed155(); |
| o.overallMetrics = buildUnnamed156(); |
| o.overallSectionTokens = buildUnnamed157(); |
| o.summarizationEvaluationMergedResultsUri = 'foo'; |
| o.summarizationEvaluationResults = buildUnnamed158(); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetrics--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationEvaluationMetrics( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetrics o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetrics++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetrics < 3) { |
| checkUnnamed155(o.conversationDetails!); |
| checkUnnamed156(o.overallMetrics!); |
| checkUnnamed157(o.overallSectionTokens!); |
| unittest.expect( |
| o.summarizationEvaluationMergedResultsUri!, |
| unittest.equals('foo'), |
| ); |
| checkUnnamed158(o.summarizationEvaluationResults!); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetrics--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition < |
| 3) { |
| o.accuracyReasoning = 'foo'; |
| o.isAccurate = true; |
| o.point = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition < |
| 3) { |
| unittest.expect(o.accuracyReasoning!, unittest.equals('foo')); |
| unittest.expect(o.isAccurate!, unittest.isTrue); |
| unittest.expect(o.point!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition < |
| 3) { |
| o.adherenceReasoning = 'foo'; |
| o.isAdherent = true; |
| o.point = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition < |
| 3) { |
| unittest.expect(o.adherenceReasoning!, unittest.equals('foo')); |
| unittest.expect(o.isAdherent!, unittest.isTrue); |
| unittest.expect(o.point!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric < |
| 3) { |
| o.isAddressed = true; |
| o.question = 'foo'; |
| o.reasoning = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric < |
| 3) { |
| unittest.expect(o.isAddressed!, unittest.isTrue); |
| unittest.expect(o.question!, unittest.equals('foo')); |
| unittest.expect(o.reasoning!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric < |
| 3) { |
| o.isAddressed = true; |
| o.question = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric < |
| 3) { |
| unittest.expect(o.isAddressed!, unittest.isTrue); |
| unittest.expect(o.question!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2MessageEntry> buildUnnamed159() => [ |
| buildGoogleCloudDialogflowV2MessageEntry(), |
| buildGoogleCloudDialogflowV2MessageEntry(), |
| ]; |
| |
| void checkUnnamed159(core.List<api.GoogleCloudDialogflowV2MessageEntry> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2MessageEntry(o[0]); |
| checkGoogleCloudDialogflowV2MessageEntry(o[1]); |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail |
| > |
| buildUnnamed160() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail(), |
| ]; |
| |
| void checkUnnamed160( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail( |
| o[1], |
| ); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken> |
| buildUnnamed161() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(), |
| ]; |
| |
| void checkUnnamed161( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(o[0]); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(o[1]); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SummarySuggestionSummarySection> |
| buildUnnamed162() => [ |
| buildGoogleCloudDialogflowV2SummarySuggestionSummarySection(), |
| buildGoogleCloudDialogflowV2SummarySuggestionSummarySection(), |
| ]; |
| |
| void checkUnnamed162( |
| core.List<api.GoogleCloudDialogflowV2SummarySuggestionSummarySection> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarySuggestionSummarySection(o[0]); |
| checkGoogleCloudDialogflowV2SummarySuggestionSummarySection(o[1]); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail < |
| 3) { |
| o.messageEntries = buildUnnamed159(); |
| o.metricDetails = buildUnnamed160(); |
| o.sectionTokens = buildUnnamed161(); |
| o.summarySections = buildUnnamed162(); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail < |
| 3) { |
| checkUnnamed159(o.messageEntries!); |
| checkUnnamed160(o.metricDetails!); |
| checkUnnamed161(o.sectionTokens!); |
| checkUnnamed162(o.summarySections!); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail |
| > |
| buildUnnamed163() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail(), |
| ]; |
| |
| void checkUnnamed163( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail < |
| 3) { |
| o.metric = 'foo'; |
| o.score = 42.0; |
| o.sectionDetails = buildUnnamed163(); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail < |
| 3) { |
| unittest.expect(o.metric!, unittest.equals('foo')); |
| unittest.expect(o.score!, unittest.equals(42.0)); |
| checkUnnamed163(o.sectionDetails!); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult |
| > |
| buildUnnamed164() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult(), |
| ]; |
| |
| void checkUnnamed164( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail < |
| 3) { |
| o.evaluationResults = buildUnnamed164(); |
| o.score = 42.0; |
| o.section = 'foo'; |
| o.sectionSummary = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail < |
| 3) { |
| checkUnnamed164(o.evaluationResults!); |
| unittest.expect(o.score!, unittest.equals(42.0)); |
| unittest.expect(o.section!, unittest.equals('foo')); |
| unittest.expect(o.sectionSummary!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition < |
| 3) { |
| o.accuracyDecomposition = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition(); |
| o.adherenceDecomposition = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition(); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition < |
| 3) { |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition( |
| o.accuracyDecomposition!, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition( |
| o.adherenceDecomposition!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult < |
| 3) { |
| o.accuracyDecomposition = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition(); |
| o.adherenceRubric = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric(); |
| o.completenessRubric = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric(); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult < |
| 3) { |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition( |
| o.accuracyDecomposition!, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric( |
| o.adherenceRubric!, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric( |
| o.completenessRubric!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric < |
| 3) { |
| o.metric = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric < |
| 3) { |
| unittest.expect(o.metric!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken < |
| 3) { |
| o.section = 'foo'; |
| o.tokenCount = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken < |
| 3) { |
| unittest.expect(o.section!, unittest.equals('foo')); |
| unittest.expect(o.tokenCount!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken--; |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition |
| > |
| buildUnnamed165() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition(), |
| ]; |
| |
| void checkUnnamed165( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition(o[0]); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition(o[1]); |
| } |
| |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult |
| > |
| buildUnnamed166() => [ |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult(), |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult(), |
| ]; |
| |
| void checkUnnamed166( |
| core.List< |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult |
| > |
| o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult( |
| o[0], |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult( |
| o[1], |
| ); |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult = |
| 0; |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult() { |
| final o = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult(); |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult < |
| 3) { |
| o.decompositions = buildUnnamed165(); |
| o.evaluationResults = buildUnnamed166(); |
| o.metric = 'foo'; |
| o.score = 42.0; |
| o.section = 'foo'; |
| o.sectionSummary = 'foo'; |
| o.sessionId = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult--; |
| return o; |
| } |
| |
| void |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult( |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult |
| o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult < |
| 3) { |
| checkUnnamed165(o.decompositions!); |
| checkUnnamed166(o.evaluationResults!); |
| unittest.expect(o.metric!, unittest.equals('foo')); |
| unittest.expect(o.score!, unittest.equals(42.0)); |
| unittest.expect(o.section!, unittest.equals('foo')); |
| unittest.expect(o.sectionSummary!, unittest.equals('foo')); |
| unittest.expect(o.sessionId!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SummarizationSection = 0; |
| api.GoogleCloudDialogflowV2SummarizationSection |
| buildGoogleCloudDialogflowV2SummarizationSection() { |
| final o = api.GoogleCloudDialogflowV2SummarizationSection(); |
| buildCounterGoogleCloudDialogflowV2SummarizationSection++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationSection < 3) { |
| o.definition = 'foo'; |
| o.key = 'foo'; |
| o.type = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationSection--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationSection( |
| api.GoogleCloudDialogflowV2SummarizationSection o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationSection++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationSection < 3) { |
| unittest.expect(o.definition!, unittest.equals('foo')); |
| unittest.expect(o.key!, unittest.equals('foo')); |
| unittest.expect(o.type!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationSection--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SummarizationSection> buildUnnamed167() => |
| [ |
| buildGoogleCloudDialogflowV2SummarizationSection(), |
| buildGoogleCloudDialogflowV2SummarizationSection(), |
| ]; |
| |
| void checkUnnamed167( |
| core.List<api.GoogleCloudDialogflowV2SummarizationSection> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarizationSection(o[0]); |
| checkGoogleCloudDialogflowV2SummarizationSection(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SummarizationSectionList = 0; |
| api.GoogleCloudDialogflowV2SummarizationSectionList |
| buildGoogleCloudDialogflowV2SummarizationSectionList() { |
| final o = api.GoogleCloudDialogflowV2SummarizationSectionList(); |
| buildCounterGoogleCloudDialogflowV2SummarizationSectionList++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationSectionList < 3) { |
| o.summarizationSections = buildUnnamed167(); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationSectionList--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarizationSectionList( |
| api.GoogleCloudDialogflowV2SummarizationSectionList o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarizationSectionList++; |
| if (buildCounterGoogleCloudDialogflowV2SummarizationSectionList < 3) { |
| checkUnnamed167(o.summarizationSections!); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarizationSectionList--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2SummarySuggestionSummarySection> |
| buildUnnamed168() => [ |
| buildGoogleCloudDialogflowV2SummarySuggestionSummarySection(), |
| buildGoogleCloudDialogflowV2SummarySuggestionSummarySection(), |
| ]; |
| |
| void checkUnnamed168( |
| core.List<api.GoogleCloudDialogflowV2SummarySuggestionSummarySection> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SummarySuggestionSummarySection(o[0]); |
| checkGoogleCloudDialogflowV2SummarySuggestionSummarySection(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SummarySuggestion = 0; |
| api.GoogleCloudDialogflowV2SummarySuggestion |
| buildGoogleCloudDialogflowV2SummarySuggestion() { |
| final o = api.GoogleCloudDialogflowV2SummarySuggestion(); |
| buildCounterGoogleCloudDialogflowV2SummarySuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2SummarySuggestion < 3) { |
| o.summarySections = buildUnnamed168(); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarySuggestion--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarySuggestion( |
| api.GoogleCloudDialogflowV2SummarySuggestion o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarySuggestion++; |
| if (buildCounterGoogleCloudDialogflowV2SummarySuggestion < 3) { |
| checkUnnamed168(o.summarySections!); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarySuggestion--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SummarySuggestionSummarySection = 0; |
| api.GoogleCloudDialogflowV2SummarySuggestionSummarySection |
| buildGoogleCloudDialogflowV2SummarySuggestionSummarySection() { |
| final o = api.GoogleCloudDialogflowV2SummarySuggestionSummarySection(); |
| buildCounterGoogleCloudDialogflowV2SummarySuggestionSummarySection++; |
| if (buildCounterGoogleCloudDialogflowV2SummarySuggestionSummarySection < 3) { |
| o.section = 'foo'; |
| o.summary = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2SummarySuggestionSummarySection--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SummarySuggestionSummarySection( |
| api.GoogleCloudDialogflowV2SummarySuggestionSummarySection o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SummarySuggestionSummarySection++; |
| if (buildCounterGoogleCloudDialogflowV2SummarySuggestionSummarySection < 3) { |
| unittest.expect(o.section!, unittest.equals('foo')); |
| unittest.expect(o.summary!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2SummarySuggestionSummarySection--; |
| } |
| |
| core.List<core.String> buildUnnamed169() => ['foo', 'foo']; |
| |
| void checkUnnamed169(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2CustomPronunciationParams> |
| buildUnnamed170() => [ |
| buildGoogleCloudDialogflowV2CustomPronunciationParams(), |
| buildGoogleCloudDialogflowV2CustomPronunciationParams(), |
| ]; |
| |
| void checkUnnamed170( |
| core.List<api.GoogleCloudDialogflowV2CustomPronunciationParams> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2CustomPronunciationParams(o[0]); |
| checkGoogleCloudDialogflowV2CustomPronunciationParams(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2SynthesizeSpeechConfig = 0; |
| api.GoogleCloudDialogflowV2SynthesizeSpeechConfig |
| buildGoogleCloudDialogflowV2SynthesizeSpeechConfig() { |
| final o = api.GoogleCloudDialogflowV2SynthesizeSpeechConfig(); |
| buildCounterGoogleCloudDialogflowV2SynthesizeSpeechConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SynthesizeSpeechConfig < 3) { |
| o.effectsProfileId = buildUnnamed169(); |
| o.pitch = 42.0; |
| o.pronunciations = buildUnnamed170(); |
| o.speakingRate = 42.0; |
| o.voice = buildGoogleCloudDialogflowV2VoiceSelectionParams(); |
| o.volumeGainDb = 42.0; |
| } |
| buildCounterGoogleCloudDialogflowV2SynthesizeSpeechConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2SynthesizeSpeechConfig( |
| api.GoogleCloudDialogflowV2SynthesizeSpeechConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2SynthesizeSpeechConfig++; |
| if (buildCounterGoogleCloudDialogflowV2SynthesizeSpeechConfig < 3) { |
| checkUnnamed169(o.effectsProfileId!); |
| unittest.expect(o.pitch!, unittest.equals(42.0)); |
| checkUnnamed170(o.pronunciations!); |
| unittest.expect(o.speakingRate!, unittest.equals(42.0)); |
| checkGoogleCloudDialogflowV2VoiceSelectionParams(o.voice!); |
| unittest.expect(o.volumeGainDb!, unittest.equals(42.0)); |
| } |
| buildCounterGoogleCloudDialogflowV2SynthesizeSpeechConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2TextInput = 0; |
| api.GoogleCloudDialogflowV2TextInput buildGoogleCloudDialogflowV2TextInput() { |
| final o = api.GoogleCloudDialogflowV2TextInput(); |
| buildCounterGoogleCloudDialogflowV2TextInput++; |
| if (buildCounterGoogleCloudDialogflowV2TextInput < 3) { |
| o.languageCode = 'foo'; |
| o.text = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2TextInput--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2TextInput( |
| api.GoogleCloudDialogflowV2TextInput o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2TextInput++; |
| if (buildCounterGoogleCloudDialogflowV2TextInput < 3) { |
| unittest.expect(o.languageCode!, unittest.equals('foo')); |
| unittest.expect(o.text!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2TextInput--; |
| } |
| |
| core.Map<core.String, api.GoogleCloudDialogflowV2SynthesizeSpeechConfig> |
| buildUnnamed171() => { |
| 'x': buildGoogleCloudDialogflowV2SynthesizeSpeechConfig(), |
| 'y': buildGoogleCloudDialogflowV2SynthesizeSpeechConfig(), |
| }; |
| |
| void checkUnnamed171( |
| core.Map<core.String, api.GoogleCloudDialogflowV2SynthesizeSpeechConfig> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2SynthesizeSpeechConfig(o['x']!); |
| checkGoogleCloudDialogflowV2SynthesizeSpeechConfig(o['y']!); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2TextToSpeechSettings = 0; |
| api.GoogleCloudDialogflowV2TextToSpeechSettings |
| buildGoogleCloudDialogflowV2TextToSpeechSettings() { |
| final o = api.GoogleCloudDialogflowV2TextToSpeechSettings(); |
| buildCounterGoogleCloudDialogflowV2TextToSpeechSettings++; |
| if (buildCounterGoogleCloudDialogflowV2TextToSpeechSettings < 3) { |
| o.enableTextToSpeech = true; |
| o.outputAudioEncoding = 'foo'; |
| o.sampleRateHertz = 42; |
| o.synthesizeSpeechConfigs = buildUnnamed171(); |
| } |
| buildCounterGoogleCloudDialogflowV2TextToSpeechSettings--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2TextToSpeechSettings( |
| api.GoogleCloudDialogflowV2TextToSpeechSettings o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2TextToSpeechSettings++; |
| if (buildCounterGoogleCloudDialogflowV2TextToSpeechSettings < 3) { |
| unittest.expect(o.enableTextToSpeech!, unittest.isTrue); |
| unittest.expect(o.outputAudioEncoding!, unittest.equals('foo')); |
| unittest.expect(o.sampleRateHertz!, unittest.equals(42)); |
| checkUnnamed171(o.synthesizeSpeechConfigs!); |
| } |
| buildCounterGoogleCloudDialogflowV2TextToSpeechSettings--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed172() => { |
| 'x': 'foo', |
| 'y': 'foo', |
| }; |
| |
| void checkUnnamed172(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Tool = 0; |
| api.GoogleCloudDialogflowV2Tool buildGoogleCloudDialogflowV2Tool() { |
| final o = api.GoogleCloudDialogflowV2Tool(); |
| buildCounterGoogleCloudDialogflowV2Tool++; |
| if (buildCounterGoogleCloudDialogflowV2Tool < 3) { |
| o.actionConfirmationRequirement = buildUnnamed172(); |
| o.connectorSpec = buildGoogleCloudDialogflowV2ToolConnectorTool(); |
| o.createTime = 'foo'; |
| o.description = 'foo'; |
| o.displayName = 'foo'; |
| o.extensionSpec = buildGoogleCloudDialogflowV2ToolExtensionTool(); |
| o.functionSpec = buildGoogleCloudDialogflowV2ToolFunctionTool(); |
| o.name = 'foo'; |
| o.openApiSpec = buildGoogleCloudDialogflowV2ToolOpenApiTool(); |
| o.satisfiesPzi = true; |
| o.satisfiesPzs = true; |
| o.toolKey = 'foo'; |
| o.updateTime = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2Tool--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Tool(api.GoogleCloudDialogflowV2Tool o) { |
| buildCounterGoogleCloudDialogflowV2Tool++; |
| if (buildCounterGoogleCloudDialogflowV2Tool < 3) { |
| checkUnnamed172(o.actionConfirmationRequirement!); |
| checkGoogleCloudDialogflowV2ToolConnectorTool(o.connectorSpec!); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ToolExtensionTool(o.extensionSpec!); |
| checkGoogleCloudDialogflowV2ToolFunctionTool(o.functionSpec!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ToolOpenApiTool(o.openApiSpec!); |
| unittest.expect(o.satisfiesPzi!, unittest.isTrue); |
| unittest.expect(o.satisfiesPzs!, unittest.isTrue); |
| unittest.expect(o.toolKey!, unittest.equals('foo')); |
| unittest.expect(o.updateTime!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2Tool--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolAuthentication = 0; |
| api.GoogleCloudDialogflowV2ToolAuthentication |
| buildGoogleCloudDialogflowV2ToolAuthentication() { |
| final o = api.GoogleCloudDialogflowV2ToolAuthentication(); |
| buildCounterGoogleCloudDialogflowV2ToolAuthentication++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthentication < 3) { |
| o.apiKeyConfig = |
| buildGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig(); |
| o.bearerTokenConfig = |
| buildGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig(); |
| o.oauthConfig = buildGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig(); |
| o.serviceAgentAuthConfig = |
| buildGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthentication--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolAuthentication( |
| api.GoogleCloudDialogflowV2ToolAuthentication o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolAuthentication++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthentication < 3) { |
| checkGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig(o.apiKeyConfig!); |
| checkGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig( |
| o.bearerTokenConfig!, |
| ); |
| checkGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig(o.oauthConfig!); |
| checkGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig( |
| o.serviceAgentAuthConfig!, |
| ); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthentication--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig = 0; |
| api.GoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig |
| buildGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig() { |
| final o = api.GoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig(); |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig < 3) { |
| o.apiKey = 'foo'; |
| o.keyName = 'foo'; |
| o.requestLocation = 'foo'; |
| o.secretVersionForApiKey = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig( |
| api.GoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig < 3) { |
| unittest.expect(o.apiKey!, unittest.equals('foo')); |
| unittest.expect(o.keyName!, unittest.equals('foo')); |
| unittest.expect(o.requestLocation!, unittest.equals('foo')); |
| unittest.expect(o.secretVersionForApiKey!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig = 0; |
| api.GoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig |
| buildGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig() { |
| final o = api.GoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig(); |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig < |
| 3) { |
| o.secretVersionForToken = 'foo'; |
| o.token = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig( |
| api.GoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig < |
| 3) { |
| unittest.expect(o.secretVersionForToken!, unittest.equals('foo')); |
| unittest.expect(o.token!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig--; |
| } |
| |
| core.List<core.String> buildUnnamed173() => ['foo', 'foo']; |
| |
| void checkUnnamed173(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig = 0; |
| api.GoogleCloudDialogflowV2ToolAuthenticationOAuthConfig |
| buildGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig() { |
| final o = api.GoogleCloudDialogflowV2ToolAuthenticationOAuthConfig(); |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig < 3) { |
| o.clientId = 'foo'; |
| o.clientSecret = 'foo'; |
| o.oauthGrantType = 'foo'; |
| o.scopes = buildUnnamed173(); |
| o.secretVersionForClientSecret = 'foo'; |
| o.tokenEndpoint = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig( |
| api.GoogleCloudDialogflowV2ToolAuthenticationOAuthConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig < 3) { |
| unittest.expect(o.clientId!, unittest.equals('foo')); |
| unittest.expect(o.clientSecret!, unittest.equals('foo')); |
| unittest.expect(o.oauthGrantType!, unittest.equals('foo')); |
| checkUnnamed173(o.scopes!); |
| unittest.expect(o.secretVersionForClientSecret!, unittest.equals('foo')); |
| unittest.expect(o.tokenEndpoint!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig = 0; |
| api.GoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig |
| buildGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig() { |
| final o = |
| api.GoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig(); |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig < |
| 3) { |
| o.serviceAgentAuth = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig( |
| api.GoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig < |
| 3) { |
| unittest.expect(o.serviceAgentAuth!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed174() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed174(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted26 = (o['x']!) as core.Map; |
| unittest.expect(casted26, unittest.hasLength(3)); |
| unittest.expect(casted26['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted26['bool'], unittest.equals(true)); |
| unittest.expect(casted26['string'], unittest.equals('foo')); |
| var casted27 = (o['y']!) as core.Map; |
| unittest.expect(casted27, unittest.hasLength(3)); |
| unittest.expect(casted27['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted27['bool'], unittest.equals(true)); |
| unittest.expect(casted27['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolCall = 0; |
| api.GoogleCloudDialogflowV2ToolCall buildGoogleCloudDialogflowV2ToolCall() { |
| final o = api.GoogleCloudDialogflowV2ToolCall(); |
| buildCounterGoogleCloudDialogflowV2ToolCall++; |
| if (buildCounterGoogleCloudDialogflowV2ToolCall < 3) { |
| o.action = 'foo'; |
| o.answerRecord = 'foo'; |
| o.cesApp = 'foo'; |
| o.cesTool = 'foo'; |
| o.cesToolset = 'foo'; |
| o.createTime = 'foo'; |
| o.inputParameters = buildUnnamed174(); |
| o.state = 'foo'; |
| o.tool = 'foo'; |
| o.toolDisplayDetails = 'foo'; |
| o.toolDisplayName = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolCall--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolCall( |
| api.GoogleCloudDialogflowV2ToolCall o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolCall++; |
| if (buildCounterGoogleCloudDialogflowV2ToolCall < 3) { |
| unittest.expect(o.action!, unittest.equals('foo')); |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.cesApp!, unittest.equals('foo')); |
| unittest.expect(o.cesTool!, unittest.equals('foo')); |
| unittest.expect(o.cesToolset!, unittest.equals('foo')); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| checkUnnamed174(o.inputParameters!); |
| unittest.expect(o.state!, unittest.equals('foo')); |
| unittest.expect(o.tool!, unittest.equals('foo')); |
| unittest.expect(o.toolDisplayDetails!, unittest.equals('foo')); |
| unittest.expect(o.toolDisplayName!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolCall--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolCallResult = 0; |
| api.GoogleCloudDialogflowV2ToolCallResult |
| buildGoogleCloudDialogflowV2ToolCallResult() { |
| final o = api.GoogleCloudDialogflowV2ToolCallResult(); |
| buildCounterGoogleCloudDialogflowV2ToolCallResult++; |
| if (buildCounterGoogleCloudDialogflowV2ToolCallResult < 3) { |
| o.action = 'foo'; |
| o.answerRecord = 'foo'; |
| o.cesApp = 'foo'; |
| o.cesTool = 'foo'; |
| o.cesToolset = 'foo'; |
| o.content = 'foo'; |
| o.createTime = 'foo'; |
| o.error = buildGoogleCloudDialogflowV2ToolCallResultError(); |
| o.rawContent = 'foo'; |
| o.tool = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolCallResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolCallResult( |
| api.GoogleCloudDialogflowV2ToolCallResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolCallResult++; |
| if (buildCounterGoogleCloudDialogflowV2ToolCallResult < 3) { |
| unittest.expect(o.action!, unittest.equals('foo')); |
| unittest.expect(o.answerRecord!, unittest.equals('foo')); |
| unittest.expect(o.cesApp!, unittest.equals('foo')); |
| unittest.expect(o.cesTool!, unittest.equals('foo')); |
| unittest.expect(o.cesToolset!, unittest.equals('foo')); |
| unittest.expect(o.content!, unittest.equals('foo')); |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ToolCallResultError(o.error!); |
| unittest.expect(o.rawContent!, unittest.equals('foo')); |
| unittest.expect(o.tool!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolCallResult--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolCallResultError = 0; |
| api.GoogleCloudDialogflowV2ToolCallResultError |
| buildGoogleCloudDialogflowV2ToolCallResultError() { |
| final o = api.GoogleCloudDialogflowV2ToolCallResultError(); |
| buildCounterGoogleCloudDialogflowV2ToolCallResultError++; |
| if (buildCounterGoogleCloudDialogflowV2ToolCallResultError < 3) { |
| o.message = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolCallResultError--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolCallResultError( |
| api.GoogleCloudDialogflowV2ToolCallResultError o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolCallResultError++; |
| if (buildCounterGoogleCloudDialogflowV2ToolCallResultError < 3) { |
| unittest.expect(o.message!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolCallResultError--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ToolConnectorToolAction> |
| buildUnnamed175() => [ |
| buildGoogleCloudDialogflowV2ToolConnectorToolAction(), |
| buildGoogleCloudDialogflowV2ToolConnectorToolAction(), |
| ]; |
| |
| void checkUnnamed175( |
| core.List<api.GoogleCloudDialogflowV2ToolConnectorToolAction> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ToolConnectorToolAction(o[0]); |
| checkGoogleCloudDialogflowV2ToolConnectorToolAction(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolConnectorTool = 0; |
| api.GoogleCloudDialogflowV2ToolConnectorTool |
| buildGoogleCloudDialogflowV2ToolConnectorTool() { |
| final o = api.GoogleCloudDialogflowV2ToolConnectorTool(); |
| buildCounterGoogleCloudDialogflowV2ToolConnectorTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolConnectorTool < 3) { |
| o.actions = buildUnnamed175(); |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolConnectorTool--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolConnectorTool( |
| api.GoogleCloudDialogflowV2ToolConnectorTool o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolConnectorTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolConnectorTool < 3) { |
| checkUnnamed175(o.actions!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolConnectorTool--; |
| } |
| |
| core.List<core.String> buildUnnamed176() => ['foo', 'foo']; |
| |
| void checkUnnamed176(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.List<core.String> buildUnnamed177() => ['foo', 'foo']; |
| |
| void checkUnnamed177(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolConnectorToolAction = 0; |
| api.GoogleCloudDialogflowV2ToolConnectorToolAction |
| buildGoogleCloudDialogflowV2ToolConnectorToolAction() { |
| final o = api.GoogleCloudDialogflowV2ToolConnectorToolAction(); |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolAction++; |
| if (buildCounterGoogleCloudDialogflowV2ToolConnectorToolAction < 3) { |
| o.connectionActionId = 'foo'; |
| o.entityOperation = |
| buildGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation(); |
| o.inputFields = buildUnnamed176(); |
| o.outputFields = buildUnnamed177(); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolAction--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolConnectorToolAction( |
| api.GoogleCloudDialogflowV2ToolConnectorToolAction o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolAction++; |
| if (buildCounterGoogleCloudDialogflowV2ToolConnectorToolAction < 3) { |
| unittest.expect(o.connectionActionId!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation( |
| o.entityOperation!, |
| ); |
| checkUnnamed176(o.inputFields!); |
| checkUnnamed177(o.outputFields!); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolAction--; |
| } |
| |
| core.int |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation = 0; |
| api.GoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation |
| buildGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation() { |
| final o = api.GoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation(); |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation++; |
| if (buildCounterGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation < |
| 3) { |
| o.entityId = 'foo'; |
| o.operation = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation( |
| api.GoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation++; |
| if (buildCounterGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation < |
| 3) { |
| unittest.expect(o.entityId!, unittest.equals('foo')); |
| unittest.expect(o.operation!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolExtensionTool = 0; |
| api.GoogleCloudDialogflowV2ToolExtensionTool |
| buildGoogleCloudDialogflowV2ToolExtensionTool() { |
| final o = api.GoogleCloudDialogflowV2ToolExtensionTool(); |
| buildCounterGoogleCloudDialogflowV2ToolExtensionTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolExtensionTool < 3) { |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolExtensionTool--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolExtensionTool( |
| api.GoogleCloudDialogflowV2ToolExtensionTool o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolExtensionTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolExtensionTool < 3) { |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolExtensionTool--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed178() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed178(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted28 = (o['x']!) as core.Map; |
| unittest.expect(casted28, unittest.hasLength(3)); |
| unittest.expect(casted28['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted28['bool'], unittest.equals(true)); |
| unittest.expect(casted28['string'], unittest.equals('foo')); |
| var casted29 = (o['y']!) as core.Map; |
| unittest.expect(casted29, unittest.hasLength(3)); |
| unittest.expect(casted29['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted29['bool'], unittest.equals(true)); |
| unittest.expect(casted29['string'], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed179() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed179(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted30 = (o['x']!) as core.Map; |
| unittest.expect(casted30, unittest.hasLength(3)); |
| unittest.expect(casted30['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted30['bool'], unittest.equals(true)); |
| unittest.expect(casted30['string'], unittest.equals('foo')); |
| var casted31 = (o['y']!) as core.Map; |
| unittest.expect(casted31, unittest.hasLength(3)); |
| unittest.expect(casted31['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted31['bool'], unittest.equals(true)); |
| unittest.expect(casted31['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolFunctionTool = 0; |
| api.GoogleCloudDialogflowV2ToolFunctionTool |
| buildGoogleCloudDialogflowV2ToolFunctionTool() { |
| final o = api.GoogleCloudDialogflowV2ToolFunctionTool(); |
| buildCounterGoogleCloudDialogflowV2ToolFunctionTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolFunctionTool < 3) { |
| o.inputSchema = buildUnnamed178(); |
| o.methodType = 'foo'; |
| o.outputSchema = buildUnnamed179(); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolFunctionTool--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolFunctionTool( |
| api.GoogleCloudDialogflowV2ToolFunctionTool o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolFunctionTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolFunctionTool < 3) { |
| checkUnnamed178(o.inputSchema!); |
| unittest.expect(o.methodType!, unittest.equals('foo')); |
| checkUnnamed179(o.outputSchema!); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolFunctionTool--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolOpenApiTool = 0; |
| api.GoogleCloudDialogflowV2ToolOpenApiTool |
| buildGoogleCloudDialogflowV2ToolOpenApiTool() { |
| final o = api.GoogleCloudDialogflowV2ToolOpenApiTool(); |
| buildCounterGoogleCloudDialogflowV2ToolOpenApiTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolOpenApiTool < 3) { |
| o.authentication = buildGoogleCloudDialogflowV2ToolAuthentication(); |
| o.serviceDirectoryConfig = |
| buildGoogleCloudDialogflowV2ToolServiceDirectoryConfig(); |
| o.textSchema = 'foo'; |
| o.tlsConfig = buildGoogleCloudDialogflowV2ToolTLSConfig(); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolOpenApiTool--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolOpenApiTool( |
| api.GoogleCloudDialogflowV2ToolOpenApiTool o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolOpenApiTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolOpenApiTool < 3) { |
| checkGoogleCloudDialogflowV2ToolAuthentication(o.authentication!); |
| checkGoogleCloudDialogflowV2ToolServiceDirectoryConfig( |
| o.serviceDirectoryConfig!, |
| ); |
| unittest.expect(o.textSchema!, unittest.equals('foo')); |
| checkGoogleCloudDialogflowV2ToolTLSConfig(o.tlsConfig!); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolOpenApiTool--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolServiceDirectoryConfig = 0; |
| api.GoogleCloudDialogflowV2ToolServiceDirectoryConfig |
| buildGoogleCloudDialogflowV2ToolServiceDirectoryConfig() { |
| final o = api.GoogleCloudDialogflowV2ToolServiceDirectoryConfig(); |
| buildCounterGoogleCloudDialogflowV2ToolServiceDirectoryConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolServiceDirectoryConfig < 3) { |
| o.service = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolServiceDirectoryConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolServiceDirectoryConfig( |
| api.GoogleCloudDialogflowV2ToolServiceDirectoryConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolServiceDirectoryConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolServiceDirectoryConfig < 3) { |
| unittest.expect(o.service!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolServiceDirectoryConfig--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ToolTLSConfigCACert> buildUnnamed180() => [ |
| buildGoogleCloudDialogflowV2ToolTLSConfigCACert(), |
| buildGoogleCloudDialogflowV2ToolTLSConfigCACert(), |
| ]; |
| |
| void checkUnnamed180( |
| core.List<api.GoogleCloudDialogflowV2ToolTLSConfigCACert> o, |
| ) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ToolTLSConfigCACert(o[0]); |
| checkGoogleCloudDialogflowV2ToolTLSConfigCACert(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolTLSConfig = 0; |
| api.GoogleCloudDialogflowV2ToolTLSConfig |
| buildGoogleCloudDialogflowV2ToolTLSConfig() { |
| final o = api.GoogleCloudDialogflowV2ToolTLSConfig(); |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolTLSConfig < 3) { |
| o.caCerts = buildUnnamed180(); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfig--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolTLSConfig( |
| api.GoogleCloudDialogflowV2ToolTLSConfig o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfig++; |
| if (buildCounterGoogleCloudDialogflowV2ToolTLSConfig < 3) { |
| checkUnnamed180(o.caCerts!); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfig--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolTLSConfigCACert = 0; |
| api.GoogleCloudDialogflowV2ToolTLSConfigCACert |
| buildGoogleCloudDialogflowV2ToolTLSConfigCACert() { |
| final o = api.GoogleCloudDialogflowV2ToolTLSConfigCACert(); |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfigCACert++; |
| if (buildCounterGoogleCloudDialogflowV2ToolTLSConfigCACert < 3) { |
| o.cert = 'foo'; |
| o.displayName = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfigCACert--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolTLSConfigCACert( |
| api.GoogleCloudDialogflowV2ToolTLSConfigCACert o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfigCACert++; |
| if (buildCounterGoogleCloudDialogflowV2ToolTLSConfigCACert < 3) { |
| unittest.expect(o.cert!, unittest.equals('foo')); |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolTLSConfigCACert--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ToolsetTool = 0; |
| api.GoogleCloudDialogflowV2ToolsetTool |
| buildGoogleCloudDialogflowV2ToolsetTool() { |
| final o = api.GoogleCloudDialogflowV2ToolsetTool(); |
| buildCounterGoogleCloudDialogflowV2ToolsetTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolsetTool < 3) { |
| o.confirmationRequirement = 'foo'; |
| o.operationId = 'foo'; |
| o.toolset = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ToolsetTool--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ToolsetTool( |
| api.GoogleCloudDialogflowV2ToolsetTool o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ToolsetTool++; |
| if (buildCounterGoogleCloudDialogflowV2ToolsetTool < 3) { |
| unittest.expect(o.confirmationRequirement!, unittest.equals('foo')); |
| unittest.expect(o.operationId!, unittest.equals('foo')); |
| unittest.expect(o.toolset!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ToolsetTool--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2TrainAgentRequest = 0; |
| api.GoogleCloudDialogflowV2TrainAgentRequest |
| buildGoogleCloudDialogflowV2TrainAgentRequest() { |
| final o = api.GoogleCloudDialogflowV2TrainAgentRequest(); |
| buildCounterGoogleCloudDialogflowV2TrainAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2TrainAgentRequest < 3) {} |
| buildCounterGoogleCloudDialogflowV2TrainAgentRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2TrainAgentRequest( |
| api.GoogleCloudDialogflowV2TrainAgentRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2TrainAgentRequest++; |
| if (buildCounterGoogleCloudDialogflowV2TrainAgentRequest < 3) {} |
| buildCounterGoogleCloudDialogflowV2TrainAgentRequest--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2UndeployConversationModelRequest = |
| 0; |
| api.GoogleCloudDialogflowV2UndeployConversationModelRequest |
| buildGoogleCloudDialogflowV2UndeployConversationModelRequest() { |
| final o = api.GoogleCloudDialogflowV2UndeployConversationModelRequest(); |
| buildCounterGoogleCloudDialogflowV2UndeployConversationModelRequest++; |
| if (buildCounterGoogleCloudDialogflowV2UndeployConversationModelRequest < |
| 3) {} |
| buildCounterGoogleCloudDialogflowV2UndeployConversationModelRequest--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2UndeployConversationModelRequest( |
| api.GoogleCloudDialogflowV2UndeployConversationModelRequest o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2UndeployConversationModelRequest++; |
| if (buildCounterGoogleCloudDialogflowV2UndeployConversationModelRequest < |
| 3) {} |
| buildCounterGoogleCloudDialogflowV2UndeployConversationModelRequest--; |
| } |
| |
| core.List<core.String> buildUnnamed181() => ['foo', 'foo']; |
| |
| void checkUnnamed181(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ValidationError = 0; |
| api.GoogleCloudDialogflowV2ValidationError |
| buildGoogleCloudDialogflowV2ValidationError() { |
| final o = api.GoogleCloudDialogflowV2ValidationError(); |
| buildCounterGoogleCloudDialogflowV2ValidationError++; |
| if (buildCounterGoogleCloudDialogflowV2ValidationError < 3) { |
| o.entries = buildUnnamed181(); |
| o.errorMessage = 'foo'; |
| o.severity = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2ValidationError--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ValidationError( |
| api.GoogleCloudDialogflowV2ValidationError o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ValidationError++; |
| if (buildCounterGoogleCloudDialogflowV2ValidationError < 3) { |
| checkUnnamed181(o.entries!); |
| unittest.expect(o.errorMessage!, unittest.equals('foo')); |
| unittest.expect(o.severity!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2ValidationError--; |
| } |
| |
| core.List<api.GoogleCloudDialogflowV2ValidationError> buildUnnamed182() => [ |
| buildGoogleCloudDialogflowV2ValidationError(), |
| buildGoogleCloudDialogflowV2ValidationError(), |
| ]; |
| |
| void checkUnnamed182(core.List<api.GoogleCloudDialogflowV2ValidationError> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudDialogflowV2ValidationError(o[0]); |
| checkGoogleCloudDialogflowV2ValidationError(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2ValidationResult = 0; |
| api.GoogleCloudDialogflowV2ValidationResult |
| buildGoogleCloudDialogflowV2ValidationResult() { |
| final o = api.GoogleCloudDialogflowV2ValidationResult(); |
| buildCounterGoogleCloudDialogflowV2ValidationResult++; |
| if (buildCounterGoogleCloudDialogflowV2ValidationResult < 3) { |
| o.validationErrors = buildUnnamed182(); |
| } |
| buildCounterGoogleCloudDialogflowV2ValidationResult--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2ValidationResult( |
| api.GoogleCloudDialogflowV2ValidationResult o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2ValidationResult++; |
| if (buildCounterGoogleCloudDialogflowV2ValidationResult < 3) { |
| checkUnnamed182(o.validationErrors!); |
| } |
| buildCounterGoogleCloudDialogflowV2ValidationResult--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2Version = 0; |
| api.GoogleCloudDialogflowV2Version buildGoogleCloudDialogflowV2Version() { |
| final o = api.GoogleCloudDialogflowV2Version(); |
| buildCounterGoogleCloudDialogflowV2Version++; |
| if (buildCounterGoogleCloudDialogflowV2Version < 3) { |
| o.createTime = 'foo'; |
| o.description = 'foo'; |
| o.name = 'foo'; |
| o.status = 'foo'; |
| o.versionNumber = 42; |
| } |
| buildCounterGoogleCloudDialogflowV2Version--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2Version(api.GoogleCloudDialogflowV2Version o) { |
| buildCounterGoogleCloudDialogflowV2Version++; |
| if (buildCounterGoogleCloudDialogflowV2Version < 3) { |
| unittest.expect(o.createTime!, unittest.equals('foo')); |
| unittest.expect(o.description!, unittest.equals('foo')); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.status!, unittest.equals('foo')); |
| unittest.expect(o.versionNumber!, unittest.equals(42)); |
| } |
| buildCounterGoogleCloudDialogflowV2Version--; |
| } |
| |
| core.int buildCounterGoogleCloudDialogflowV2VoiceSelectionParams = 0; |
| api.GoogleCloudDialogflowV2VoiceSelectionParams |
| buildGoogleCloudDialogflowV2VoiceSelectionParams() { |
| final o = api.GoogleCloudDialogflowV2VoiceSelectionParams(); |
| buildCounterGoogleCloudDialogflowV2VoiceSelectionParams++; |
| if (buildCounterGoogleCloudDialogflowV2VoiceSelectionParams < 3) { |
| o.name = 'foo'; |
| o.ssmlGender = 'foo'; |
| } |
| buildCounterGoogleCloudDialogflowV2VoiceSelectionParams--; |
| return o; |
| } |
| |
| void checkGoogleCloudDialogflowV2VoiceSelectionParams( |
| api.GoogleCloudDialogflowV2VoiceSelectionParams o, |
| ) { |
| buildCounterGoogleCloudDialogflowV2VoiceSelectionParams++; |
| if (buildCounterGoogleCloudDialogflowV2VoiceSelectionParams < 3) { |
| unittest.expect(o.name!, unittest.equals('foo')); |
| unittest.expect(o.ssmlGender!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudDialogflowV2VoiceSelectionParams--; |
| } |
| |
| core.List<api.GoogleCloudLocationLocation> buildUnnamed183() => [ |
| buildGoogleCloudLocationLocation(), |
| buildGoogleCloudLocationLocation(), |
| ]; |
| |
| void checkUnnamed183(core.List<api.GoogleCloudLocationLocation> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleCloudLocationLocation(o[0]); |
| checkGoogleCloudLocationLocation(o[1]); |
| } |
| |
| core.int buildCounterGoogleCloudLocationListLocationsResponse = 0; |
| api.GoogleCloudLocationListLocationsResponse |
| buildGoogleCloudLocationListLocationsResponse() { |
| final o = api.GoogleCloudLocationListLocationsResponse(); |
| buildCounterGoogleCloudLocationListLocationsResponse++; |
| if (buildCounterGoogleCloudLocationListLocationsResponse < 3) { |
| o.locations = buildUnnamed183(); |
| o.nextPageToken = 'foo'; |
| } |
| buildCounterGoogleCloudLocationListLocationsResponse--; |
| return o; |
| } |
| |
| void checkGoogleCloudLocationListLocationsResponse( |
| api.GoogleCloudLocationListLocationsResponse o, |
| ) { |
| buildCounterGoogleCloudLocationListLocationsResponse++; |
| if (buildCounterGoogleCloudLocationListLocationsResponse < 3) { |
| checkUnnamed183(o.locations!); |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudLocationListLocationsResponse--; |
| } |
| |
| core.Map<core.String, core.String> buildUnnamed184() => { |
| 'x': 'foo', |
| 'y': 'foo', |
| }; |
| |
| void checkUnnamed184(core.Map<core.String, core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o['x']!, unittest.equals('foo')); |
| unittest.expect(o['y']!, unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed185() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed185(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted32 = (o['x']!) as core.Map; |
| unittest.expect(casted32, unittest.hasLength(3)); |
| unittest.expect(casted32['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted32['bool'], unittest.equals(true)); |
| unittest.expect(casted32['string'], unittest.equals('foo')); |
| var casted33 = (o['y']!) as core.Map; |
| unittest.expect(casted33, unittest.hasLength(3)); |
| unittest.expect(casted33['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted33['bool'], unittest.equals(true)); |
| unittest.expect(casted33['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleCloudLocationLocation = 0; |
| api.GoogleCloudLocationLocation buildGoogleCloudLocationLocation() { |
| final o = api.GoogleCloudLocationLocation(); |
| buildCounterGoogleCloudLocationLocation++; |
| if (buildCounterGoogleCloudLocationLocation < 3) { |
| o.displayName = 'foo'; |
| o.labels = buildUnnamed184(); |
| o.locationId = 'foo'; |
| o.metadata = buildUnnamed185(); |
| o.name = 'foo'; |
| } |
| buildCounterGoogleCloudLocationLocation--; |
| return o; |
| } |
| |
| void checkGoogleCloudLocationLocation(api.GoogleCloudLocationLocation o) { |
| buildCounterGoogleCloudLocationLocation++; |
| if (buildCounterGoogleCloudLocationLocation < 3) { |
| unittest.expect(o.displayName!, unittest.equals('foo')); |
| checkUnnamed184(o.labels!); |
| unittest.expect(o.locationId!, unittest.equals('foo')); |
| checkUnnamed185(o.metadata!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| } |
| buildCounterGoogleCloudLocationLocation--; |
| } |
| |
| core.List<api.GoogleLongrunningOperation> buildUnnamed186() => [ |
| buildGoogleLongrunningOperation(), |
| buildGoogleLongrunningOperation(), |
| ]; |
| |
| void checkUnnamed186(core.List<api.GoogleLongrunningOperation> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkGoogleLongrunningOperation(o[0]); |
| checkGoogleLongrunningOperation(o[1]); |
| } |
| |
| core.List<core.String> buildUnnamed187() => ['foo', 'foo']; |
| |
| void checkUnnamed187(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleLongrunningListOperationsResponse = 0; |
| api.GoogleLongrunningListOperationsResponse |
| buildGoogleLongrunningListOperationsResponse() { |
| final o = api.GoogleLongrunningListOperationsResponse(); |
| buildCounterGoogleLongrunningListOperationsResponse++; |
| if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
| o.nextPageToken = 'foo'; |
| o.operations = buildUnnamed186(); |
| o.unreachable = buildUnnamed187(); |
| } |
| buildCounterGoogleLongrunningListOperationsResponse--; |
| return o; |
| } |
| |
| void checkGoogleLongrunningListOperationsResponse( |
| api.GoogleLongrunningListOperationsResponse o, |
| ) { |
| buildCounterGoogleLongrunningListOperationsResponse++; |
| if (buildCounterGoogleLongrunningListOperationsResponse < 3) { |
| unittest.expect(o.nextPageToken!, unittest.equals('foo')); |
| checkUnnamed186(o.operations!); |
| checkUnnamed187(o.unreachable!); |
| } |
| buildCounterGoogleLongrunningListOperationsResponse--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed188() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed188(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted34 = (o['x']!) as core.Map; |
| unittest.expect(casted34, unittest.hasLength(3)); |
| unittest.expect(casted34['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted34['bool'], unittest.equals(true)); |
| unittest.expect(casted34['string'], unittest.equals('foo')); |
| var casted35 = (o['y']!) as core.Map; |
| unittest.expect(casted35, unittest.hasLength(3)); |
| unittest.expect(casted35['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted35['bool'], unittest.equals(true)); |
| unittest.expect(casted35['string'], unittest.equals('foo')); |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed189() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed189(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted36 = (o['x']!) as core.Map; |
| unittest.expect(casted36, unittest.hasLength(3)); |
| unittest.expect(casted36['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted36['bool'], unittest.equals(true)); |
| unittest.expect(casted36['string'], unittest.equals('foo')); |
| var casted37 = (o['y']!) as core.Map; |
| unittest.expect(casted37, unittest.hasLength(3)); |
| unittest.expect(casted37['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted37['bool'], unittest.equals(true)); |
| unittest.expect(casted37['string'], unittest.equals('foo')); |
| } |
| |
| core.int buildCounterGoogleLongrunningOperation = 0; |
| api.GoogleLongrunningOperation buildGoogleLongrunningOperation() { |
| final o = api.GoogleLongrunningOperation(); |
| buildCounterGoogleLongrunningOperation++; |
| if (buildCounterGoogleLongrunningOperation < 3) { |
| o.done = true; |
| o.error = buildGoogleRpcStatus(); |
| o.metadata = buildUnnamed188(); |
| o.name = 'foo'; |
| o.response = buildUnnamed189(); |
| } |
| buildCounterGoogleLongrunningOperation--; |
| return o; |
| } |
| |
| void checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { |
| buildCounterGoogleLongrunningOperation++; |
| if (buildCounterGoogleLongrunningOperation < 3) { |
| unittest.expect(o.done!, unittest.isTrue); |
| checkGoogleRpcStatus(o.error!); |
| checkUnnamed188(o.metadata!); |
| unittest.expect(o.name!, unittest.equals('foo')); |
| checkUnnamed189(o.response!); |
| } |
| buildCounterGoogleLongrunningOperation--; |
| } |
| |
| core.int buildCounterGoogleProtobufEmpty = 0; |
| api.GoogleProtobufEmpty buildGoogleProtobufEmpty() { |
| final o = api.GoogleProtobufEmpty(); |
| buildCounterGoogleProtobufEmpty++; |
| if (buildCounterGoogleProtobufEmpty < 3) {} |
| buildCounterGoogleProtobufEmpty--; |
| return o; |
| } |
| |
| void checkGoogleProtobufEmpty(api.GoogleProtobufEmpty o) { |
| buildCounterGoogleProtobufEmpty++; |
| if (buildCounterGoogleProtobufEmpty < 3) {} |
| buildCounterGoogleProtobufEmpty--; |
| } |
| |
| core.Map<core.String, core.Object?> buildUnnamed190() => { |
| 'x': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| 'y': { |
| 'list': [1, 2, 3], |
| 'bool': true, |
| 'string': 'foo', |
| }, |
| }; |
| |
| void checkUnnamed190(core.Map<core.String, core.Object?> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| var casted38 = (o['x']!) as core.Map; |
| unittest.expect(casted38, unittest.hasLength(3)); |
| unittest.expect(casted38['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted38['bool'], unittest.equals(true)); |
| unittest.expect(casted38['string'], unittest.equals('foo')); |
| var casted39 = (o['y']!) as core.Map; |
| unittest.expect(casted39, unittest.hasLength(3)); |
| unittest.expect(casted39['list'], unittest.equals([1, 2, 3])); |
| unittest.expect(casted39['bool'], unittest.equals(true)); |
| unittest.expect(casted39['string'], unittest.equals('foo')); |
| } |
| |
| core.List<core.Map<core.String, core.Object?>> buildUnnamed191() => [ |
| buildUnnamed190(), |
| buildUnnamed190(), |
| ]; |
| |
| void checkUnnamed191(core.List<core.Map<core.String, core.Object?>> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| checkUnnamed190(o[0]); |
| checkUnnamed190(o[1]); |
| } |
| |
| core.int buildCounterGoogleRpcStatus = 0; |
| api.GoogleRpcStatus buildGoogleRpcStatus() { |
| final o = api.GoogleRpcStatus(); |
| buildCounterGoogleRpcStatus++; |
| if (buildCounterGoogleRpcStatus < 3) { |
| o.code = 42; |
| o.details = buildUnnamed191(); |
| o.message = 'foo'; |
| } |
| buildCounterGoogleRpcStatus--; |
| return o; |
| } |
| |
| void checkGoogleRpcStatus(api.GoogleRpcStatus o) { |
| buildCounterGoogleRpcStatus++; |
| if (buildCounterGoogleRpcStatus < 3) { |
| unittest.expect(o.code!, unittest.equals(42)); |
| checkUnnamed191(o.details!); |
| unittest.expect(o.message!, unittest.equals('foo')); |
| } |
| buildCounterGoogleRpcStatus--; |
| } |
| |
| core.int buildCounterGoogleTypeLatLng = 0; |
| api.GoogleTypeLatLng buildGoogleTypeLatLng() { |
| final o = api.GoogleTypeLatLng(); |
| buildCounterGoogleTypeLatLng++; |
| if (buildCounterGoogleTypeLatLng < 3) { |
| o.latitude = 42.0; |
| o.longitude = 42.0; |
| } |
| buildCounterGoogleTypeLatLng--; |
| return o; |
| } |
| |
| void checkGoogleTypeLatLng(api.GoogleTypeLatLng o) { |
| buildCounterGoogleTypeLatLng++; |
| if (buildCounterGoogleTypeLatLng < 3) { |
| unittest.expect(o.latitude!, unittest.equals(42.0)); |
| unittest.expect(o.longitude!, unittest.equals(42.0)); |
| } |
| buildCounterGoogleTypeLatLng--; |
| } |
| |
| core.List<core.String> buildUnnamed192() => ['foo', 'foo']; |
| |
| void checkUnnamed192(core.List<core.String> o) { |
| unittest.expect(o, unittest.hasLength(2)); |
| unittest.expect(o[0], unittest.equals('foo')); |
| unittest.expect(o[1], unittest.equals('foo')); |
| } |
| |
| void main() { |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Agent', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Agent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Agent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Agent(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentAssistantFeedback', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AgentAssistantFeedback(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AgentAssistantFeedback.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentAssistantFeedback(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeAssistFeedback( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentAssistantFeedbackKnowledgeSearchFeedback( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentAssistantFeedbackSummarizationFeedback( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AgentAssistantRecord', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AgentAssistantRecord(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AgentAssistantRecord.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentAssistantRecord(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AgentCoachingContext', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AgentCoachingContext(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AgentCoachingContext.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingContext(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingInstruction', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AgentCoachingInstruction(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AgentCoachingInstruction.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingInstruction(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResult( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingInstructionDuplicateCheckResultDuplicateSuggestion( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingSuggestion', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AgentCoachingSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AgentCoachingSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestion(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionAgentActionSuggestion( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResult( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionDuplicateCheckResultDuplicateSuggestion( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionSampleResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AgentCoachingSuggestionSources', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AgentCoachingSuggestionSources(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2AgentCoachingSuggestionSources.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AgentCoachingSuggestionSources(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AnalyzeContentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AnalyzeContentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AnalyzeContentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnalyzeContentRequest(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2AnalyzeContentResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AnalyzeContentResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AnalyzeContentResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnalyzeContentResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AnnotatedMessagePart', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AnnotatedMessagePart(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AnnotatedMessagePart.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnnotatedMessagePart(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AnswerFeedback', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AnswerFeedback(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AnswerFeedback.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnswerFeedback(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AnswerRecord', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AnswerRecord(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AnswerRecord.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnswerRecord(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ArticleAnswer', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ArticleAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ArticleAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ArticleAnswer(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ArticleSuggestionModelMetadata', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ArticleSuggestionModelMetadata(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ArticleSuggestionModelMetadata.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ArticleSuggestionModelMetadata(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AssistQueryParameters', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AssistQueryParameters(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AssistQueryParameters.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AssistQueryParameters(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AudioInput', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AudioInput(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AudioInput.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AudioInput(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AutomatedAgentConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AutomatedAgentConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AutomatedAgentConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AutomatedAgentConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2AutomatedAgentReply', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2AutomatedAgentReply(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2AutomatedAgentReply.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AutomatedAgentReply(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2BatchCreateEntitiesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2BatchCreateEntitiesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2BatchCreateEntitiesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchCreateEntitiesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2BatchDeleteEntitiesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2BatchDeleteEntitiesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2BatchDeleteEntitiesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteEntitiesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2BatchDeleteIntentsRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2BatchDeleteIntentsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2BatchDeleteIntentsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteIntentsRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2BatchUpdateEntitiesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2BatchUpdateEntitiesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2BatchUpdateEntitiesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateEntitiesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2BatchUpdateIntentsRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2BatchUpdateIntentsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2BatchUpdateIntentsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateIntentsRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2CesAppSpec', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2CesAppSpec(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2CesAppSpec.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CesAppSpec(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2CesToolSpec', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2CesToolSpec(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2CesToolSpec.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CesToolSpec(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2CompleteConversationRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2CompleteConversationRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2CompleteConversationRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CompleteConversationRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Connection', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Connection(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Connection.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Connection(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConnectionErrorDetails', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConnectionErrorDetails(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ConnectionErrorDetails.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConnectionErrorDetails(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Context', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Context(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Context.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Conversation', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Conversation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Conversation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Conversation(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ConversationContext', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationContext(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ConversationContext.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationContext(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationContextReference', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationContextReference(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ConversationContextReference.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationContextReference(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationContextReferenceContextContent', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ConversationContextReferenceContextContent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ConversationContextReferenceContextContent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationContextReferenceContextContent( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ConversationDataset', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationDataset(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ConversationDataset.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationDataset(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationGeneratorContext', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationGeneratorContext(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ConversationGeneratorContext.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationGeneratorContext(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ConversationInfo', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ConversationInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationInfo(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ConversationModel', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationModel(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ConversationModel.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationModel(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationModelEvaluation', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationModelEvaluation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ConversationModelEvaluation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationModelEvaluation(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationPhoneNumber', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationPhoneNumber(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ConversationPhoneNumber.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationPhoneNumber(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ConversationProfile', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ConversationProfile(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ConversationProfile.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationTelephonyConnectionInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfo(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoMimeContent( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationTelephonyConnectionInfoSipHeader( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2CreateConversationModelEvaluationRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2CreateConversationModelEvaluationRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2CustomPronunciationParams', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2CustomPronunciationParams(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2CustomPronunciationParams.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CustomPronunciationParams(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2DeployConversationModelRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2DeployConversationModelRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2DeployConversationModelRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DeployConversationModelRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2DetectIntentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2DetectIntentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2DetectIntentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2DetectIntentResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2DetectIntentResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2DetectIntentResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentResponse(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2DialogflowAssistAnswer', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2DialogflowAssistAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2DialogflowAssistAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DialogflowAssistAnswer(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Document', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Document(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Document.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Document(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2DocumentReloadStatus', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2DocumentReloadStatus(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2DocumentReloadStatus.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DocumentReloadStatus(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2DtmfParameters', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2DtmfParameters(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2DtmfParameters.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DtmfParameters(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EncryptionSpec', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EncryptionSpec(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EncryptionSpec.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EncryptionSpec(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EntityType', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EntityType(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EntityType.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EntityType(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EntityTypeBatch', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EntityTypeBatch(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EntityTypeBatch.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EntityTypeBatch(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EntityTypeEntity', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EntityTypeEntity(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EntityTypeEntity.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EntityTypeEntity(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Environment', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Environment(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Environment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Environment(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EnvironmentHistory', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EnvironmentHistory(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EnvironmentHistory.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EnvironmentHistory(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2EnvironmentHistoryEntry', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EnvironmentHistoryEntry(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EnvironmentHistoryEntry.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EnvironmentHistoryEntry(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EvaluationConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EvaluationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EvaluationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EvaluationConfig(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EvaluationConfigSmartComposeConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EvaluationConfigSmartReplyConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EvaluationStatus', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EvaluationStatus(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EvaluationStatus.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EvaluationStatus(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2EventInput', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2EventInput(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2EventInput.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EventInput(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ExportAgentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ExportAgentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ExportAgentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ExportAgentRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ExportDocumentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ExportDocumentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ExportDocumentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ExportDocumentRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2FaqAnswer', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2FaqAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2FaqAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2FaqAnswer(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2FewShotExample', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2FewShotExample(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2FewShotExample.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2FewShotExample(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2FreeFormContext', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2FreeFormContext(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2FreeFormContext.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2FreeFormContext(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2FreeFormSuggestion', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2FreeFormSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2FreeFormSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2FreeFormSuggestion(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Fulfillment', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Fulfillment(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Fulfillment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Fulfillment(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2FulfillmentFeature', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2FulfillmentFeature(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2FulfillmentFeature.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2FulfillmentFeature(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2FulfillmentGenericWebService', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2FulfillmentGenericWebService(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2FulfillmentGenericWebService.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2FulfillmentGenericWebService(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2GcsDestination', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GcsDestination(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2GcsDestination.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GcsDestination(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2GcsSources', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GcsSources(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2GcsSources.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GcsSources(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateStatelessSuggestionRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateStatelessSuggestionRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateStatelessSuggestionResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateStatelessSuggestionResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateStatelessSummaryRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GenerateStatelessSummaryRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryRequestMinimalConversation( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateStatelessSummaryResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryResponseSummary(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateSuggestionsRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GenerateSuggestionsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateSuggestionsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateSuggestionsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GenerateSuggestionsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponseGeneratorSuggestionAnswer( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Generator', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Generator(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Generator.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Generator(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2GeneratorEvaluation', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GeneratorEvaluation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2GeneratorEvaluation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluation(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GeneratorEvaluationConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GeneratorEvaluationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigAgentAssistInputDataConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigDatasetInputDataConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigInputDataConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluationConfigSummarizationConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2GeneratorSuggestion', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GeneratorSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2GeneratorSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorSuggestion(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorSuggestionToolCallInfo(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2HumanAgentAssistantConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationModelConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigConversationProcessConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigMessageAnalysisConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionFeatureConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigContextFilterSettings( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySource( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDialogflowQuerySourceHumanAgentSideConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigDocumentQuerySource( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigKnowledgeBaseQuerySource( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionQueryConfigSections( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentAssistantConfigSuggestionTriggerSettings( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentHandoffConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2HumanAgentHandoffConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2HumanAgentHandoffConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentHandoffConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentHandoffConfigLivePersonConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2HumanAgentHandoffConfigSalesforceLiveAgentConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ImportAgentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ImportAgentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ImportAgentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportAgentRequest(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ImportConversationDataRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ImportConversationDataRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ImportConversationDataRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportConversationDataRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ImportDocumentTemplate', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ImportDocumentTemplate(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ImportDocumentTemplate.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportDocumentTemplate(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ImportDocumentsRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ImportDocumentsRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ImportDocumentsRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportDocumentsRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2InferenceParameter', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2InferenceParameter(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2InferenceParameter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2InferenceParameter(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IngestContextReferencesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IngestContextReferencesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IngestContextReferencesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IngestContextReferencesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IngestContextReferencesResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IngestContextReferencesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IngestContextReferencesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IngestContextReferencesResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IngestedContextReferenceDebugInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfo(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IngestedContextReferenceDebugInfoIngestedParameterDebugInfo( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2InitializeEncryptionSpecRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2InitializeEncryptionSpecRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2InitializeEncryptionSpecRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2InitializeEncryptionSpecRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2InputAudioConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2InputAudioConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2InputAudioConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2InputAudioConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2InputConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2InputConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2InputConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2InputConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2InputDataset', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2InputDataset(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2InputDataset.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2InputDataset(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Intent', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Intent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Intent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Intent(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentBatch', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentBatch(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentBatch.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentBatch(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentFollowupIntentInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentFollowupIntentInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentFollowupIntentInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentFollowupIntentInfo(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentMessage', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessage(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessage.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessage(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageBasicCard', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageBasicCard(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageBasicCard.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageBasicCard(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageBasicCardButton', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageBasicCardButton(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageBasicCardButton.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageBasicCardButton(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentMessageCard', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageCard(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageCard.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageCard(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageCardButton', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageCardButton(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageCardButton.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageCardButton(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageCarouselSelect', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageCarouselSelect(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageCarouselSelect.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageCarouselSelect(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageCarouselSelectItem', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageCarouselSelectItem.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageCarouselSelectItem(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageColumnProperties', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageColumnProperties(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageColumnProperties.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageColumnProperties(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentMessageImage', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageImage(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageImage.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageImage(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageListSelect', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageListSelect(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageListSelect.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageListSelect(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageListSelectItem', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageListSelectItem(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageListSelectItem.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageListSelectItem(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageMediaContent', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageMediaContent(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageMediaContent.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageMediaContent(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageQuickReplies', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageQuickReplies(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageQuickReplies.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageQuickReplies(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageSelectItemInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageSelectItemInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageSelectItemInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageSelectItemInfo(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageSimpleResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageSimpleResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageSimpleResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageSimpleResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageSimpleResponses', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageSimpleResponses(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageSimpleResponses.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageSimpleResponses(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageSuggestion', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageSuggestion(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageSuggestions', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageSuggestions(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageSuggestions.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageSuggestions(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageTableCard', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageTableCard(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageTableCard.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageTableCard(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageTableCardCell', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageTableCardCell(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageTableCardCell.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageTableCardCell(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentMessageTableCardRow', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageTableCardRow(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2IntentMessageTableCardRow.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageTableCardRow(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentMessageText', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentMessageText(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentMessageText.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentMessageText(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentParameter', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentParameter(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentParameter.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentParameter(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentSuggestion', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentSuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentSuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentSuggestion(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2IntentTrainingPhrase', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentTrainingPhrase(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentTrainingPhrase.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentTrainingPhrase(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2IntentTrainingPhrasePart', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2IntentTrainingPhrasePart(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2IntentTrainingPhrasePart.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IntentTrainingPhrasePart(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2KnowledgeAssistAnswer', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2KnowledgeAssistAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2KnowledgeAssistAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswer(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2KnowledgeAssistDebugInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2KnowledgeAssistDebugInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistDebugInfo(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeAssistDebugInfoKnowledgeAssistBehavior( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2KnowledgeBase', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2KnowledgeBase(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2KnowledgeBase.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListAnswerRecordsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListAnswerRecordsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListAnswerRecordsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListAnswerRecordsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ListContextsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListContextsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListContextsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListContextsResponse(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListConversationDatasetsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ListConversationDatasetsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListConversationDatasetsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationDatasetsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListConversationModelEvaluationsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListConversationModelEvaluationsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListConversationModelsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListConversationModelsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListConversationModelsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationModelsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListConversationProfilesResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ListConversationProfilesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListConversationProfilesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationProfilesResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListConversationsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListConversationsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListConversationsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ListDocumentsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListDocumentsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListDocumentsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListDocumentsResponse(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListEntityTypesResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListEntityTypesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListEntityTypesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListEntityTypesResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListEnvironmentsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListEnvironmentsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListEnvironmentsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListEnvironmentsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListGeneratorEvaluationsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListGeneratorEvaluationsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListGeneratorsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListGeneratorsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListGeneratorsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListGeneratorsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ListIntentsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListIntentsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListIntentsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListIntentsResponse(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListKnowledgeBasesResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListKnowledgeBasesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListKnowledgeBasesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListKnowledgeBasesResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ListMessagesResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListMessagesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListMessagesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListMessagesResponse(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListParticipantsResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListParticipantsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListParticipantsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListParticipantsResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ListSessionEntityTypesResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListSessionEntityTypesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListSessionEntityTypesResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ListSipTrunksResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListSipTrunksResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListSipTrunksResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListSipTrunksResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ListToolsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListToolsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListToolsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListToolsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ListVersionsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ListVersionsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ListVersionsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ListVersionsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2LoggingConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2LoggingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2LoggingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2LoggingConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Message', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Message(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Message.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Message(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2MessageAnnotation', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2MessageAnnotation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2MessageAnnotation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2MessageAnnotation(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2MessageEntry', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2MessageEntry(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2MessageEntry.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2MessageEntry(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2NotificationConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2NotificationConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2NotificationConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2NotificationConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2OutputAudio', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2OutputAudio(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2OutputAudio.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2OutputAudio(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2OutputAudioConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2OutputAudioConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2OutputAudioConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2OutputAudioConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Participant', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Participant(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Participant.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Participant(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2QueryInput', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2QueryInput(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2QueryInput.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2QueryInput(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2QueryParameters', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2QueryParameters(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2QueryParameters.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2QueryParameters(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2QueryResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2QueryResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2QueryResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2QueryResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2RaiSettings', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2RaiSettings(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2RaiSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2RaiSettings(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2RaiSettingsRaiCategoryConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ReloadDocumentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ReloadDocumentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ReloadDocumentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ReloadDocumentRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2RestoreAgentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2RestoreAgentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2RestoreAgentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2RestoreAgentRequest(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SearchAgentsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SearchAgentsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SearchAgentsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchAgentsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SearchKnowledgeAnswer', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SearchKnowledgeAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SearchKnowledgeAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeAnswer(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeAnswerAnswerSource(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeDebugInfo', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SearchKnowledgeDebugInfo(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfo.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeDebugInfo(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeDebugInfoSearchKnowledgeBehavior( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SearchKnowledgeRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SearchKnowledgeRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecs( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpec( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpec( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpec( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigBoostSpecsBoostSpecConditionBoostSpecBoostControlSpecControlPoint( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequestSearchConfigFilterSpecs( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SearchKnowledgeResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SearchKnowledgeResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SearchKnowledgeResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Sentiment', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Sentiment(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Sentiment.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Sentiment(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SentimentAnalysisRequestConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SentimentAnalysisRequestConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SentimentAnalysisRequestConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SentimentAnalysisRequestConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SentimentAnalysisResult', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SentimentAnalysisResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SentimentAnalysisResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SentimentAnalysisResult(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ServiceLatency', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ServiceLatency(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ServiceLatency.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ServiceLatency(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ServiceLatencyInternalServiceLatency(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SessionEntityType', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SipTrunk', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SipTrunk(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SipTrunk.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SipTrunk(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SmartReplyAnswer', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SmartReplyAnswer(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SmartReplyAnswer.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SmartReplyAnswer(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SmartReplyMetrics', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SmartReplyMetrics(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SmartReplyMetrics.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SmartReplyMetrics(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SmartReplyMetricsTopNMetrics(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SmartReplyModelMetadata', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SmartReplyModelMetadata(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SmartReplyModelMetadata.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SmartReplyModelMetadata(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SpeechContext', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SpeechContext(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SpeechContext.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SpeechContext(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SpeechToTextConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SpeechToTextConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SpeechToTextConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SpeechToTextConfig(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestArticlesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestArticlesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SuggestArticlesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestArticlesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestArticlesResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestArticlesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SuggestArticlesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestArticlesResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestConversationSummaryRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestConversationSummaryResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummary( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponseSummarySummarySection( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestFaqAnswersRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestFaqAnswersRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SuggestFaqAnswersRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestFaqAnswersRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestFaqAnswersResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestFaqAnswersResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestFaqAnswersResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestFaqAnswersResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestSmartRepliesRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestSmartRepliesRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestSmartRepliesRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestSmartRepliesResponse', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestSmartRepliesResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestSmartRepliesResponse(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SuggestionDedupingConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestionDedupingConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SuggestionDedupingConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestionDedupingConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SuggestionFeature', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestionFeature(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SuggestionFeature.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestionFeature(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SuggestionInput', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestionInput(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SuggestionInput.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestionInput(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SuggestionResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SuggestionResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SuggestionResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestionResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SummarizationContext', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SummarizationContext(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SummarizationContext.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationContext(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetrics', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SummarizationEvaluationMetrics(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetrics.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetrics(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAccuracyDecomposition( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceDecomposition( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsAdherenceRubric( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsCompletenessRubric( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetail( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetail( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsConversationDetailMetricDetailSectionDetail( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsDecomposition( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsEvaluationResult( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsOverallScoresByMetric( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSectionToken( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationEvaluationMetricsSummarizationEvaluationResult( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SummarizationSection', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SummarizationSection(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SummarizationSection.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationSection(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarizationSectionList', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SummarizationSectionList(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SummarizationSectionList.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarizationSectionList(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2SummarySuggestion', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SummarySuggestion(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SummarySuggestion.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarySuggestion(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SummarySuggestionSummarySection', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SummarySuggestionSummarySection(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2SummarySuggestionSummarySection.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SummarySuggestionSummarySection(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2SynthesizeSpeechConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2SynthesizeSpeechConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2SynthesizeSpeechConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SynthesizeSpeechConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2TextInput', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2TextInput(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2TextInput.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2TextInput(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2TextToSpeechSettings', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2TextToSpeechSettings(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2TextToSpeechSettings.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2TextToSpeechSettings(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Tool', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Tool(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Tool.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Tool(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolAuthentication', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolAuthentication(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolAuthentication.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolAuthentication(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolAuthenticationApiKeyConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolAuthenticationBearerTokenConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ToolAuthenticationOAuthConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ToolAuthenticationOAuthConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolAuthenticationOAuthConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolAuthenticationServiceAgentAuthConfig( |
| od, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolCall', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolCall(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolCall.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolCall(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolCallResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolCallResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolCallResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolCallResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolCallResultError', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolCallResultError(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolCallResultError.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolCallResultError(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolConnectorTool', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolConnectorTool(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolConnectorTool.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolConnectorTool(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ToolConnectorToolAction', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolConnectorToolAction(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolConnectorToolAction.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolConnectorToolAction(od); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolConnectorToolActionEntityOperation(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolExtensionTool', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolExtensionTool(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolExtensionTool.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolExtensionTool(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolFunctionTool', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolFunctionTool(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolFunctionTool.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolFunctionTool(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolOpenApiTool', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolOpenApiTool(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolOpenApiTool.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolOpenApiTool(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2ToolServiceDirectoryConfig', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolServiceDirectoryConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2ToolServiceDirectoryConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolServiceDirectoryConfig(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolTLSConfig', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolTLSConfig(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolTLSConfig.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolTLSConfig(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolTLSConfigCACert', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolTLSConfigCACert(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolTLSConfigCACert.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolTLSConfigCACert(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ToolsetTool', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ToolsetTool(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ToolsetTool.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ToolsetTool(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2TrainAgentRequest', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2TrainAgentRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2TrainAgentRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2TrainAgentRequest(od); |
| }); |
| }); |
| |
| unittest.group( |
| 'obj-schema-GoogleCloudDialogflowV2UndeployConversationModelRequest', |
| () { |
| unittest.test('to-json--from-json', () async { |
| final o = |
| buildGoogleCloudDialogflowV2UndeployConversationModelRequest(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = |
| api.GoogleCloudDialogflowV2UndeployConversationModelRequest.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2UndeployConversationModelRequest(od); |
| }); |
| }, |
| ); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ValidationError', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ValidationError(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ValidationError.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ValidationError(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2ValidationResult', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2ValidationResult(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2ValidationResult.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ValidationResult(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2Version', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2Version(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2Version.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Version(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudDialogflowV2VoiceSelectionParams', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudDialogflowV2VoiceSelectionParams(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudDialogflowV2VoiceSelectionParams.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2VoiceSelectionParams(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudLocationListLocationsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudLocationListLocationsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudLocationListLocationsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudLocationListLocationsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleCloudLocationLocation', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleCloudLocationLocation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleCloudLocationLocation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudLocationLocation(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleLongrunningListOperationsResponse', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleLongrunningListOperationsResponse(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleLongrunningListOperationsResponse.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleLongrunningListOperationsResponse(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleLongrunningOperation', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleLongrunningOperation(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleLongrunningOperation.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleLongrunningOperation(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleProtobufEmpty', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleProtobufEmpty(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleProtobufEmpty.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleProtobufEmpty(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleRpcStatus', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleRpcStatus(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleRpcStatus.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleRpcStatus(od); |
| }); |
| }); |
| |
| unittest.group('obj-schema-GoogleTypeLatLng', () { |
| unittest.test('to-json--from-json', () async { |
| final o = buildGoogleTypeLatLng(); |
| final oJson = convert.jsonDecode(convert.jsonEncode(o)); |
| final od = api.GoogleTypeLatLng.fromJson( |
| oJson as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleTypeLatLng(od); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsResource', () { |
| unittest.test('method--deleteAgent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deleteAgent(arg_parent, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--getAgent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudDialogflowV2Agent()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getAgent(arg_parent, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Agent( |
| response as api.GoogleCloudDialogflowV2Agent, |
| ); |
| }); |
| |
| unittest.test('method--setAgent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects; |
| final arg_request = buildGoogleCloudDialogflowV2Agent(); |
| final arg_parent = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Agent.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Agent(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudDialogflowV2Agent()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.setAgent( |
| arg_request, |
| arg_parent, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Agent( |
| response as api.GoogleCloudDialogflowV2Agent, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentResource', () { |
| unittest.test('method--export', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_request = buildGoogleCloudDialogflowV2ExportAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ExportAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ExportAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.export( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--getFulfillment', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Fulfillment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getFulfillment(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Fulfillment( |
| response as api.GoogleCloudDialogflowV2Fulfillment, |
| ); |
| }); |
| |
| unittest.test('method--getValidationResult', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_parent = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ValidationResult(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getValidationResult( |
| arg_parent, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ValidationResult( |
| response as api.GoogleCloudDialogflowV2ValidationResult, |
| ); |
| }); |
| |
| unittest.test('method--import', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_request = buildGoogleCloudDialogflowV2ImportAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ImportAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.import( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--restore', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_request = buildGoogleCloudDialogflowV2RestoreAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2RestoreAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2RestoreAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.restore( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--search', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SearchAgentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.search( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SearchAgentsResponse( |
| response as api.GoogleCloudDialogflowV2SearchAgentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--train', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_request = buildGoogleCloudDialogflowV2TrainAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2TrainAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2TrainAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.train( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--updateFulfillment', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent; |
| final arg_request = buildGoogleCloudDialogflowV2Fulfillment(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Fulfillment.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Fulfillment(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Fulfillment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.updateFulfillment( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Fulfillment( |
| response as api.GoogleCloudDialogflowV2Fulfillment, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentEntityTypesResource', () { |
| unittest.test('method--batchDelete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchDelete( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchUpdate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchUpdate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2EntityType(); |
| final arg_parent = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2EntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EntityType( |
| response as api.GoogleCloudDialogflowV2EntityType, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes; |
| final arg_name = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_name, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EntityType( |
| response as api.GoogleCloudDialogflowV2EntityType, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes; |
| final arg_parent = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListEntityTypesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| languageCode: arg_languageCode, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListEntityTypesResponse( |
| response as api.GoogleCloudDialogflowV2ListEntityTypesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2EntityType(); |
| final arg_name = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2EntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| languageCode: arg_languageCode, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EntityType( |
| response as api.GoogleCloudDialogflowV2EntityType, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentEntityTypesEntitiesResource', () { |
| unittest.test('method--batchCreate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes.entities; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchCreateEntitiesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchCreateEntitiesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchCreateEntitiesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchCreate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchDelete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes.entities; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchDeleteEntitiesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchDeleteEntitiesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteEntitiesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchDelete( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchUpdate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.entityTypes.entities; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchUpdateEntitiesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchUpdateEntitiesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateEntitiesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchUpdate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentEnvironmentsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.environments; |
| final arg_request = buildGoogleCloudDialogflowV2Environment(); |
| final arg_parent = 'foo'; |
| final arg_environmentId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Environment.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Environment(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['environmentId']!.first, |
| unittest.equals(arg_environmentId), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Environment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| environmentId: arg_environmentId, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Environment( |
| response as api.GoogleCloudDialogflowV2Environment, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.environments; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.environments; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Environment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Environment( |
| response as api.GoogleCloudDialogflowV2Environment, |
| ); |
| }); |
| |
| unittest.test('method--getHistory', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.environments; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EnvironmentHistory(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getHistory( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EnvironmentHistory( |
| response as api.GoogleCloudDialogflowV2EnvironmentHistory, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.environments; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListEnvironmentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListEnvironmentsResponse( |
| response as api.GoogleCloudDialogflowV2ListEnvironmentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.environments; |
| final arg_request = buildGoogleCloudDialogflowV2Environment(); |
| final arg_name = 'foo'; |
| final arg_allowLoadToDraftAndDiscardChanges = true; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Environment.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Environment(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['allowLoadToDraftAndDiscardChanges']!.first, |
| unittest.equals('$arg_allowLoadToDraftAndDiscardChanges'), |
| ); |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Environment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| allowLoadToDraftAndDiscardChanges: |
| arg_allowLoadToDraftAndDiscardChanges, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Environment( |
| response as api.GoogleCloudDialogflowV2Environment, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentEnvironmentsIntentsResource', () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.environments.intents; |
| final arg_parent = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListIntentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListIntentsResponse( |
| response as api.GoogleCloudDialogflowV2ListIntentsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentEnvironmentsUsersSessionsResource', () { |
| unittest.test('method--deleteContexts', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deleteContexts( |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--detectIntent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions; |
| final arg_request = buildGoogleCloudDialogflowV2DetectIntentRequest(); |
| final arg_session = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2DetectIntentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2DetectIntentResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.detectIntent( |
| arg_request, |
| arg_session, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentResponse( |
| response as api.GoogleCloudDialogflowV2DetectIntentResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentEnvironmentsUsersSessionsContextsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.contexts; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListContextsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListContextsResponse( |
| response as api.GoogleCloudDialogflowV2ListContextsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| }); |
| |
| unittest.group( |
| 'resource-ProjectsAgentEnvironmentsUsersSessionsEntityTypesResource', |
| () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.entityTypes; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListSessionEntityTypesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListSessionEntityTypesResponse( |
| response as api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.environments.users.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('resource-ProjectsAgentIntentsResource', () { |
| unittest.test('method--batchDelete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.intents; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchDeleteIntentsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchDeleteIntentsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteIntentsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchDelete( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchUpdate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.intents; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchUpdateIntentsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchUpdateIntentsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateIntentsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchUpdate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.intents; |
| final arg_request = buildGoogleCloudDialogflowV2Intent(); |
| final arg_parent = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Intent.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Intent(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Intent(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Intent( |
| response as api.GoogleCloudDialogflowV2Intent, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.intents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.intents; |
| final arg_name = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Intent(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_name, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Intent( |
| response as api.GoogleCloudDialogflowV2Intent, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.intents; |
| final arg_parent = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListIntentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListIntentsResponse( |
| response as api.GoogleCloudDialogflowV2ListIntentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.intents; |
| final arg_request = buildGoogleCloudDialogflowV2Intent(); |
| final arg_name = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Intent.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Intent(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Intent(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Intent( |
| response as api.GoogleCloudDialogflowV2Intent, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentKnowledgeBasesResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.knowledgeBases; |
| final arg_request = buildGoogleCloudDialogflowV2KnowledgeBase(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2KnowledgeBase.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.knowledgeBases; |
| final arg_name = 'foo'; |
| final arg_force = true; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['force']!.first, |
| unittest.equals('$arg_force'), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete( |
| arg_name, |
| force: arg_force, |
| $fields: arg_$fields, |
| ); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.knowledgeBases; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.knowledgeBases; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListKnowledgeBasesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListKnowledgeBasesResponse( |
| response as api.GoogleCloudDialogflowV2ListKnowledgeBasesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.knowledgeBases; |
| final arg_request = buildGoogleCloudDialogflowV2KnowledgeBase(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2KnowledgeBase.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentKnowledgeBasesDocumentsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2Document(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Document.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Document(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.knowledgeBases.documents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.knowledgeBases.documents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Document(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Document( |
| response as api.GoogleCloudDialogflowV2Document, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.knowledgeBases.documents; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListDocumentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListDocumentsResponse( |
| response as api.GoogleCloudDialogflowV2ListDocumentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2Document(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Document.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Document(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--reload', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.agent.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2ReloadDocumentRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ReloadDocumentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ReloadDocumentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.reload( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentSessionsResource', () { |
| unittest.test('method--deleteContexts', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deleteContexts( |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--detectIntent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions; |
| final arg_request = buildGoogleCloudDialogflowV2DetectIntentRequest(); |
| final arg_session = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2DetectIntentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2DetectIntentResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.detectIntent( |
| arg_request, |
| arg_session, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentResponse( |
| response as api.GoogleCloudDialogflowV2DetectIntentResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentSessionsContextsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.contexts; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListContextsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListContextsResponse( |
| response as api.GoogleCloudDialogflowV2ListContextsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentSessionsEntityTypesResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.entityTypes; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListSessionEntityTypesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListSessionEntityTypesResponse( |
| response as api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAgentVersionsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.versions; |
| final arg_request = buildGoogleCloudDialogflowV2Version(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Version.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Version(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Version(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Version( |
| response as api.GoogleCloudDialogflowV2Version, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.versions; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.versions; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Version(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Version( |
| response as api.GoogleCloudDialogflowV2Version, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.versions; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListVersionsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListVersionsResponse( |
| response as api.GoogleCloudDialogflowV2ListVersionsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.agent.versions; |
| final arg_request = buildGoogleCloudDialogflowV2Version(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Version.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Version(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Version(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Version( |
| response as api.GoogleCloudDialogflowV2Version, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsAnswerRecordsResource', () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.answerRecords; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListAnswerRecordsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListAnswerRecordsResponse( |
| response as api.GoogleCloudDialogflowV2ListAnswerRecordsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.answerRecords; |
| final arg_request = buildGoogleCloudDialogflowV2AnswerRecord(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2AnswerRecord.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnswerRecord(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2AnswerRecord(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2AnswerRecord( |
| response as api.GoogleCloudDialogflowV2AnswerRecord, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationDatasetsResource', () { |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationDatasets; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationDataset(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationDataset( |
| response as api.GoogleCloudDialogflowV2ConversationDataset, |
| ); |
| }); |
| |
| unittest.test('method--importConversationData', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationDatasets; |
| final arg_request = |
| buildGoogleCloudDialogflowV2ImportConversationDataRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2ImportConversationDataRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportConversationDataRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.importConversationData( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationDatasets; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationDatasetsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationDatasetsResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationDatasetsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationModelsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationModels; |
| final arg_request = buildGoogleCloudDialogflowV2ConversationModel(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ConversationModel.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationModel(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationModels; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--deploy', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationModels; |
| final arg_request = |
| buildGoogleCloudDialogflowV2DeployConversationModelRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2DeployConversationModelRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DeployConversationModelRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deploy( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationModels; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationModel(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationModel( |
| response as api.GoogleCloudDialogflowV2ConversationModel, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationModels; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationModelsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationModelsResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationModelsResponse, |
| ); |
| }); |
| |
| unittest.test('method--undeploy', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationModels; |
| final arg_request = |
| buildGoogleCloudDialogflowV2UndeployConversationModelRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2UndeployConversationModelRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2UndeployConversationModelRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.undeploy( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationModelsEvaluationsResource', () { |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.conversationModels.evaluations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationModelEvaluation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationModelEvaluation( |
| response as api.GoogleCloudDialogflowV2ConversationModelEvaluation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.conversationModels.evaluations; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse( |
| response |
| as api.GoogleCloudDialogflowV2ListConversationModelEvaluationsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationProfilesResource', () { |
| unittest.test('method--clearSuggestionFeatureConfig', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationProfiles; |
| final arg_request = |
| buildGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest(); |
| final arg_conversationProfile = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.clearSuggestionFeatureConfig( |
| arg_request, |
| arg_conversationProfile, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationProfiles; |
| final arg_request = buildGoogleCloudDialogflowV2ConversationProfile(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ConversationProfile.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile( |
| response as api.GoogleCloudDialogflowV2ConversationProfile, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationProfiles; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationProfiles; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationProfile( |
| response as api.GoogleCloudDialogflowV2ConversationProfile, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationProfiles; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationProfilesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationProfilesResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationProfilesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationProfiles; |
| final arg_request = buildGoogleCloudDialogflowV2ConversationProfile(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ConversationProfile.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile( |
| response as api.GoogleCloudDialogflowV2ConversationProfile, |
| ); |
| }); |
| |
| unittest.test('method--setSuggestionFeatureConfig', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversationProfiles; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest(); |
| final arg_conversationProfile = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.setSuggestionFeatureConfig( |
| arg_request, |
| arg_conversationProfile, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationsResource', () { |
| unittest.test('method--complete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations; |
| final arg_request = |
| buildGoogleCloudDialogflowV2CompleteConversationRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2CompleteConversationRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CompleteConversationRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Conversation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.complete( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Conversation( |
| response as api.GoogleCloudDialogflowV2Conversation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations; |
| final arg_request = buildGoogleCloudDialogflowV2Conversation(); |
| final arg_parent = 'foo'; |
| final arg_conversationId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Conversation.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Conversation(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['conversationId']!.first, |
| unittest.equals(arg_conversationId), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Conversation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| conversationId: arg_conversationId, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Conversation( |
| response as api.GoogleCloudDialogflowV2Conversation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Conversation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Conversation( |
| response as api.GoogleCloudDialogflowV2Conversation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationsResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationsMessagesResource', () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.messages; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListMessagesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListMessagesResponse( |
| response as api.GoogleCloudDialogflowV2ListMessagesResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationsParticipantsResource', () { |
| unittest.test('method--analyzeContent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.participants; |
| final arg_request = buildGoogleCloudDialogflowV2AnalyzeContentRequest(); |
| final arg_participant = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2AnalyzeContentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnalyzeContentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2AnalyzeContentResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.analyzeContent( |
| arg_request, |
| arg_participant, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2AnalyzeContentResponse( |
| response as api.GoogleCloudDialogflowV2AnalyzeContentResponse, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.participants; |
| final arg_request = buildGoogleCloudDialogflowV2Participant(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Participant.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Participant(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Participant(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Participant( |
| response as api.GoogleCloudDialogflowV2Participant, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.participants; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Participant(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Participant( |
| response as api.GoogleCloudDialogflowV2Participant, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.participants; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListParticipantsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListParticipantsResponse( |
| response as api.GoogleCloudDialogflowV2ListParticipantsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.participants; |
| final arg_request = buildGoogleCloudDialogflowV2Participant(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Participant.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Participant(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Participant(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Participant( |
| response as api.GoogleCloudDialogflowV2Participant, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationsParticipantsSuggestionsResource', () { |
| unittest.test('method--suggestArticles', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.conversations.participants.suggestions; |
| final arg_request = buildGoogleCloudDialogflowV2SuggestArticlesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestArticlesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestArticlesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestArticlesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestArticles( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestArticlesResponse( |
| response as api.GoogleCloudDialogflowV2SuggestArticlesResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestFaqAnswers', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.conversations.participants.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestFaqAnswersRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestFaqAnswersRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestFaqAnswersRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestFaqAnswersResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestFaqAnswers( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestFaqAnswersResponse( |
| response as api.GoogleCloudDialogflowV2SuggestFaqAnswersResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestKnowledgeAssist', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.conversations.participants.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestKnowledgeAssist( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse( |
| response as api.GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestSmartReplies', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.conversations.participants.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestSmartRepliesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestSmartRepliesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestSmartRepliesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestSmartReplies( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestSmartRepliesResponse( |
| response as api.GoogleCloudDialogflowV2SuggestSmartRepliesResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsConversationsSuggestionsResource', () { |
| unittest.test('method--generate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2GenerateSuggestionsRequest(); |
| final arg_conversation = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2GenerateSuggestionsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.generate( |
| arg_request, |
| arg_conversation, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponse( |
| response as api.GoogleCloudDialogflowV2GenerateSuggestionsResponse, |
| ); |
| }); |
| |
| unittest.test('method--searchKnowledge', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.suggestions; |
| final arg_request = buildGoogleCloudDialogflowV2SearchKnowledgeRequest(); |
| final arg_conversation = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SearchKnowledgeResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.searchKnowledge( |
| arg_request, |
| arg_conversation, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeResponse( |
| response as api.GoogleCloudDialogflowV2SearchKnowledgeResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestConversationSummary', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.conversations.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryRequest(); |
| final arg_conversation = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestConversationSummary( |
| arg_request, |
| arg_conversation, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponse( |
| response |
| as api.GoogleCloudDialogflowV2SuggestConversationSummaryResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsGeneratorsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.generators; |
| final arg_request = buildGoogleCloudDialogflowV2Generator(); |
| final arg_parent = 'foo'; |
| final arg_generatorId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Generator.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Generator(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['generatorId']!.first, |
| unittest.equals(arg_generatorId), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Generator(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| generatorId: arg_generatorId, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Generator( |
| response as api.GoogleCloudDialogflowV2Generator, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.generators; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListGeneratorsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListGeneratorsResponse( |
| response as api.GoogleCloudDialogflowV2ListGeneratorsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsKnowledgeBasesResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases; |
| final arg_request = buildGoogleCloudDialogflowV2KnowledgeBase(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2KnowledgeBase.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases; |
| final arg_name = 'foo'; |
| final arg_force = true; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['force']!.first, |
| unittest.equals('$arg_force'), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete( |
| arg_name, |
| force: arg_force, |
| $fields: arg_$fields, |
| ); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListKnowledgeBasesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListKnowledgeBasesResponse( |
| response as api.GoogleCloudDialogflowV2ListKnowledgeBasesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases; |
| final arg_request = buildGoogleCloudDialogflowV2KnowledgeBase(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2KnowledgeBase.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsKnowledgeBasesDocumentsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2Document(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Document.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Document(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--export', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2ExportDocumentRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ExportDocumentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ExportDocumentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.export( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Document(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Document( |
| response as api.GoogleCloudDialogflowV2Document, |
| ); |
| }); |
| |
| unittest.test('method--import', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2ImportDocumentsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2ImportDocumentsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportDocumentsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.import( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListDocumentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListDocumentsResponse( |
| response as api.GoogleCloudDialogflowV2ListDocumentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2Document(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Document.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Document(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--reload', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2ReloadDocumentRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ReloadDocumentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ReloadDocumentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.reload( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsResource', () { |
| unittest.test('method--deleteAgent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deleteAgent(arg_parent, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudLocationLocation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudLocationLocation( |
| response as api.GoogleCloudLocationLocation, |
| ); |
| }); |
| |
| unittest.test('method--getAgent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudDialogflowV2Agent()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getAgent(arg_parent, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Agent( |
| response as api.GoogleCloudDialogflowV2Agent, |
| ); |
| }); |
| |
| unittest.test('method--getEncryptionSpec', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EncryptionSpec(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getEncryptionSpec( |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EncryptionSpec( |
| response as api.GoogleCloudDialogflowV2EncryptionSpec, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations; |
| final arg_name = 'foo'; |
| final arg_extraLocationTypes = buildUnnamed192(); |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['extraLocationTypes']!, |
| unittest.equals(arg_extraLocationTypes), |
| ); |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudLocationListLocationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_name, |
| extraLocationTypes: arg_extraLocationTypes, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudLocationListLocationsResponse( |
| response as api.GoogleCloudLocationListLocationsResponse, |
| ); |
| }); |
| |
| unittest.test('method--setAgent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations; |
| final arg_request = buildGoogleCloudDialogflowV2Agent(); |
| final arg_parent = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Agent.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Agent(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudDialogflowV2Agent()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.setAgent( |
| arg_request, |
| arg_parent, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Agent( |
| response as api.GoogleCloudDialogflowV2Agent, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentResource', () { |
| unittest.test('method--export', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_request = buildGoogleCloudDialogflowV2ExportAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ExportAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ExportAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.export( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--getFulfillment', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Fulfillment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getFulfillment(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Fulfillment( |
| response as api.GoogleCloudDialogflowV2Fulfillment, |
| ); |
| }); |
| |
| unittest.test('method--getValidationResult', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_parent = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ValidationResult(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getValidationResult( |
| arg_parent, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ValidationResult( |
| response as api.GoogleCloudDialogflowV2ValidationResult, |
| ); |
| }); |
| |
| unittest.test('method--import', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_request = buildGoogleCloudDialogflowV2ImportAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ImportAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.import( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--restore', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_request = buildGoogleCloudDialogflowV2RestoreAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2RestoreAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2RestoreAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.restore( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--search', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SearchAgentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.search( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SearchAgentsResponse( |
| response as api.GoogleCloudDialogflowV2SearchAgentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--train', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_request = buildGoogleCloudDialogflowV2TrainAgentRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2TrainAgentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2TrainAgentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.train( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--updateFulfillment', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent; |
| final arg_request = buildGoogleCloudDialogflowV2Fulfillment(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Fulfillment.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Fulfillment(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Fulfillment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.updateFulfillment( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Fulfillment( |
| response as api.GoogleCloudDialogflowV2Fulfillment, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentEntityTypesResource', () { |
| unittest.test('method--batchDelete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.entityTypes; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchDeleteEntityTypesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteEntityTypesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchDelete( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchUpdate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.entityTypes; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchUpdateEntityTypesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateEntityTypesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchUpdate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2EntityType(); |
| final arg_parent = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2EntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EntityType( |
| response as api.GoogleCloudDialogflowV2EntityType, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.entityTypes; |
| final arg_name = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_name, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EntityType( |
| response as api.GoogleCloudDialogflowV2EntityType, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.entityTypes; |
| final arg_parent = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListEntityTypesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| languageCode: arg_languageCode, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListEntityTypesResponse( |
| response as api.GoogleCloudDialogflowV2ListEntityTypesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2EntityType(); |
| final arg_name = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2EntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2EntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| languageCode: arg_languageCode, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EntityType( |
| response as api.GoogleCloudDialogflowV2EntityType, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentEntityTypesEntitiesResource', () { |
| unittest.test('method--batchCreate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.entityTypes.entities; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchCreateEntitiesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchCreateEntitiesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchCreateEntitiesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchCreate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchDelete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.entityTypes.entities; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchDeleteEntitiesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchDeleteEntitiesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteEntitiesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchDelete( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchUpdate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.entityTypes.entities; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchUpdateEntitiesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchUpdateEntitiesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateEntitiesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchUpdate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentEnvironmentsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.environments; |
| final arg_request = buildGoogleCloudDialogflowV2Environment(); |
| final arg_parent = 'foo'; |
| final arg_environmentId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Environment.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Environment(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['environmentId']!.first, |
| unittest.equals(arg_environmentId), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Environment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| environmentId: arg_environmentId, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Environment( |
| response as api.GoogleCloudDialogflowV2Environment, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.environments; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.environments; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Environment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Environment( |
| response as api.GoogleCloudDialogflowV2Environment, |
| ); |
| }); |
| |
| unittest.test('method--getHistory', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.environments; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2EnvironmentHistory(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.getHistory( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2EnvironmentHistory( |
| response as api.GoogleCloudDialogflowV2EnvironmentHistory, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.environments; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListEnvironmentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListEnvironmentsResponse( |
| response as api.GoogleCloudDialogflowV2ListEnvironmentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.environments; |
| final arg_request = buildGoogleCloudDialogflowV2Environment(); |
| final arg_name = 'foo'; |
| final arg_allowLoadToDraftAndDiscardChanges = true; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Environment.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Environment(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['allowLoadToDraftAndDiscardChanges']!.first, |
| unittest.equals('$arg_allowLoadToDraftAndDiscardChanges'), |
| ); |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Environment(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| allowLoadToDraftAndDiscardChanges: |
| arg_allowLoadToDraftAndDiscardChanges, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Environment( |
| response as api.GoogleCloudDialogflowV2Environment, |
| ); |
| }); |
| }); |
| |
| unittest.group( |
| 'resource-ProjectsLocationsAgentEnvironmentsIntentsResource', |
| () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.intents; |
| final arg_parent = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListIntentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListIntentsResponse( |
| response as api.GoogleCloudDialogflowV2ListIntentsResponse, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'resource-ProjectsLocationsAgentEnvironmentsUsersSessionsResource', |
| () { |
| unittest.test('method--deleteContexts', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deleteContexts( |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--detectIntent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions; |
| final arg_request = buildGoogleCloudDialogflowV2DetectIntentRequest(); |
| final arg_session = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2DetectIntentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2DetectIntentResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.detectIntent( |
| arg_request, |
| arg_session, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentResponse( |
| response as api.GoogleCloudDialogflowV2DetectIntentResponse, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'resource-ProjectsLocationsAgentEnvironmentsUsersSessionsContextsResource', |
| () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.contexts; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListContextsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListContextsResponse( |
| response as api.GoogleCloudDialogflowV2ListContextsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group( |
| 'resource-ProjectsLocationsAgentEnvironmentsUsersSessionsEntityTypesResource', |
| () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.entityTypes; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListSessionEntityTypesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListSessionEntityTypesResponse( |
| response as api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.environments.users.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('resource-ProjectsLocationsAgentIntentsResource', () { |
| unittest.test('method--batchDelete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.intents; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchDeleteIntentsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchDeleteIntentsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchDeleteIntentsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchDelete( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--batchUpdate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.intents; |
| final arg_request = |
| buildGoogleCloudDialogflowV2BatchUpdateIntentsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2BatchUpdateIntentsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2BatchUpdateIntentsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.batchUpdate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.intents; |
| final arg_request = buildGoogleCloudDialogflowV2Intent(); |
| final arg_parent = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Intent.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Intent(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Intent(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Intent( |
| response as api.GoogleCloudDialogflowV2Intent, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.intents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.intents; |
| final arg_name = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Intent(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get( |
| arg_name, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Intent( |
| response as api.GoogleCloudDialogflowV2Intent, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.intents; |
| final arg_parent = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListIntentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListIntentsResponse( |
| response as api.GoogleCloudDialogflowV2ListIntentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.intents; |
| final arg_request = buildGoogleCloudDialogflowV2Intent(); |
| final arg_name = 'foo'; |
| final arg_intentView = 'foo'; |
| final arg_languageCode = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Intent.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Intent(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['intentView']!.first, |
| unittest.equals(arg_intentView), |
| ); |
| unittest.expect( |
| queryMap['languageCode']!.first, |
| unittest.equals(arg_languageCode), |
| ); |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Intent(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| intentView: arg_intentView, |
| languageCode: arg_languageCode, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Intent( |
| response as api.GoogleCloudDialogflowV2Intent, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentSessionsResource', () { |
| unittest.test('method--deleteContexts', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.sessions; |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deleteContexts( |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--detectIntent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.sessions; |
| final arg_request = buildGoogleCloudDialogflowV2DetectIntentRequest(); |
| final arg_session = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2DetectIntentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2DetectIntentResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.detectIntent( |
| arg_request, |
| arg_session, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2DetectIntentResponse( |
| response as api.GoogleCloudDialogflowV2DetectIntentResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentSessionsContextsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.contexts; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.contexts; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListContextsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListContextsResponse( |
| response as api.GoogleCloudDialogflowV2ListContextsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.contexts; |
| final arg_request = buildGoogleCloudDialogflowV2Context(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Context.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Context(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Context(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Context( |
| response as api.GoogleCloudDialogflowV2Context, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentSessionsEntityTypesResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.entityTypes; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.entityTypes; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListSessionEntityTypesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListSessionEntityTypesResponse( |
| response as api.GoogleCloudDialogflowV2ListSessionEntityTypesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.agent.sessions.entityTypes; |
| final arg_request = buildGoogleCloudDialogflowV2SessionEntityType(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SessionEntityType.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SessionEntityType(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SessionEntityType( |
| response as api.GoogleCloudDialogflowV2SessionEntityType, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAgentVersionsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.versions; |
| final arg_request = buildGoogleCloudDialogflowV2Version(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Version.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Version(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Version(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Version( |
| response as api.GoogleCloudDialogflowV2Version, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.versions; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.versions; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Version(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Version( |
| response as api.GoogleCloudDialogflowV2Version, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.versions; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListVersionsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListVersionsResponse( |
| response as api.GoogleCloudDialogflowV2ListVersionsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.agent.versions; |
| final arg_request = buildGoogleCloudDialogflowV2Version(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Version.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Version(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Version(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Version( |
| response as api.GoogleCloudDialogflowV2Version, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsAnswerRecordsResource', () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.answerRecords; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListAnswerRecordsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListAnswerRecordsResponse( |
| response as api.GoogleCloudDialogflowV2ListAnswerRecordsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.answerRecords; |
| final arg_request = buildGoogleCloudDialogflowV2AnswerRecord(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2AnswerRecord.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnswerRecord(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2AnswerRecord(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2AnswerRecord( |
| response as api.GoogleCloudDialogflowV2AnswerRecord, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsConversationDatasetsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationDatasets; |
| final arg_request = buildGoogleCloudDialogflowV2ConversationDataset(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ConversationDataset.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationDataset(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationDatasets; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationDatasets; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationDataset(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationDataset( |
| response as api.GoogleCloudDialogflowV2ConversationDataset, |
| ); |
| }); |
| |
| unittest.test('method--importConversationData', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationDatasets; |
| final arg_request = |
| buildGoogleCloudDialogflowV2ImportConversationDataRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2ImportConversationDataRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportConversationDataRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.importConversationData( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationDatasets; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationDatasetsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationDatasetsResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationDatasetsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsConversationModelsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversationModels; |
| final arg_request = buildGoogleCloudDialogflowV2ConversationModel(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ConversationModel.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationModel(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversationModels; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--deploy', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversationModels; |
| final arg_request = |
| buildGoogleCloudDialogflowV2DeployConversationModelRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2DeployConversationModelRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2DeployConversationModelRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.deploy( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversationModels; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationModel(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationModel( |
| response as api.GoogleCloudDialogflowV2ConversationModel, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversationModels; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationModelsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationModelsResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationModelsResponse, |
| ); |
| }); |
| |
| unittest.test('method--undeploy', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversationModels; |
| final arg_request = |
| buildGoogleCloudDialogflowV2UndeployConversationModelRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2UndeployConversationModelRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2UndeployConversationModelRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.undeploy( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsConversationModelsEvaluationsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationModels.evaluations; |
| final arg_request = |
| buildGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2CreateConversationModelEvaluationRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CreateConversationModelEvaluationRequest( |
| obj, |
| ); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationModels.evaluations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationModelEvaluation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationModelEvaluation( |
| response as api.GoogleCloudDialogflowV2ConversationModelEvaluation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationModels.evaluations; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationModelEvaluationsResponse( |
| response |
| as api.GoogleCloudDialogflowV2ListConversationModelEvaluationsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsConversationProfilesResource', () { |
| unittest.test('method--clearSuggestionFeatureConfig', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationProfiles; |
| final arg_request = |
| buildGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest(); |
| final arg_conversationProfile = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ClearSuggestionFeatureConfigRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.clearSuggestionFeatureConfig( |
| arg_request, |
| arg_conversationProfile, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationProfiles; |
| final arg_request = buildGoogleCloudDialogflowV2ConversationProfile(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ConversationProfile.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile( |
| response as api.GoogleCloudDialogflowV2ConversationProfile, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationProfiles; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationProfiles; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2ConversationProfile( |
| response as api.GoogleCloudDialogflowV2ConversationProfile, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationProfiles; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationProfilesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationProfilesResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationProfilesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationProfiles; |
| final arg_request = buildGoogleCloudDialogflowV2ConversationProfile(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ConversationProfile.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ConversationProfile(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ConversationProfile( |
| response as api.GoogleCloudDialogflowV2ConversationProfile, |
| ); |
| }); |
| |
| unittest.test('method--setSuggestionFeatureConfig', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversationProfiles; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest(); |
| final arg_conversationProfile = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SetSuggestionFeatureConfigRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.setSuggestionFeatureConfig( |
| arg_request, |
| arg_conversationProfile, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsConversationsResource', () { |
| unittest.test('method--complete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversations; |
| final arg_request = |
| buildGoogleCloudDialogflowV2CompleteConversationRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2CompleteConversationRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2CompleteConversationRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Conversation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.complete( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Conversation( |
| response as api.GoogleCloudDialogflowV2Conversation, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversations; |
| final arg_request = buildGoogleCloudDialogflowV2Conversation(); |
| final arg_parent = 'foo'; |
| final arg_conversationId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Conversation.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Conversation(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['conversationId']!.first, |
| unittest.equals(arg_conversationId), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Conversation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| conversationId: arg_conversationId, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Conversation( |
| response as api.GoogleCloudDialogflowV2Conversation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Conversation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Conversation( |
| response as api.GoogleCloudDialogflowV2Conversation, |
| ); |
| }); |
| |
| unittest.test('method--ingestContextReferences', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversations; |
| final arg_request = |
| buildGoogleCloudDialogflowV2IngestContextReferencesRequest(); |
| final arg_conversation = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2IngestContextReferencesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2IngestContextReferencesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2IngestContextReferencesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.ingestContextReferences( |
| arg_request, |
| arg_conversation, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2IngestContextReferencesResponse( |
| response as api.GoogleCloudDialogflowV2IngestContextReferencesResponse, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.conversations; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListConversationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListConversationsResponse( |
| response as api.GoogleCloudDialogflowV2ListConversationsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsConversationsMessagesResource', () { |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.messages; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListMessagesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListMessagesResponse( |
| response as api.GoogleCloudDialogflowV2ListMessagesResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsConversationsParticipantsResource', () { |
| unittest.test('method--analyzeContent', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants; |
| final arg_request = buildGoogleCloudDialogflowV2AnalyzeContentRequest(); |
| final arg_participant = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2AnalyzeContentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2AnalyzeContentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2AnalyzeContentResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.analyzeContent( |
| arg_request, |
| arg_participant, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2AnalyzeContentResponse( |
| response as api.GoogleCloudDialogflowV2AnalyzeContentResponse, |
| ); |
| }); |
| |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants; |
| final arg_request = buildGoogleCloudDialogflowV2Participant(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Participant.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Participant(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Participant(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Participant( |
| response as api.GoogleCloudDialogflowV2Participant, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Participant(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Participant( |
| response as api.GoogleCloudDialogflowV2Participant, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListParticipantsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListParticipantsResponse( |
| response as api.GoogleCloudDialogflowV2ListParticipantsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants; |
| final arg_request = buildGoogleCloudDialogflowV2Participant(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Participant.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Participant(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Participant(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Participant( |
| response as api.GoogleCloudDialogflowV2Participant, |
| ); |
| }); |
| }); |
| |
| unittest.group( |
| 'resource-ProjectsLocationsConversationsParticipantsSuggestionsResource', |
| () { |
| unittest.test('method--suggestArticles', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestArticlesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestArticlesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestArticlesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestArticlesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestArticles( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestArticlesResponse( |
| response as api.GoogleCloudDialogflowV2SuggestArticlesResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestFaqAnswers', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestFaqAnswersRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestFaqAnswersRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestFaqAnswersRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestFaqAnswersResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestFaqAnswers( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestFaqAnswersResponse( |
| response as api.GoogleCloudDialogflowV2SuggestFaqAnswersResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestKnowledgeAssist', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestKnowledgeAssistRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestKnowledgeAssistRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestKnowledgeAssist( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse( |
| response as api.GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestSmartReplies', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.participants.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestSmartRepliesRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestSmartRepliesRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestSmartRepliesRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestSmartRepliesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestSmartReplies( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestSmartRepliesResponse( |
| response as api.GoogleCloudDialogflowV2SuggestSmartRepliesResponse, |
| ); |
| }); |
| }, |
| ); |
| |
| unittest.group('resource-ProjectsLocationsConversationsSuggestionsResource', () { |
| unittest.test('method--generate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2GenerateSuggestionsRequest(); |
| final arg_conversation = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2GenerateSuggestionsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2GenerateSuggestionsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.generate( |
| arg_request, |
| arg_conversation, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2GenerateSuggestionsResponse( |
| response as api.GoogleCloudDialogflowV2GenerateSuggestionsResponse, |
| ); |
| }); |
| |
| unittest.test('method--searchKnowledge', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.suggestions; |
| final arg_request = buildGoogleCloudDialogflowV2SearchKnowledgeRequest(); |
| final arg_conversation = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SearchKnowledgeResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.searchKnowledge( |
| arg_request, |
| arg_conversation, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeResponse( |
| response as api.GoogleCloudDialogflowV2SearchKnowledgeResponse, |
| ); |
| }); |
| |
| unittest.test('method--suggestConversationSummary', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.conversations.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryRequest(); |
| final arg_conversation = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SuggestConversationSummaryRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SuggestConversationSummaryResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.suggestConversationSummary( |
| arg_request, |
| arg_conversation, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SuggestConversationSummaryResponse( |
| response |
| as api.GoogleCloudDialogflowV2SuggestConversationSummaryResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsEncryptionSpecResource', () { |
| unittest.test('method--initialize', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.encryptionSpec; |
| final arg_request = |
| buildGoogleCloudDialogflowV2InitializeEncryptionSpecRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2InitializeEncryptionSpecRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2InitializeEncryptionSpecRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.initialize( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsGeneratorsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.generators; |
| final arg_request = buildGoogleCloudDialogflowV2Generator(); |
| final arg_parent = 'foo'; |
| final arg_generatorId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Generator.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Generator(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['generatorId']!.first, |
| unittest.equals(arg_generatorId), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Generator(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| generatorId: arg_generatorId, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Generator( |
| response as api.GoogleCloudDialogflowV2Generator, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.generators; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.generators; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Generator(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Generator( |
| response as api.GoogleCloudDialogflowV2Generator, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.generators; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListGeneratorsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListGeneratorsResponse( |
| response as api.GoogleCloudDialogflowV2ListGeneratorsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.generators; |
| final arg_request = buildGoogleCloudDialogflowV2Generator(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Generator.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Generator(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Generator(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Generator( |
| response as api.GoogleCloudDialogflowV2Generator, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsGeneratorsEvaluationsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.generators.evaluations; |
| final arg_request = buildGoogleCloudDialogflowV2GeneratorEvaluation(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2GeneratorEvaluation.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GeneratorEvaluation(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.generators.evaluations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.generators.evaluations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2GeneratorEvaluation(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2GeneratorEvaluation( |
| response as api.GoogleCloudDialogflowV2GeneratorEvaluation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.generators.evaluations; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListGeneratorEvaluationsResponse( |
| response as api.GoogleCloudDialogflowV2ListGeneratorEvaluationsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsKnowledgeBasesResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.knowledgeBases; |
| final arg_request = buildGoogleCloudDialogflowV2KnowledgeBase(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2KnowledgeBase.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.knowledgeBases; |
| final arg_name = 'foo'; |
| final arg_force = true; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['force']!.first, |
| unittest.equals('$arg_force'), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete( |
| arg_name, |
| force: arg_force, |
| $fields: arg_$fields, |
| ); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.knowledgeBases; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.knowledgeBases; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListKnowledgeBasesResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListKnowledgeBasesResponse( |
| response as api.GoogleCloudDialogflowV2ListKnowledgeBasesResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.knowledgeBases; |
| final arg_request = buildGoogleCloudDialogflowV2KnowledgeBase(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2KnowledgeBase.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2KnowledgeBase(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2KnowledgeBase( |
| response as api.GoogleCloudDialogflowV2KnowledgeBase, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsKnowledgeBasesDocumentsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2Document(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Document.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Document(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--export', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2ExportDocumentRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ExportDocumentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ExportDocumentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.export( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2Document(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Document( |
| response as api.GoogleCloudDialogflowV2Document, |
| ); |
| }); |
| |
| unittest.test('method--import', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2ImportDocumentsRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2ImportDocumentsRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ImportDocumentsRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.import( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_parent = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListDocumentsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListDocumentsResponse( |
| response as api.GoogleCloudDialogflowV2ListDocumentsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2Document(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Document.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Document(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--reload', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.knowledgeBases.documents; |
| final arg_request = buildGoogleCloudDialogflowV2ReloadDocumentRequest(); |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2ReloadDocumentRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2ReloadDocumentRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.reload( |
| arg_request, |
| arg_name, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsOperationsResource', () { |
| unittest.test('method--cancel', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.operations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.cancel(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.operations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.operations; |
| final arg_name = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_returnPartialSuccess = true; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['returnPartialSuccess']!.first, |
| unittest.equals('$arg_returnPartialSuccess'), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleLongrunningListOperationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_name, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| returnPartialSuccess: arg_returnPartialSuccess, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningListOperationsResponse( |
| response as api.GoogleLongrunningListOperationsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsSipTrunksResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.sipTrunks; |
| final arg_request = buildGoogleCloudDialogflowV2SipTrunk(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SipTrunk.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SipTrunk(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SipTrunk(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SipTrunk( |
| response as api.GoogleCloudDialogflowV2SipTrunk, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.sipTrunks; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.sipTrunks; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SipTrunk(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2SipTrunk( |
| response as api.GoogleCloudDialogflowV2SipTrunk, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.sipTrunks; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListSipTrunksResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListSipTrunksResponse( |
| response as api.GoogleCloudDialogflowV2ListSipTrunksResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.sipTrunks; |
| final arg_request = buildGoogleCloudDialogflowV2SipTrunk(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2SipTrunk.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SipTrunk(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SipTrunk(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SipTrunk( |
| response as api.GoogleCloudDialogflowV2SipTrunk, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsStatelessSuggestionResource', () { |
| unittest.test('method--generate', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi( |
| mock, |
| ).projects.locations.statelessSuggestion; |
| final arg_request = |
| buildGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2GenerateStatelessSuggestionRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSuggestionRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.generate( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSuggestionResponse( |
| response |
| as api.GoogleCloudDialogflowV2GenerateStatelessSuggestionResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsSuggestionsResource', () { |
| unittest.test('method--generateStatelessSummary', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.generateStatelessSummary( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryResponse( |
| response as api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponse, |
| ); |
| }); |
| |
| unittest.test('method--searchKnowledge', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.suggestions; |
| final arg_request = buildGoogleCloudDialogflowV2SearchKnowledgeRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SearchKnowledgeResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.searchKnowledge( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeResponse( |
| response as api.GoogleCloudDialogflowV2SearchKnowledgeResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsLocationsToolsResource', () { |
| unittest.test('method--create', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.tools; |
| final arg_request = buildGoogleCloudDialogflowV2Tool(); |
| final arg_parent = 'foo'; |
| final arg_toolId = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Tool.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Tool(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['toolId']!.first, |
| unittest.equals(arg_toolId), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudDialogflowV2Tool()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.create( |
| arg_request, |
| arg_parent, |
| toolId: arg_toolId, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Tool( |
| response as api.GoogleCloudDialogflowV2Tool, |
| ); |
| }); |
| |
| unittest.test('method--delete', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.tools; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.delete(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.tools; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudDialogflowV2Tool()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleCloudDialogflowV2Tool( |
| response as api.GoogleCloudDialogflowV2Tool, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.tools; |
| final arg_parent = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2ListToolsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_parent, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2ListToolsResponse( |
| response as api.GoogleCloudDialogflowV2ListToolsResponse, |
| ); |
| }); |
| |
| unittest.test('method--patch', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.locations.tools; |
| final arg_request = buildGoogleCloudDialogflowV2Tool(); |
| final arg_name = 'foo'; |
| final arg_updateMask = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = api.GoogleCloudDialogflowV2Tool.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2Tool(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['updateMask']!.first, |
| unittest.equals(arg_updateMask), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleCloudDialogflowV2Tool()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.patch( |
| arg_request, |
| arg_name, |
| updateMask: arg_updateMask, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2Tool( |
| response as api.GoogleCloudDialogflowV2Tool, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsOperationsResource', () { |
| unittest.test('method--cancel', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.operations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleProtobufEmpty()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.cancel(arg_name, $fields: arg_$fields); |
| checkGoogleProtobufEmpty(response as api.GoogleProtobufEmpty); |
| }); |
| |
| unittest.test('method--get', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.operations; |
| final arg_name = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode(buildGoogleLongrunningOperation()); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.get(arg_name, $fields: arg_$fields); |
| checkGoogleLongrunningOperation( |
| response as api.GoogleLongrunningOperation, |
| ); |
| }); |
| |
| unittest.test('method--list', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.operations; |
| final arg_name = 'foo'; |
| final arg_filter = 'foo'; |
| final arg_pageSize = 42; |
| final arg_pageToken = 'foo'; |
| final arg_returnPartialSuccess = true; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['filter']!.first, |
| unittest.equals(arg_filter), |
| ); |
| unittest.expect( |
| core.int.parse(queryMap['pageSize']!.first), |
| unittest.equals(arg_pageSize), |
| ); |
| unittest.expect( |
| queryMap['pageToken']!.first, |
| unittest.equals(arg_pageToken), |
| ); |
| unittest.expect( |
| queryMap['returnPartialSuccess']!.first, |
| unittest.equals('$arg_returnPartialSuccess'), |
| ); |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleLongrunningListOperationsResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.list( |
| arg_name, |
| filter: arg_filter, |
| pageSize: arg_pageSize, |
| pageToken: arg_pageToken, |
| returnPartialSuccess: arg_returnPartialSuccess, |
| $fields: arg_$fields, |
| ); |
| checkGoogleLongrunningListOperationsResponse( |
| response as api.GoogleLongrunningListOperationsResponse, |
| ); |
| }); |
| }); |
| |
| unittest.group('resource-ProjectsSuggestionsResource', () { |
| unittest.test('method--generateStatelessSummary', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.suggestions; |
| final arg_request = |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2GenerateStatelessSummaryRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2GenerateStatelessSummaryResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.generateStatelessSummary( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2GenerateStatelessSummaryResponse( |
| response as api.GoogleCloudDialogflowV2GenerateStatelessSummaryResponse, |
| ); |
| }); |
| |
| unittest.test('method--searchKnowledge', () async { |
| final mock = HttpServerMock(); |
| final res = api.DialogflowApi(mock).projects.suggestions; |
| final arg_request = buildGoogleCloudDialogflowV2SearchKnowledgeRequest(); |
| final arg_parent = 'foo'; |
| final arg_$fields = 'foo'; |
| mock.register( |
| unittest.expectAsync2((http.BaseRequest req, json) { |
| final obj = |
| api.GoogleCloudDialogflowV2SearchKnowledgeRequest.fromJson( |
| json as core.Map<core.String, core.dynamic>, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeRequest(obj); |
| |
| final path = req.url.path; |
| var pathOffset = 0; |
| core.int index; |
| core.String subPart; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 1), |
| unittest.equals('/'), |
| ); |
| pathOffset += 1; |
| unittest.expect( |
| path.substring(pathOffset, pathOffset + 3), |
| unittest.equals('v2/'), |
| ); |
| pathOffset += 3; |
| // NOTE: We cannot test reserved expansions due to the inability to reverse the operation; |
| |
| final query = req.url.query; |
| var queryOffset = 0; |
| final queryMap = <core.String, core.List<core.String>>{}; |
| void addQueryParam(core.String n, core.String v) => |
| queryMap.putIfAbsent(n, () => []).add(v); |
| |
| if (query.isNotEmpty) { |
| for (var part in query.split('&')) { |
| final keyValue = part.split('='); |
| addQueryParam( |
| core.Uri.decodeQueryComponent(keyValue[0]), |
| core.Uri.decodeQueryComponent(keyValue[1]), |
| ); |
| } |
| } |
| unittest.expect( |
| queryMap['fields']!.first, |
| unittest.equals(arg_$fields), |
| ); |
| |
| final h = {'content-type': 'application/json; charset=utf-8'}; |
| final resp = convert.json.encode( |
| buildGoogleCloudDialogflowV2SearchKnowledgeResponse(), |
| ); |
| return async.Future.value(stringResponse(200, h, resp)); |
| }), |
| true, |
| ); |
| final response = await res.searchKnowledge( |
| arg_request, |
| arg_parent, |
| $fields: arg_$fields, |
| ); |
| checkGoogleCloudDialogflowV2SearchKnowledgeResponse( |
| response as api.GoogleCloudDialogflowV2SearchKnowledgeResponse, |
| ); |
| }); |
| }); |
| } |