├── .gitattributes ├── .owlbot └── create_conversation_model_sample_fix.patch ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── VERSION ├── composer.json ├── metadata └── V2 │ ├── Agent.php │ ├── AnswerRecord.php │ ├── AudioConfig.php │ ├── Context.php │ ├── Conversation.php │ ├── ConversationDataset.php │ ├── ConversationEvent.php │ ├── ConversationModel.php │ ├── ConversationProfile.php │ ├── Document.php │ ├── EncryptionSpec.php │ ├── EntityType.php │ ├── Environment.php │ ├── Fulfillment.php │ ├── Gcs.php │ ├── Generator.php │ ├── HumanAgentAssistantEvent.php │ ├── Intent.php │ ├── KnowledgeBase.php │ ├── Participant.php │ ├── Session.php │ ├── SessionEntityType.php │ ├── ValidationResult.php │ ├── Version.php │ └── Webhook.php └── src └── V2 ├── Agent.php ├── Agent ├── ApiVersion.php ├── MatchMode.php └── Tier.php ├── AgentAssistantFeedback.php ├── AgentAssistantFeedback ├── AnswerRelevance.php ├── DocumentCorrectness.php ├── DocumentEfficiency.php ├── KnowledgeAssistFeedback.php ├── KnowledgeSearchFeedback.php └── SummarizationFeedback.php ├── AgentAssistantRecord.php ├── AnalyzeContentRequest.php ├── AnalyzeContentResponse.php ├── AnnotatedMessagePart.php ├── AnswerFeedback.php ├── AnswerFeedback └── CorrectnessLevel.php ├── AnswerRecord.php ├── ArticleAnswer.php ├── ArticleSuggestionModelMetadata.php ├── AssistQueryParameters.php ├── AudioEncoding.php ├── AudioInput.php ├── AutomatedAgentConfig.php ├── AutomatedAgentReply.php ├── AutomatedAgentReply └── AutomatedAgentReplyType.php ├── BatchCreateEntitiesRequest.php ├── BatchDeleteEntitiesRequest.php ├── BatchDeleteEntityTypesRequest.php ├── BatchDeleteIntentsRequest.php ├── BatchUpdateEntitiesRequest.php ├── BatchUpdateEntityTypesRequest.php ├── BatchUpdateEntityTypesResponse.php ├── BatchUpdateIntentsRequest.php ├── BatchUpdateIntentsResponse.php ├── ClearSuggestionFeatureConfigOperationMetadata.php ├── ClearSuggestionFeatureConfigRequest.php ├── Client ├── AgentsClient.php ├── AnswerRecordsClient.php ├── ContextsClient.php ├── ConversationDatasetsClient.php ├── ConversationModelsClient.php ├── ConversationProfilesClient.php ├── ConversationsClient.php ├── DocumentsClient.php ├── EncryptionSpecServiceClient.php ├── EntityTypesClient.php ├── EnvironmentsClient.php ├── FulfillmentsClient.php ├── GeneratorsClient.php ├── IntentsClient.php ├── KnowledgeBasesClient.php ├── ParticipantsClient.php ├── SessionEntityTypesClient.php ├── SessionsClient.php └── VersionsClient.php ├── CloudConversationDebuggingInfo.php ├── CompleteConversationRequest.php ├── Context.php ├── Conversation.php ├── Conversation ├── ContextReference.php ├── ContextReference │ ├── ContextContent.php │ ├── ContextContent │ │ └── ContentFormat.php │ └── UpdateMode.php ├── ConversationStage.php ├── LifecycleState.php ├── TelephonyConnectionInfo.php └── TelephonyConnectionInfo │ ├── MimeContent.php │ └── SipHeader.php ├── ConversationContext.php ├── ConversationDataset.php ├── ConversationEvent.php ├── ConversationEvent └── Type.php ├── ConversationInfo.php ├── ConversationModel.php ├── ConversationModel ├── ModelType.php └── State.php ├── ConversationModelEvaluation.php ├── ConversationPhoneNumber.php ├── ConversationProfile.php ├── CreateContextRequest.php ├── CreateConversationDatasetOperationMetadata.php ├── CreateConversationDatasetRequest.php ├── CreateConversationModelEvaluationOperationMetadata.php ├── CreateConversationModelEvaluationOperationMetadata └── State.php ├── CreateConversationModelEvaluationRequest.php ├── CreateConversationModelOperationMetadata.php ├── CreateConversationModelOperationMetadata └── State.php ├── CreateConversationModelRequest.php ├── CreateConversationProfileRequest.php ├── CreateConversationRequest.php ├── CreateDocumentRequest.php ├── CreateEntityTypeRequest.php ├── CreateEnvironmentRequest.php ├── CreateGeneratorRequest.php ├── CreateIntentRequest.php ├── CreateKnowledgeBaseRequest.php ├── CreateParticipantRequest.php ├── CreateSessionEntityTypeRequest.php ├── CreateVersionRequest.php ├── DeleteAgentRequest.php ├── DeleteAllContextsRequest.php ├── DeleteContextRequest.php ├── DeleteConversationDatasetOperationMetadata.php ├── DeleteConversationDatasetRequest.php ├── DeleteConversationModelOperationMetadata.php ├── DeleteConversationModelRequest.php ├── DeleteConversationProfileRequest.php ├── DeleteDocumentRequest.php ├── DeleteEntityTypeRequest.php ├── DeleteEnvironmentRequest.php ├── DeleteGeneratorRequest.php ├── DeleteIntentRequest.php ├── DeleteKnowledgeBaseRequest.php ├── DeleteSessionEntityTypeRequest.php ├── DeleteVersionRequest.php ├── DeployConversationModelOperationMetadata.php ├── DeployConversationModelRequest.php ├── DetectIntentRequest.php ├── DetectIntentResponse.php ├── DialogflowAssistAnswer.php ├── Document.php ├── Document ├── KnowledgeType.php ├── ReloadStatus.php └── State.php ├── DtmfParameters.php ├── EncryptionSpec.php ├── EntityType.php ├── EntityType ├── AutoExpansionMode.php ├── Entity.php └── Kind.php ├── EntityTypeBatch.php ├── Environment.php ├── Environment └── State.php ├── EnvironmentHistory.php ├── EnvironmentHistory └── Entry.php ├── EvaluationConfig.php ├── EvaluationConfig ├── SmartComposeConfig.php └── SmartReplyConfig.php ├── EventInput.php ├── ExportAgentRequest.php ├── ExportAgentResponse.php ├── ExportDocumentRequest.php ├── ExportOperationMetadata.php ├── FaqAnswer.php ├── FewShotExample.php ├── FreeFormContext.php ├── FreeFormSuggestion.php ├── Fulfillment.php ├── Fulfillment ├── Feature.php ├── Feature │ └── Type.php └── GenericWebService.php ├── GcsDestination.php ├── GcsSources.php ├── GenerateStatelessSuggestionRequest.php ├── GenerateStatelessSuggestionResponse.php ├── GenerateStatelessSummaryRequest.php ├── GenerateStatelessSummaryRequest └── MinimalConversation.php ├── GenerateStatelessSummaryResponse.php ├── GenerateStatelessSummaryResponse └── Summary.php ├── GenerateSuggestionsRequest.php ├── GenerateSuggestionsResponse.php ├── GenerateSuggestionsResponse └── GeneratorSuggestionAnswer.php ├── Generator.php ├── GeneratorSuggestion.php ├── GetAgentRequest.php ├── GetContextRequest.php ├── GetConversationDatasetRequest.php ├── GetConversationModelEvaluationRequest.php ├── GetConversationModelRequest.php ├── GetConversationProfileRequest.php ├── GetConversationRequest.php ├── GetDocumentRequest.php ├── GetEncryptionSpecRequest.php ├── GetEntityTypeRequest.php ├── GetEnvironmentHistoryRequest.php ├── GetEnvironmentRequest.php ├── GetFulfillmentRequest.php ├── GetGeneratorRequest.php ├── GetIntentRequest.php ├── GetKnowledgeBaseRequest.php ├── GetParticipantRequest.php ├── GetSessionEntityTypeRequest.php ├── GetValidationResultRequest.php ├── GetVersionRequest.php ├── HumanAgentAssistantConfig.php ├── HumanAgentAssistantConfig ├── ConversationModelConfig.php ├── ConversationProcessConfig.php ├── MessageAnalysisConfig.php ├── SuggestionConfig.php ├── SuggestionFeatureConfig.php ├── SuggestionQueryConfig.php ├── SuggestionQueryConfig │ ├── ContextFilterSettings.php │ ├── DialogflowQuerySource.php │ ├── DialogflowQuerySource │ │ └── HumanAgentSideConfig.php │ ├── DocumentQuerySource.php │ ├── KnowledgeBaseQuerySource.php │ ├── Sections.php │ └── Sections │ │ └── SectionType.php └── SuggestionTriggerSettings.php ├── HumanAgentAssistantEvent.php ├── HumanAgentHandoffConfig.php ├── HumanAgentHandoffConfig ├── LivePersonConfig.php └── SalesforceLiveAgentConfig.php ├── ImportAgentRequest.php ├── ImportConversationDataOperationMetadata.php ├── ImportConversationDataOperationResponse.php ├── ImportConversationDataRequest.php ├── ImportDocumentTemplate.php ├── ImportDocumentsRequest.php ├── ImportDocumentsResponse.php ├── InferenceParameter.php ├── IngestContextReferencesRequest.php ├── IngestContextReferencesResponse.php ├── InitializeEncryptionSpecMetadata.php ├── InitializeEncryptionSpecRequest.php ├── InitializeEncryptionSpecResponse.php ├── InputAudioConfig.php ├── InputConfig.php ├── InputDataset.php ├── InputTextConfig.php ├── Intent.php ├── Intent ├── FollowupIntentInfo.php ├── Message.php ├── Message │ ├── BasicCard.php │ ├── BasicCard │ │ ├── Button.php │ │ └── Button │ │ │ └── OpenUriAction.php │ ├── BrowseCarouselCard.php │ ├── BrowseCarouselCard │ │ ├── BrowseCarouselCardItem.php │ │ ├── BrowseCarouselCardItem │ │ │ ├── OpenUrlAction.php │ │ │ └── OpenUrlAction │ │ │ │ └── UrlTypeHint.php │ │ └── ImageDisplayOptions.php │ ├── Card.php │ ├── Card │ │ └── Button.php │ ├── CarouselSelect.php │ ├── CarouselSelect │ │ └── Item.php │ ├── ColumnProperties.php │ ├── ColumnProperties │ │ └── HorizontalAlignment.php │ ├── Image.php │ ├── LinkOutSuggestion.php │ ├── ListSelect.php │ ├── ListSelect │ │ └── Item.php │ ├── MediaContent.php │ ├── MediaContent │ │ ├── ResponseMediaObject.php │ │ └── ResponseMediaType.php │ ├── Platform.php │ ├── QuickReplies.php │ ├── SelectItemInfo.php │ ├── SimpleResponse.php │ ├── SimpleResponses.php │ ├── Suggestion.php │ ├── Suggestions.php │ ├── TableCard.php │ ├── TableCardCell.php │ ├── TableCardRow.php │ └── Text.php ├── Parameter.php ├── TrainingPhrase.php ├── TrainingPhrase │ ├── Part.php │ └── Type.php └── WebhookState.php ├── IntentBatch.php ├── IntentSuggestion.php ├── IntentView.php ├── KnowledgeAssistAnswer.php ├── KnowledgeAssistAnswer ├── KnowledgeAnswer.php ├── KnowledgeAnswer │ ├── FaqSource.php │ ├── GenerativeSource.php │ └── GenerativeSource │ │ └── Snippet.php └── SuggestedQuery.php ├── KnowledgeBase.php ├── KnowledgeOperationMetadata.php ├── KnowledgeOperationMetadata └── State.php ├── ListAnswerRecordsRequest.php ├── ListAnswerRecordsResponse.php ├── ListContextsRequest.php ├── ListContextsResponse.php ├── ListConversationDatasetsRequest.php ├── ListConversationDatasetsResponse.php ├── ListConversationModelEvaluationsRequest.php ├── ListConversationModelEvaluationsResponse.php ├── ListConversationModelsRequest.php ├── ListConversationModelsResponse.php ├── ListConversationProfilesRequest.php ├── ListConversationProfilesResponse.php ├── ListConversationsRequest.php ├── ListConversationsResponse.php ├── ListDocumentsRequest.php ├── ListDocumentsResponse.php ├── ListEntityTypesRequest.php ├── ListEntityTypesResponse.php ├── ListEnvironmentsRequest.php ├── ListEnvironmentsResponse.php ├── ListGeneratorsRequest.php ├── ListGeneratorsResponse.php ├── ListIntentsRequest.php ├── ListIntentsResponse.php ├── ListKnowledgeBasesRequest.php ├── ListKnowledgeBasesResponse.php ├── ListMessagesRequest.php ├── ListMessagesResponse.php ├── ListParticipantsRequest.php ├── ListParticipantsResponse.php ├── ListSessionEntityTypesRequest.php ├── ListSessionEntityTypesResponse.php ├── ListVersionsRequest.php ├── ListVersionsResponse.php ├── LoggingConfig.php ├── Message.php ├── MessageAnnotation.php ├── MessageEntry.php ├── MessageEntry └── Role.php ├── NotificationConfig.php ├── NotificationConfig └── MessageFormat.php ├── OriginalDetectIntentRequest.php ├── OutputAudio.php ├── OutputAudioConfig.php ├── OutputAudioEncoding.php ├── Participant.php ├── Participant └── Role.php ├── QueryInput.php ├── QueryParameters.php ├── QueryResult.php ├── ReloadDocumentRequest.php ├── RestoreAgentRequest.php ├── SearchAgentsRequest.php ├── SearchAgentsResponse.php ├── SearchKnowledgeAnswer.php ├── SearchKnowledgeAnswer ├── AnswerSource.php └── AnswerType.php ├── SearchKnowledgeRequest.php ├── SearchKnowledgeRequest ├── QuerySource.php ├── SearchConfig.php └── SearchConfig │ ├── BoostSpecs.php │ ├── BoostSpecs │ ├── BoostSpec.php │ └── BoostSpec │ │ ├── ConditionBoostSpec.php │ │ └── ConditionBoostSpec │ │ ├── BoostControlSpec.php │ │ └── BoostControlSpec │ │ ├── AttributeType.php │ │ ├── ControlPoint.php │ │ └── InterpolationType.php │ └── FilterSpecs.php ├── SearchKnowledgeResponse.php ├── Sentiment.php ├── SentimentAnalysisRequestConfig.php ├── SentimentAnalysisResult.php ├── SessionEntityType.php ├── SessionEntityType └── EntityOverrideMode.php ├── SetAgentRequest.php ├── SetSuggestionFeatureConfigOperationMetadata.php ├── SetSuggestionFeatureConfigRequest.php ├── SmartReplyAnswer.php ├── SmartReplyMetrics.php ├── SmartReplyMetrics └── TopNMetrics.php ├── SmartReplyModelMetadata.php ├── SpeechContext.php ├── SpeechModelVariant.php ├── SpeechToTextConfig.php ├── SpeechWordInfo.php ├── SsmlVoiceGender.php ├── StreamingAnalyzeContentRequest.php ├── StreamingAnalyzeContentResponse.php ├── StreamingDetectIntentRequest.php ├── StreamingDetectIntentResponse.php ├── StreamingRecognitionResult.php ├── StreamingRecognitionResult └── MessageType.php ├── SuggestArticlesRequest.php ├── SuggestArticlesResponse.php ├── SuggestConversationSummaryRequest.php ├── SuggestConversationSummaryResponse.php ├── SuggestConversationSummaryResponse └── Summary.php ├── SuggestFaqAnswersRequest.php ├── SuggestFaqAnswersResponse.php ├── SuggestKnowledgeAssistRequest.php ├── SuggestKnowledgeAssistResponse.php ├── SuggestSmartRepliesRequest.php ├── SuggestSmartRepliesResponse.php ├── SuggestionFeature.php ├── SuggestionFeature └── Type.php ├── SuggestionInput.php ├── SuggestionResult.php ├── SummarizationContext.php ├── SummarizationSection.php ├── SummarizationSection └── Type.php ├── SummarizationSectionList.php ├── SummarySuggestion.php ├── SummarySuggestion └── SummarySection.php ├── SynthesizeSpeechConfig.php ├── TelephonyDtmf.php ├── TelephonyDtmfEvents.php ├── TextInput.php ├── TextToSpeechSettings.php ├── TrainAgentRequest.php ├── TriggerEvent.php ├── UndeployConversationModelOperationMetadata.php ├── UndeployConversationModelRequest.php ├── UpdateAnswerRecordRequest.php ├── UpdateContextRequest.php ├── UpdateConversationProfileRequest.php ├── UpdateDocumentRequest.php ├── UpdateEntityTypeRequest.php ├── UpdateEnvironmentRequest.php ├── UpdateFulfillmentRequest.php ├── UpdateGeneratorRequest.php ├── UpdateIntentRequest.php ├── UpdateKnowledgeBaseRequest.php ├── UpdateParticipantRequest.php ├── UpdateSessionEntityTypeRequest.php ├── UpdateVersionRequest.php ├── ValidationError.php ├── ValidationError └── Severity.php ├── ValidationResult.php ├── Version.php ├── Version └── VersionStatus.php ├── VoiceSelectionParams.php ├── WebhookRequest.php ├── WebhookResponse.php └── resources ├── agents_client_config.json ├── agents_descriptor_config.php ├── agents_rest_client_config.php ├── answer_records_client_config.json ├── answer_records_descriptor_config.php ├── answer_records_rest_client_config.php ├── contexts_client_config.json ├── contexts_descriptor_config.php ├── contexts_rest_client_config.php ├── conversation_datasets_client_config.json ├── conversation_datasets_descriptor_config.php ├── conversation_datasets_rest_client_config.php ├── conversation_models_client_config.json ├── conversation_models_descriptor_config.php ├── conversation_models_rest_client_config.php ├── conversation_profiles_client_config.json ├── conversation_profiles_descriptor_config.php ├── conversation_profiles_rest_client_config.php ├── conversations_client_config.json ├── conversations_descriptor_config.php ├── conversations_rest_client_config.php ├── documents_client_config.json ├── documents_descriptor_config.php ├── documents_rest_client_config.php ├── encryption_spec_service_client_config.json ├── encryption_spec_service_descriptor_config.php ├── encryption_spec_service_rest_client_config.php ├── entity_types_client_config.json ├── entity_types_descriptor_config.php ├── entity_types_rest_client_config.php ├── environments_client_config.json ├── environments_descriptor_config.php ├── environments_rest_client_config.php ├── fulfillments_client_config.json ├── fulfillments_descriptor_config.php ├── fulfillments_rest_client_config.php ├── generators_client_config.json ├── generators_descriptor_config.php ├── generators_rest_client_config.php ├── intents_client_config.json ├── intents_descriptor_config.php ├── intents_rest_client_config.php ├── knowledge_bases_client_config.json ├── knowledge_bases_descriptor_config.php ├── knowledge_bases_rest_client_config.php ├── participants_client_config.json ├── participants_descriptor_config.php ├── participants_rest_client_config.php ├── session_entity_types_client_config.json ├── session_entity_types_descriptor_config.php ├── session_entity_types_rest_client_config.php ├── sessions_client_config.json ├── sessions_descriptor_config.php ├── sessions_rest_client_config.php ├── versions_client_config.json ├── versions_descriptor_config.php └── versions_rest_client_config.php /.gitattributes: -------------------------------------------------------------------------------- 1 | /*.xml.dist export-ignore 2 | /tests export-ignore 3 | /.github export-ignore 4 | /samples export-ignore 5 | /.OwlBot.yaml export-ignore 6 | /owlbot.py export-ignore 7 | /src/**/gapic_metadata.json export-ignore 8 | -------------------------------------------------------------------------------- /.owlbot/create_conversation_model_sample_fix.patch: -------------------------------------------------------------------------------- 1 | diff --git a/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php b/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php 2 | index 6f11d9f9524..a7a4ddb6fa8 100644 3 | --- a/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php 4 | +++ b/Dialogflow/samples/V2/ConversationModelsClient/create_conversation_model.php 5 | @@ -26,6 +26,7 @@ require_once __DIR__ . '/../../../vendor/autoload.php'; 6 | use Google\ApiCore\ApiException; 7 | use Google\ApiCore\OperationResponse; 8 | use Google\Cloud\Dialogflow\V2\ConversationModel; 9 | +use Google\Cloud\Dialogflow\V2\ConversationDatasetsClient; 10 | use Google\Cloud\Dialogflow\V2\ConversationModelsClient; 11 | use Google\Cloud\Dialogflow\V2\InputDataset; 12 | use Google\Rpc\Status; 13 | @@ -93,7 +94,7 @@ function create_conversation_model_sample( 14 | function callSample(): void 15 | { 16 | $conversationModelDisplayName = '[DISPLAY_NAME]'; 17 | - $formattedConversationModelDatasetsDataset = ConversationModelsClient::conversationDatasetName( 18 | + $formattedConversationModelDatasetsDataset = ConversationDatasetsClient::conversationDatasetName( 19 | '[PROJECT]', 20 | '[LOCATION]', 21 | '[CONVERSATION_DATASET]' 22 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, 4 | and in the interest of fostering an open and welcoming community, 5 | we pledge to respect all people who contribute through reporting issues, 6 | posting feature requests, updating documentation, 7 | submitting pull requests or patches, and other activities. 8 | 9 | We are committed to making participation in this project 10 | a harassment-free experience for everyone, 11 | regardless of level of experience, gender, gender identity and expression, 12 | sexual orientation, disability, personal appearance, 13 | body size, race, ethnicity, age, religion, or nationality. 14 | 15 | Examples of unacceptable behavior by participants include: 16 | 17 | * The use of sexualized language or imagery 18 | * Personal attacks 19 | * Trolling or insulting/derogatory comments 20 | * Public or private harassment 21 | * Publishing other's private information, 22 | such as physical or electronic 23 | addresses, without explicit permission 24 | * Other unethical or unprofessional conduct. 25 | 26 | Project maintainers have the right and responsibility to remove, edit, or reject 27 | comments, commits, code, wiki edits, issues, and other contributions 28 | that are not aligned to this Code of Conduct. 29 | By adopting this Code of Conduct, 30 | project maintainers commit themselves to fairly and consistently 31 | applying these principles to every aspect of managing this project. 32 | Project maintainers who do not follow or enforce the Code of Conduct 33 | may be permanently removed from the project team. 34 | 35 | This code of conduct applies both within project spaces and in public spaces 36 | when an individual is representing the project or its community. 37 | 38 | Instances of abusive, harassing, or otherwise unacceptable behavior 39 | may be reported by opening an issue 40 | or contacting one or more of the project maintainers. 41 | 42 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, 43 | available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to Contribute 2 | 3 | We'd love to accept your patches and contributions to this project. We accept 4 | and review pull requests against the main 5 | [Google Cloud PHP](https://github.com/googleapis/google-cloud-php) 6 | repository, which contains all of our client libraries. You will also need to 7 | sign a Contributor License Agreement. For more details about how to contribute, 8 | see the 9 | [CONTRIBUTING.md](https://github.com/googleapis/google-cloud-php/blob/main/CONTRIBUTING.md) 10 | file in the main Google Cloud PHP repository. 11 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). 4 | 5 | The Google Security Team will respond within 5 working days of your report on g.co/vulnz. 6 | 7 | We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. 8 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 2.1.1 2 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "google/cloud-dialogflow", 3 | "description": "Google Cloud Dialogflow Client for PHP", 4 | "license": "Apache-2.0", 5 | "minimum-stability": "stable", 6 | "autoload": { 7 | "psr-4": { 8 | "Google\\Cloud\\Dialogflow\\": "src", 9 | "GPBMetadata\\Google\\Cloud\\Dialogflow\\": "metadata" 10 | } 11 | }, 12 | "extra": { 13 | "component": { 14 | "id": "cloud-dialogflow", 15 | "path": "Dialogflow", 16 | "entry": null, 17 | "target": "googleapis/google-cloud-php-dialogflow.git" 18 | } 19 | }, 20 | "require": { 21 | "php": "^8.0", 22 | "google/gax": "^1.36.0" 23 | }, 24 | "require-dev": { 25 | "phpunit/phpunit": "^9.0", 26 | "google/cloud-core": "^1.52.7" 27 | }, 28 | "suggest": { 29 | "ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google." 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /metadata/V2/Agent.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Agent.php -------------------------------------------------------------------------------- /metadata/V2/AnswerRecord.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/AnswerRecord.php -------------------------------------------------------------------------------- /metadata/V2/AudioConfig.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/AudioConfig.php -------------------------------------------------------------------------------- /metadata/V2/Context.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Context.php -------------------------------------------------------------------------------- /metadata/V2/Conversation.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Conversation.php -------------------------------------------------------------------------------- /metadata/V2/ConversationDataset.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/ConversationDataset.php -------------------------------------------------------------------------------- /metadata/V2/ConversationEvent.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/ConversationEvent.php -------------------------------------------------------------------------------- /metadata/V2/ConversationModel.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/ConversationModel.php -------------------------------------------------------------------------------- /metadata/V2/ConversationProfile.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/ConversationProfile.php -------------------------------------------------------------------------------- /metadata/V2/Document.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Document.php -------------------------------------------------------------------------------- /metadata/V2/EncryptionSpec.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/EncryptionSpec.php -------------------------------------------------------------------------------- /metadata/V2/EntityType.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/EntityType.php -------------------------------------------------------------------------------- /metadata/V2/Environment.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Environment.php -------------------------------------------------------------------------------- /metadata/V2/Fulfillment.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Fulfillment.php -------------------------------------------------------------------------------- /metadata/V2/Gcs.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Gcs.php -------------------------------------------------------------------------------- /metadata/V2/Generator.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Generator.php -------------------------------------------------------------------------------- /metadata/V2/HumanAgentAssistantEvent.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/HumanAgentAssistantEvent.php -------------------------------------------------------------------------------- /metadata/V2/Intent.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Intent.php -------------------------------------------------------------------------------- /metadata/V2/KnowledgeBase.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/KnowledgeBase.php -------------------------------------------------------------------------------- /metadata/V2/Participant.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Participant.php -------------------------------------------------------------------------------- /metadata/V2/Session.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Session.php -------------------------------------------------------------------------------- /metadata/V2/SessionEntityType.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/SessionEntityType.php -------------------------------------------------------------------------------- /metadata/V2/ValidationResult.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/ValidationResult.php -------------------------------------------------------------------------------- /metadata/V2/Version.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Version.php -------------------------------------------------------------------------------- /metadata/V2/Webhook.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/googleapis/google-cloud-php-dialogflow/8abb3c84978b34d13a8027e33a9d30cb57123dc3/metadata/V2/Webhook.php -------------------------------------------------------------------------------- /src/V2/Agent/ApiVersion.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Agent.ApiVersion 13 | */ 14 | class ApiVersion 15 | { 16 | /** 17 | * Not specified. 18 | * 19 | * Generated from protobuf enum API_VERSION_UNSPECIFIED = 0; 20 | */ 21 | const API_VERSION_UNSPECIFIED = 0; 22 | /** 23 | * Legacy V1 API. 24 | * 25 | * Generated from protobuf enum API_VERSION_V1 = 1; 26 | */ 27 | const API_VERSION_V1 = 1; 28 | /** 29 | * V2 API. 30 | * 31 | * Generated from protobuf enum API_VERSION_V2 = 2; 32 | */ 33 | const API_VERSION_V2 = 2; 34 | /** 35 | * V2beta1 API. 36 | * 37 | * Generated from protobuf enum API_VERSION_V2_BETA_1 = 3; 38 | */ 39 | const API_VERSION_V2_BETA_1 = 3; 40 | 41 | private static $valueToName = [ 42 | self::API_VERSION_UNSPECIFIED => 'API_VERSION_UNSPECIFIED', 43 | self::API_VERSION_V1 => 'API_VERSION_V1', 44 | self::API_VERSION_V2 => 'API_VERSION_V2', 45 | self::API_VERSION_V2_BETA_1 => 'API_VERSION_V2_BETA_1', 46 | ]; 47 | 48 | public static function name($value) 49 | { 50 | if (!isset(self::$valueToName[$value])) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 53 | } 54 | return self::$valueToName[$value]; 55 | } 56 | 57 | 58 | public static function value($name) 59 | { 60 | $const = __CLASS__ . '::' . strtoupper($name); 61 | if (!defined($const)) { 62 | throw new UnexpectedValueException(sprintf( 63 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 64 | } 65 | return constant($const); 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/Agent/MatchMode.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Agent.MatchMode 13 | */ 14 | class MatchMode 15 | { 16 | /** 17 | * Not specified. 18 | * 19 | * Generated from protobuf enum MATCH_MODE_UNSPECIFIED = 0; 20 | */ 21 | const MATCH_MODE_UNSPECIFIED = 0; 22 | /** 23 | * Best for agents with a small number of examples in intents and/or wide 24 | * use of templates syntax and composite entities. 25 | * 26 | * Generated from protobuf enum MATCH_MODE_HYBRID = 1; 27 | */ 28 | const MATCH_MODE_HYBRID = 1; 29 | /** 30 | * Can be used for agents with a large number of examples in intents, 31 | * especially the ones using @sys.any or very large custom entities. 32 | * 33 | * Generated from protobuf enum MATCH_MODE_ML_ONLY = 2; 34 | */ 35 | const MATCH_MODE_ML_ONLY = 2; 36 | 37 | private static $valueToName = [ 38 | self::MATCH_MODE_UNSPECIFIED => 'MATCH_MODE_UNSPECIFIED', 39 | self::MATCH_MODE_HYBRID => 'MATCH_MODE_HYBRID', 40 | self::MATCH_MODE_ML_ONLY => 'MATCH_MODE_ML_ONLY', 41 | ]; 42 | 43 | public static function name($value) 44 | { 45 | if (!isset(self::$valueToName[$value])) { 46 | throw new UnexpectedValueException(sprintf( 47 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 48 | } 49 | return self::$valueToName[$value]; 50 | } 51 | 52 | 53 | public static function value($name) 54 | { 55 | $const = __CLASS__ . '::' . strtoupper($name); 56 | if (!defined($const)) { 57 | throw new UnexpectedValueException(sprintf( 58 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 59 | } 60 | return constant($const); 61 | } 62 | } 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/V2/Agent/Tier.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Agent.Tier 13 | */ 14 | class Tier 15 | { 16 | /** 17 | * Not specified. This value should never be used. 18 | * 19 | * Generated from protobuf enum TIER_UNSPECIFIED = 0; 20 | */ 21 | const TIER_UNSPECIFIED = 0; 22 | /** 23 | * Trial Edition, previously known as Standard Edition. 24 | * 25 | * Generated from protobuf enum TIER_STANDARD = 1; 26 | */ 27 | const TIER_STANDARD = 1; 28 | /** 29 | * Essentials Edition, previously known as Enterprise Essential Edition. 30 | * 31 | * Generated from protobuf enum TIER_ENTERPRISE = 2; 32 | */ 33 | const TIER_ENTERPRISE = 2; 34 | /** 35 | * Essentials Edition (same as TIER_ENTERPRISE), previously known as 36 | * Enterprise Plus Edition. 37 | * 38 | * Generated from protobuf enum TIER_ENTERPRISE_PLUS = 3 [deprecated = true]; 39 | */ 40 | const TIER_ENTERPRISE_PLUS = 3; 41 | 42 | private static $valueToName = [ 43 | self::TIER_UNSPECIFIED => 'TIER_UNSPECIFIED', 44 | self::TIER_STANDARD => 'TIER_STANDARD', 45 | self::TIER_ENTERPRISE => 'TIER_ENTERPRISE', 46 | self::TIER_ENTERPRISE_PLUS => 'TIER_ENTERPRISE_PLUS', 47 | ]; 48 | 49 | public static function name($value) 50 | { 51 | if (!isset(self::$valueToName[$value])) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 54 | } 55 | return self::$valueToName[$value]; 56 | } 57 | 58 | 59 | public static function value($name) 60 | { 61 | $const = __CLASS__ . '::' . strtoupper($name); 62 | if (!defined($const)) { 63 | throw new UnexpectedValueException(sprintf( 64 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 65 | } 66 | return constant($const); 67 | } 68 | } 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/V2/AgentAssistantFeedback/AnswerRelevance.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.AgentAssistantFeedback.AnswerRelevance 13 | */ 14 | class AnswerRelevance 15 | { 16 | /** 17 | * Answer relevance unspecified. 18 | * 19 | * Generated from protobuf enum ANSWER_RELEVANCE_UNSPECIFIED = 0; 20 | */ 21 | const ANSWER_RELEVANCE_UNSPECIFIED = 0; 22 | /** 23 | * Answer is irrelevant to query. 24 | * 25 | * Generated from protobuf enum IRRELEVANT = 1; 26 | */ 27 | const IRRELEVANT = 1; 28 | /** 29 | * Answer is relevant to query. 30 | * 31 | * Generated from protobuf enum RELEVANT = 2; 32 | */ 33 | const RELEVANT = 2; 34 | 35 | private static $valueToName = [ 36 | self::ANSWER_RELEVANCE_UNSPECIFIED => 'ANSWER_RELEVANCE_UNSPECIFIED', 37 | self::IRRELEVANT => 'IRRELEVANT', 38 | self::RELEVANT => 'RELEVANT', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/AgentAssistantFeedback/DocumentCorrectness.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentCorrectness 13 | */ 14 | class DocumentCorrectness 15 | { 16 | /** 17 | * Document correctness unspecified. 18 | * 19 | * Generated from protobuf enum DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; 20 | */ 21 | const DOCUMENT_CORRECTNESS_UNSPECIFIED = 0; 22 | /** 23 | * Information in document is incorrect. 24 | * 25 | * Generated from protobuf enum INCORRECT = 1; 26 | */ 27 | const INCORRECT = 1; 28 | /** 29 | * Information in document is correct. 30 | * 31 | * Generated from protobuf enum CORRECT = 2; 32 | */ 33 | const CORRECT = 2; 34 | 35 | private static $valueToName = [ 36 | self::DOCUMENT_CORRECTNESS_UNSPECIFIED => 'DOCUMENT_CORRECTNESS_UNSPECIFIED', 37 | self::INCORRECT => 'INCORRECT', 38 | self::CORRECT => 'CORRECT', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/AgentAssistantFeedback/DocumentEfficiency.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency 13 | */ 14 | class DocumentEfficiency 15 | { 16 | /** 17 | * Document efficiency unspecified. 18 | * 19 | * Generated from protobuf enum DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; 20 | */ 21 | const DOCUMENT_EFFICIENCY_UNSPECIFIED = 0; 22 | /** 23 | * Document is inefficient. 24 | * 25 | * Generated from protobuf enum INEFFICIENT = 1; 26 | */ 27 | const INEFFICIENT = 1; 28 | /** 29 | * Document is efficient. 30 | * 31 | * Generated from protobuf enum EFFICIENT = 2; 32 | */ 33 | const EFFICIENT = 2; 34 | 35 | private static $valueToName = [ 36 | self::DOCUMENT_EFFICIENCY_UNSPECIFIED => 'DOCUMENT_EFFICIENCY_UNSPECIFIED', 37 | self::INEFFICIENT => 'INEFFICIENT', 38 | self::EFFICIENT => 'EFFICIENT', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/AnswerFeedback/CorrectnessLevel.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.AnswerFeedback.CorrectnessLevel 13 | */ 14 | class CorrectnessLevel 15 | { 16 | /** 17 | * Correctness level unspecified. 18 | * 19 | * Generated from protobuf enum CORRECTNESS_LEVEL_UNSPECIFIED = 0; 20 | */ 21 | const CORRECTNESS_LEVEL_UNSPECIFIED = 0; 22 | /** 23 | * Answer is totally wrong. 24 | * 25 | * Generated from protobuf enum NOT_CORRECT = 1; 26 | */ 27 | const NOT_CORRECT = 1; 28 | /** 29 | * Answer is partially correct. 30 | * 31 | * Generated from protobuf enum PARTIALLY_CORRECT = 2; 32 | */ 33 | const PARTIALLY_CORRECT = 2; 34 | /** 35 | * Answer is fully correct. 36 | * 37 | * Generated from protobuf enum FULLY_CORRECT = 3; 38 | */ 39 | const FULLY_CORRECT = 3; 40 | 41 | private static $valueToName = [ 42 | self::CORRECTNESS_LEVEL_UNSPECIFIED => 'CORRECTNESS_LEVEL_UNSPECIFIED', 43 | self::NOT_CORRECT => 'NOT_CORRECT', 44 | self::PARTIALLY_CORRECT => 'PARTIALLY_CORRECT', 45 | self::FULLY_CORRECT => 'FULLY_CORRECT', 46 | ]; 47 | 48 | public static function name($value) 49 | { 50 | if (!isset(self::$valueToName[$value])) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 53 | } 54 | return self::$valueToName[$value]; 55 | } 56 | 57 | 58 | public static function value($name) 59 | { 60 | $const = __CLASS__ . '::' . strtoupper($name); 61 | if (!defined($const)) { 62 | throw new UnexpectedValueException(sprintf( 63 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 64 | } 65 | return constant($const); 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/ArticleSuggestionModelMetadata.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ArticleSuggestionModelMetadata 15 | */ 16 | class ArticleSuggestionModelMetadata extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Optional. Type of the article suggestion model. If not provided, model_type 20 | * is used. 21 | * 22 | * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; 23 | */ 24 | protected $training_model_type = 0; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type int $training_model_type 33 | * Optional. Type of the article suggestion model. If not provided, model_type 34 | * is used. 35 | * } 36 | */ 37 | public function __construct($data = NULL) { 38 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); 39 | parent::__construct($data); 40 | } 41 | 42 | /** 43 | * Optional. Type of the article suggestion model. If not provided, model_type 44 | * is used. 45 | * 46 | * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; 47 | * @return int 48 | */ 49 | public function getTrainingModelType() 50 | { 51 | return $this->training_model_type; 52 | } 53 | 54 | /** 55 | * Optional. Type of the article suggestion model. If not provided, model_type 56 | * is used. 57 | * 58 | * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 3 [(.google.api.field_behavior) = OPTIONAL]; 59 | * @param int $var 60 | * @return $this 61 | */ 62 | public function setTrainingModelType($var) 63 | { 64 | GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\ModelType::class); 65 | $this->training_model_type = $var; 66 | 67 | return $this; 68 | } 69 | 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/V2/AutomatedAgentReply/AutomatedAgentReplyType.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.AutomatedAgentReply.AutomatedAgentReplyType 13 | */ 14 | class AutomatedAgentReplyType 15 | { 16 | /** 17 | * Not specified. This should never happen. 18 | * 19 | * Generated from protobuf enum AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0; 20 | */ 21 | const AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0; 22 | /** 23 | * Partial reply. e.g. Aggregated responses in a `Fulfillment` that enables 24 | * `return_partial_response` can be returned as partial reply. 25 | * WARNING: partial reply is not eligible for barge-in. 26 | * 27 | * Generated from protobuf enum PARTIAL = 1; 28 | */ 29 | const PARTIAL = 1; 30 | /** 31 | * Final reply. 32 | * 33 | * Generated from protobuf enum FINAL = 2; 34 | */ 35 | const PBFINAL = 2; 36 | 37 | private static $valueToName = [ 38 | self::AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED => 'AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED', 39 | self::PARTIAL => 'PARTIAL', 40 | self::PBFINAL => 'FINAL', 41 | ]; 42 | 43 | public static function name($value) 44 | { 45 | if (!isset(self::$valueToName[$value])) { 46 | throw new UnexpectedValueException(sprintf( 47 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 48 | } 49 | return self::$valueToName[$value]; 50 | } 51 | 52 | 53 | public static function value($name) 54 | { 55 | $const = __CLASS__ . '::' . strtoupper($name); 56 | if (!defined($const)) { 57 | $pbconst = __CLASS__. '::PB' . strtoupper($name); 58 | if (!defined($pbconst)) { 59 | throw new UnexpectedValueException(sprintf( 60 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 61 | } 62 | return constant($pbconst); 63 | } 64 | return constant($const); 65 | } 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/BatchUpdateEntityTypesResponse.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.BatchUpdateEntityTypesResponse 16 | */ 17 | class BatchUpdateEntityTypesResponse extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * The collection of updated or created entity types. 21 | * 22 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; 23 | */ 24 | private $entity_types; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types 33 | * The collection of updated or created entity types. 34 | * } 35 | */ 36 | public function __construct($data = NULL) { 37 | \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); 38 | parent::__construct($data); 39 | } 40 | 41 | /** 42 | * The collection of updated or created entity types. 43 | * 44 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; 45 | * @return \Google\Protobuf\Internal\RepeatedField 46 | */ 47 | public function getEntityTypes() 48 | { 49 | return $this->entity_types; 50 | } 51 | 52 | /** 53 | * The collection of updated or created entity types. 54 | * 55 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; 56 | * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var 57 | * @return $this 58 | */ 59 | public function setEntityTypes($var) 60 | { 61 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); 62 | $this->entity_types = $arr; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/V2/BatchUpdateIntentsResponse.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.BatchUpdateIntentsResponse 16 | */ 17 | class BatchUpdateIntentsResponse extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * The collection of updated or created intents. 21 | * 22 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; 23 | */ 24 | private $intents; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents 33 | * The collection of updated or created intents. 34 | * } 35 | */ 36 | public function __construct($data = NULL) { 37 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 38 | parent::__construct($data); 39 | } 40 | 41 | /** 42 | * The collection of updated or created intents. 43 | * 44 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; 45 | * @return \Google\Protobuf\Internal\RepeatedField 46 | */ 47 | public function getIntents() 48 | { 49 | return $this->intents; 50 | } 51 | 52 | /** 53 | * The collection of updated or created intents. 54 | * 55 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; 56 | * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var 57 | * @return $this 58 | */ 59 | public function setIntents($var) 60 | { 61 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); 62 | $this->intents = $arr; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/V2/Conversation/ContextReference/ContextContent/ContentFormat.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Conversation.ContextReference.ContextContent.ContentFormat 13 | */ 14 | class ContentFormat 15 | { 16 | /** 17 | * Unspecified content format. 18 | * 19 | * Generated from protobuf enum CONTENT_FORMAT_UNSPECIFIED = 0; 20 | */ 21 | const CONTENT_FORMAT_UNSPECIFIED = 0; 22 | /** 23 | * Content was provided in JSON format. 24 | * 25 | * Generated from protobuf enum JSON = 1; 26 | */ 27 | const JSON = 1; 28 | /** 29 | * Content was provided as plain text. 30 | * 31 | * Generated from protobuf enum PLAIN_TEXT = 2; 32 | */ 33 | const PLAIN_TEXT = 2; 34 | 35 | private static $valueToName = [ 36 | self::CONTENT_FORMAT_UNSPECIFIED => 'CONTENT_FORMAT_UNSPECIFIED', 37 | self::JSON => 'JSON', 38 | self::PLAIN_TEXT => 'PLAIN_TEXT', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/Conversation/ContextReference/UpdateMode.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Conversation.ContextReference.UpdateMode 13 | */ 14 | class UpdateMode 15 | { 16 | /** 17 | * Unspecified update mode. 18 | * 19 | * Generated from protobuf enum UPDATE_MODE_UNSPECIFIED = 0; 20 | */ 21 | const UPDATE_MODE_UNSPECIFIED = 0; 22 | /** 23 | * Context content updates are applied in append mode. 24 | * 25 | * Generated from protobuf enum APPEND = 1; 26 | */ 27 | const APPEND = 1; 28 | /** 29 | * Context content updates are applied in overwrite mode. 30 | * 31 | * Generated from protobuf enum OVERWRITE = 2; 32 | */ 33 | const OVERWRITE = 2; 34 | 35 | private static $valueToName = [ 36 | self::UPDATE_MODE_UNSPECIFIED => 'UPDATE_MODE_UNSPECIFIED', 37 | self::APPEND => 'APPEND', 38 | self::OVERWRITE => 'OVERWRITE', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/Conversation/ConversationStage.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Conversation.ConversationStage 15 | */ 16 | class ConversationStage 17 | { 18 | /** 19 | * Unknown. Should never be used after a conversation is successfully 20 | * created. 21 | * 22 | * Generated from protobuf enum CONVERSATION_STAGE_UNSPECIFIED = 0; 23 | */ 24 | const CONVERSATION_STAGE_UNSPECIFIED = 0; 25 | /** 26 | * The conversation should return virtual agent responses into the 27 | * conversation. 28 | * 29 | * Generated from protobuf enum VIRTUAL_AGENT_STAGE = 1; 30 | */ 31 | const VIRTUAL_AGENT_STAGE = 1; 32 | /** 33 | * The conversation should not provide responses, just listen and provide 34 | * suggestions. 35 | * 36 | * Generated from protobuf enum HUMAN_ASSIST_STAGE = 2; 37 | */ 38 | const HUMAN_ASSIST_STAGE = 2; 39 | 40 | private static $valueToName = [ 41 | self::CONVERSATION_STAGE_UNSPECIFIED => 'CONVERSATION_STAGE_UNSPECIFIED', 42 | self::VIRTUAL_AGENT_STAGE => 'VIRTUAL_AGENT_STAGE', 43 | self::HUMAN_ASSIST_STAGE => 'HUMAN_ASSIST_STAGE', 44 | ]; 45 | 46 | public static function name($value) 47 | { 48 | if (!isset(self::$valueToName[$value])) { 49 | throw new UnexpectedValueException(sprintf( 50 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 51 | } 52 | return self::$valueToName[$value]; 53 | } 54 | 55 | 56 | public static function value($name) 57 | { 58 | $const = __CLASS__ . '::' . strtoupper($name); 59 | if (!defined($const)) { 60 | throw new UnexpectedValueException(sprintf( 61 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 62 | } 63 | return constant($const); 64 | } 65 | } 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/V2/Conversation/LifecycleState.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Conversation.LifecycleState 13 | */ 14 | class LifecycleState 15 | { 16 | /** 17 | * Unknown. 18 | * 19 | * Generated from protobuf enum LIFECYCLE_STATE_UNSPECIFIED = 0; 20 | */ 21 | const LIFECYCLE_STATE_UNSPECIFIED = 0; 22 | /** 23 | * Conversation is currently open for media analysis. 24 | * 25 | * Generated from protobuf enum IN_PROGRESS = 1; 26 | */ 27 | const IN_PROGRESS = 1; 28 | /** 29 | * Conversation has been completed. 30 | * 31 | * Generated from protobuf enum COMPLETED = 2; 32 | */ 33 | const COMPLETED = 2; 34 | 35 | private static $valueToName = [ 36 | self::LIFECYCLE_STATE_UNSPECIFIED => 'LIFECYCLE_STATE_UNSPECIFIED', 37 | self::IN_PROGRESS => 'IN_PROGRESS', 38 | self::COMPLETED => 'COMPLETED', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/ConversationContext.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ConversationContext 15 | */ 16 | class ConversationContext extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Optional. List of message transcripts in the conversation. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.MessageEntry message_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; 22 | */ 23 | private $message_entries; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\MessageEntry>|\Google\Protobuf\Internal\RepeatedField $message_entries 32 | * Optional. List of message transcripts in the conversation. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Optional. List of message transcripts in the conversation. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.MessageEntry message_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getMessageEntries() 47 | { 48 | return $this->message_entries; 49 | } 50 | 51 | /** 52 | * Optional. List of message transcripts in the conversation. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.MessageEntry message_entries = 1 [(.google.api.field_behavior) = OPTIONAL]; 55 | * @param array<\Google\Cloud\Dialogflow\V2\MessageEntry>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setMessageEntries($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\MessageEntry::class); 61 | $this->message_entries = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/ConversationInfo.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ConversationInfo 15 | */ 16 | class ConversationInfo extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Optional. The language code of the conversation data within this dataset. 20 | * See https://cloud.google.com/apis/design/standard_fields for more 21 | * information. Supports all UTF-8 languages. 22 | * 23 | * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; 24 | */ 25 | protected $language_code = ''; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type string $language_code 34 | * Optional. The language code of the conversation data within this dataset. 35 | * See https://cloud.google.com/apis/design/standard_fields for more 36 | * information. Supports all UTF-8 languages. 37 | * } 38 | */ 39 | public function __construct($data = NULL) { 40 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); 41 | parent::__construct($data); 42 | } 43 | 44 | /** 45 | * Optional. The language code of the conversation data within this dataset. 46 | * See https://cloud.google.com/apis/design/standard_fields for more 47 | * information. Supports all UTF-8 languages. 48 | * 49 | * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; 50 | * @return string 51 | */ 52 | public function getLanguageCode() 53 | { 54 | return $this->language_code; 55 | } 56 | 57 | /** 58 | * Optional. The language code of the conversation data within this dataset. 59 | * See https://cloud.google.com/apis/design/standard_fields for more 60 | * information. Supports all UTF-8 languages. 61 | * 62 | * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = OPTIONAL]; 63 | * @param string $var 64 | * @return $this 65 | */ 66 | public function setLanguageCode($var) 67 | { 68 | GPBUtil::checkString($var, True); 69 | $this->language_code = $var; 70 | 71 | return $this; 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/V2/ConversationModel/ModelType.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ConversationModel.ModelType 13 | */ 14 | class ModelType 15 | { 16 | /** 17 | * ModelType unspecified. 18 | * 19 | * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; 20 | */ 21 | const MODEL_TYPE_UNSPECIFIED = 0; 22 | /** 23 | * ModelType smart reply dual encoder model. 24 | * 25 | * Generated from protobuf enum SMART_REPLY_DUAL_ENCODER_MODEL = 2; 26 | */ 27 | const SMART_REPLY_DUAL_ENCODER_MODEL = 2; 28 | /** 29 | * ModelType smart reply bert model. 30 | * 31 | * Generated from protobuf enum SMART_REPLY_BERT_MODEL = 6; 32 | */ 33 | const SMART_REPLY_BERT_MODEL = 6; 34 | 35 | private static $valueToName = [ 36 | self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', 37 | self::SMART_REPLY_DUAL_ENCODER_MODEL => 'SMART_REPLY_DUAL_ENCODER_MODEL', 38 | self::SMART_REPLY_BERT_MODEL => 'SMART_REPLY_BERT_MODEL', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/CreateConversationDatasetOperationMetadata.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.CreateConversationDatasetOperationMetadata 15 | */ 16 | class CreateConversationDatasetOperationMetadata extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * The resource name of the conversation dataset that will be created. Format: 20 | * `projects//locations//conversationDatasets/` 22 | * 23 | * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { 24 | */ 25 | protected $conversation_dataset = ''; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type string $conversation_dataset 34 | * The resource name of the conversation dataset that will be created. Format: 35 | * `projects//locations//conversationDatasets/` 37 | * } 38 | */ 39 | public function __construct($data = NULL) { 40 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); 41 | parent::__construct($data); 42 | } 43 | 44 | /** 45 | * The resource name of the conversation dataset that will be created. Format: 46 | * `projects//locations//conversationDatasets/` 48 | * 49 | * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { 50 | * @return string 51 | */ 52 | public function getConversationDataset() 53 | { 54 | return $this->conversation_dataset; 55 | } 56 | 57 | /** 58 | * The resource name of the conversation dataset that will be created. Format: 59 | * `projects//locations//conversationDatasets/` 61 | * 62 | * Generated from protobuf field string conversation_dataset = 1 [(.google.api.resource_reference) = { 63 | * @param string $var 64 | * @return $this 65 | */ 66 | public function setConversationDataset($var) 67 | { 68 | GPBUtil::checkString($var, True); 69 | $this->conversation_dataset = $var; 70 | 71 | return $this; 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/V2/CreateConversationModelEvaluationOperationMetadata/State.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.CreateConversationModelEvaluationOperationMetadata.State 13 | */ 14 | class State 15 | { 16 | /** 17 | * Operation status not specified. 18 | * 19 | * Generated from protobuf enum STATE_UNSPECIFIED = 0; 20 | */ 21 | const STATE_UNSPECIFIED = 0; 22 | /** 23 | * The operation is being prepared. 24 | * 25 | * Generated from protobuf enum INITIALIZING = 1; 26 | */ 27 | const INITIALIZING = 1; 28 | /** 29 | * The operation is running. 30 | * 31 | * Generated from protobuf enum RUNNING = 2; 32 | */ 33 | const RUNNING = 2; 34 | /** 35 | * The operation is cancelled. 36 | * 37 | * Generated from protobuf enum CANCELLED = 3; 38 | */ 39 | const CANCELLED = 3; 40 | /** 41 | * The operation has succeeded. 42 | * 43 | * Generated from protobuf enum SUCCEEDED = 4; 44 | */ 45 | const SUCCEEDED = 4; 46 | /** 47 | * The operation has failed. 48 | * 49 | * Generated from protobuf enum FAILED = 5; 50 | */ 51 | const FAILED = 5; 52 | 53 | private static $valueToName = [ 54 | self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', 55 | self::INITIALIZING => 'INITIALIZING', 56 | self::RUNNING => 'RUNNING', 57 | self::CANCELLED => 'CANCELLED', 58 | self::SUCCEEDED => 'SUCCEEDED', 59 | self::FAILED => 'FAILED', 60 | ]; 61 | 62 | public static function name($value) 63 | { 64 | if (!isset(self::$valueToName[$value])) { 65 | throw new UnexpectedValueException(sprintf( 66 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 67 | } 68 | return self::$valueToName[$value]; 69 | } 70 | 71 | 72 | public static function value($name) 73 | { 74 | $const = __CLASS__ . '::' . strtoupper($name); 75 | if (!defined($const)) { 76 | throw new UnexpectedValueException(sprintf( 77 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 78 | } 79 | return constant($const); 80 | } 81 | } 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/V2/CreateConversationModelOperationMetadata/State.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.CreateConversationModelOperationMetadata.State 13 | */ 14 | class State 15 | { 16 | /** 17 | * Invalid. 18 | * 19 | * Generated from protobuf enum STATE_UNSPECIFIED = 0; 20 | */ 21 | const STATE_UNSPECIFIED = 0; 22 | /** 23 | * Request is submitted, but training has not started yet. 24 | * The model may remain in this state until there is enough capacity to 25 | * start training. 26 | * 27 | * Generated from protobuf enum PENDING = 1; 28 | */ 29 | const PENDING = 1; 30 | /** 31 | * The training has succeeded. 32 | * 33 | * Generated from protobuf enum SUCCEEDED = 2; 34 | */ 35 | const SUCCEEDED = 2; 36 | /** 37 | * The training has succeeded. 38 | * 39 | * Generated from protobuf enum FAILED = 3; 40 | */ 41 | const FAILED = 3; 42 | /** 43 | * The training has been cancelled. 44 | * 45 | * Generated from protobuf enum CANCELLED = 4; 46 | */ 47 | const CANCELLED = 4; 48 | /** 49 | * The training is in cancelling state. 50 | * 51 | * Generated from protobuf enum CANCELLING = 5; 52 | */ 53 | const CANCELLING = 5; 54 | /** 55 | * Custom model is training. 56 | * 57 | * Generated from protobuf enum TRAINING = 6; 58 | */ 59 | const TRAINING = 6; 60 | 61 | private static $valueToName = [ 62 | self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', 63 | self::PENDING => 'PENDING', 64 | self::SUCCEEDED => 'SUCCEEDED', 65 | self::FAILED => 'FAILED', 66 | self::CANCELLED => 'CANCELLED', 67 | self::CANCELLING => 'CANCELLING', 68 | self::TRAINING => 'TRAINING', 69 | ]; 70 | 71 | public static function name($value) 72 | { 73 | if (!isset(self::$valueToName[$value])) { 74 | throw new UnexpectedValueException(sprintf( 75 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 76 | } 77 | return self::$valueToName[$value]; 78 | } 79 | 80 | 81 | public static function value($name) 82 | { 83 | $const = __CLASS__ . '::' . strtoupper($name); 84 | if (!defined($const)) { 85 | throw new UnexpectedValueException(sprintf( 86 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 87 | } 88 | return constant($const); 89 | } 90 | } 91 | 92 | 93 | -------------------------------------------------------------------------------- /src/V2/DeleteConversationDatasetOperationMetadata.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.DeleteConversationDatasetOperationMetadata 15 | */ 16 | class DeleteConversationDatasetOperationMetadata extends \Google\Protobuf\Internal\Message 17 | { 18 | 19 | /** 20 | * Constructor. 21 | * 22 | * @param array $data { 23 | * Optional. Data for populating the Message object. 24 | * 25 | * } 26 | */ 27 | public function __construct($data = NULL) { 28 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); 29 | parent::__construct($data); 30 | } 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/V2/DeployConversationModelRequest.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.DeployConversationModelRequest 16 | */ 17 | class DeployConversationModelRequest extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * Required. The conversation model to deploy. Format: 21 | * `projects//conversationModels/` 22 | * 23 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; 24 | */ 25 | protected $name = ''; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type string $name 34 | * Required. The conversation model to deploy. Format: 35 | * `projects//conversationModels/` 36 | * } 37 | */ 38 | public function __construct($data = NULL) { 39 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); 40 | parent::__construct($data); 41 | } 42 | 43 | /** 44 | * Required. The conversation model to deploy. Format: 45 | * `projects//conversationModels/` 46 | * 47 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; 48 | * @return string 49 | */ 50 | public function getName() 51 | { 52 | return $this->name; 53 | } 54 | 55 | /** 56 | * Required. The conversation model to deploy. Format: 57 | * `projects//conversationModels/` 58 | * 59 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; 60 | * @param string $var 61 | * @return $this 62 | */ 63 | public function setName($var) 64 | { 65 | GPBUtil::checkString($var, True); 66 | $this->name = $var; 67 | 68 | return $this; 69 | } 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /src/V2/Document/State.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Document.State 13 | */ 14 | class State 15 | { 16 | /** 17 | * The document state is unspecified. 18 | * 19 | * Generated from protobuf enum STATE_UNSPECIFIED = 0; 20 | */ 21 | const STATE_UNSPECIFIED = 0; 22 | /** 23 | * The document creation is in progress. 24 | * 25 | * Generated from protobuf enum CREATING = 1; 26 | */ 27 | const CREATING = 1; 28 | /** 29 | * The document is active and ready to use. 30 | * 31 | * Generated from protobuf enum ACTIVE = 2; 32 | */ 33 | const ACTIVE = 2; 34 | /** 35 | * The document updation is in progress. 36 | * 37 | * Generated from protobuf enum UPDATING = 3; 38 | */ 39 | const UPDATING = 3; 40 | /** 41 | * The document is reloading. 42 | * 43 | * Generated from protobuf enum RELOADING = 4; 44 | */ 45 | const RELOADING = 4; 46 | /** 47 | * The document deletion is in progress. 48 | * 49 | * Generated from protobuf enum DELETING = 5; 50 | */ 51 | const DELETING = 5; 52 | 53 | private static $valueToName = [ 54 | self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', 55 | self::CREATING => 'CREATING', 56 | self::ACTIVE => 'ACTIVE', 57 | self::UPDATING => 'UPDATING', 58 | self::RELOADING => 'RELOADING', 59 | self::DELETING => 'DELETING', 60 | ]; 61 | 62 | public static function name($value) 63 | { 64 | if (!isset(self::$valueToName[$value])) { 65 | throw new UnexpectedValueException(sprintf( 66 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 67 | } 68 | return self::$valueToName[$value]; 69 | } 70 | 71 | 72 | public static function value($name) 73 | { 74 | $const = __CLASS__ . '::' . strtoupper($name); 75 | if (!defined($const)) { 76 | throw new UnexpectedValueException(sprintf( 77 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 78 | } 79 | return constant($const); 80 | } 81 | } 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/V2/DtmfParameters.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.DtmfParameters 15 | */ 16 | class DtmfParameters extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Indicates whether DTMF input can be handled in the next request. 20 | * 21 | * Generated from protobuf field bool accepts_dtmf_input = 1; 22 | */ 23 | protected $accepts_dtmf_input = false; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type bool $accepts_dtmf_input 32 | * Indicates whether DTMF input can be handled in the next request. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Indicates whether DTMF input can be handled in the next request. 42 | * 43 | * Generated from protobuf field bool accepts_dtmf_input = 1; 44 | * @return bool 45 | */ 46 | public function getAcceptsDtmfInput() 47 | { 48 | return $this->accepts_dtmf_input; 49 | } 50 | 51 | /** 52 | * Indicates whether DTMF input can be handled in the next request. 53 | * 54 | * Generated from protobuf field bool accepts_dtmf_input = 1; 55 | * @param bool $var 56 | * @return $this 57 | */ 58 | public function setAcceptsDtmfInput($var) 59 | { 60 | GPBUtil::checkBool($var); 61 | $this->accepts_dtmf_input = $var; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/EntityType/AutoExpansionMode.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.EntityType.AutoExpansionMode 15 | */ 16 | class AutoExpansionMode 17 | { 18 | /** 19 | * Auto expansion disabled for the entity. 20 | * 21 | * Generated from protobuf enum AUTO_EXPANSION_MODE_UNSPECIFIED = 0; 22 | */ 23 | const AUTO_EXPANSION_MODE_UNSPECIFIED = 0; 24 | /** 25 | * Allows an agent to recognize values that have not been explicitly 26 | * listed in the entity. 27 | * 28 | * Generated from protobuf enum AUTO_EXPANSION_MODE_DEFAULT = 1; 29 | */ 30 | const AUTO_EXPANSION_MODE_DEFAULT = 1; 31 | 32 | private static $valueToName = [ 33 | self::AUTO_EXPANSION_MODE_UNSPECIFIED => 'AUTO_EXPANSION_MODE_UNSPECIFIED', 34 | self::AUTO_EXPANSION_MODE_DEFAULT => 'AUTO_EXPANSION_MODE_DEFAULT', 35 | ]; 36 | 37 | public static function name($value) 38 | { 39 | if (!isset(self::$valueToName[$value])) { 40 | throw new UnexpectedValueException(sprintf( 41 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 42 | } 43 | return self::$valueToName[$value]; 44 | } 45 | 46 | 47 | public static function value($name) 48 | { 49 | $const = __CLASS__ . '::' . strtoupper($name); 50 | if (!defined($const)) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 53 | } 54 | return constant($const); 55 | } 56 | } 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/V2/EntityType/Kind.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.EntityType.Kind 13 | */ 14 | class Kind 15 | { 16 | /** 17 | * Not specified. This value should be never used. 18 | * 19 | * Generated from protobuf enum KIND_UNSPECIFIED = 0; 20 | */ 21 | const KIND_UNSPECIFIED = 0; 22 | /** 23 | * Map entity types allow mapping of a group of synonyms to a reference 24 | * value. 25 | * 26 | * Generated from protobuf enum KIND_MAP = 1; 27 | */ 28 | const KIND_MAP = 1; 29 | /** 30 | * List entity types contain a set of entries that do not map to reference 31 | * values. However, list entity types can contain references to other entity 32 | * types (with or without aliases). 33 | * 34 | * Generated from protobuf enum KIND_LIST = 2; 35 | */ 36 | const KIND_LIST = 2; 37 | /** 38 | * Regexp entity types allow to specify regular expressions in entries 39 | * values. 40 | * 41 | * Generated from protobuf enum KIND_REGEXP = 3; 42 | */ 43 | const KIND_REGEXP = 3; 44 | 45 | private static $valueToName = [ 46 | self::KIND_UNSPECIFIED => 'KIND_UNSPECIFIED', 47 | self::KIND_MAP => 'KIND_MAP', 48 | self::KIND_LIST => 'KIND_LIST', 49 | self::KIND_REGEXP => 'KIND_REGEXP', 50 | ]; 51 | 52 | public static function name($value) 53 | { 54 | if (!isset(self::$valueToName[$value])) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 57 | } 58 | return self::$valueToName[$value]; 59 | } 60 | 61 | 62 | public static function value($name) 63 | { 64 | $const = __CLASS__ . '::' . strtoupper($name); 65 | if (!defined($const)) { 66 | throw new UnexpectedValueException(sprintf( 67 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 68 | } 69 | return constant($const); 70 | } 71 | } 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/V2/EntityTypeBatch.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.EntityTypeBatch 15 | */ 16 | class EntityTypeBatch extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * A collection of entity types. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; 22 | */ 23 | private $entity_types; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $entity_types 32 | * A collection of entity types. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\EntityType::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * A collection of entity types. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getEntityTypes() 47 | { 48 | return $this->entity_types; 49 | } 50 | 51 | /** 52 | * A collection of entity types. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.EntityType entity_types = 1; 55 | * @param array<\Google\Cloud\Dialogflow\V2\EntityType>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setEntityTypes($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\EntityType::class); 61 | $this->entity_types = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/Environment/State.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Environment.State 17 | */ 18 | class State 19 | { 20 | /** 21 | * Not specified. This value is not used. 22 | * 23 | * Generated from protobuf enum STATE_UNSPECIFIED = 0; 24 | */ 25 | const STATE_UNSPECIFIED = 0; 26 | /** 27 | * Stopped. 28 | * 29 | * Generated from protobuf enum STOPPED = 1; 30 | */ 31 | const STOPPED = 1; 32 | /** 33 | * Loading. 34 | * 35 | * Generated from protobuf enum LOADING = 2; 36 | */ 37 | const LOADING = 2; 38 | /** 39 | * Running. 40 | * 41 | * Generated from protobuf enum RUNNING = 3; 42 | */ 43 | const RUNNING = 3; 44 | 45 | private static $valueToName = [ 46 | self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', 47 | self::STOPPED => 'STOPPED', 48 | self::LOADING => 'LOADING', 49 | self::RUNNING => 'RUNNING', 50 | ]; 51 | 52 | public static function name($value) 53 | { 54 | if (!isset(self::$valueToName[$value])) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 57 | } 58 | return self::$valueToName[$value]; 59 | } 60 | 61 | 62 | public static function value($name) 63 | { 64 | $const = __CLASS__ . '::' . strtoupper($name); 65 | if (!defined($const)) { 66 | throw new UnexpectedValueException(sprintf( 67 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 68 | } 69 | return constant($const); 70 | } 71 | } 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/V2/ExportOperationMetadata.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ExportOperationMetadata 15 | */ 16 | class ExportOperationMetadata extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Cloud Storage file path of the exported data. 20 | * 21 | * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; 22 | */ 23 | protected $exported_gcs_destination = null; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type \Google\Cloud\Dialogflow\V2\GcsDestination $exported_gcs_destination 32 | * Cloud Storage file path of the exported data. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Cloud Storage file path of the exported data. 42 | * 43 | * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; 44 | * @return \Google\Cloud\Dialogflow\V2\GcsDestination|null 45 | */ 46 | public function getExportedGcsDestination() 47 | { 48 | return $this->exported_gcs_destination; 49 | } 50 | 51 | public function hasExportedGcsDestination() 52 | { 53 | return isset($this->exported_gcs_destination); 54 | } 55 | 56 | public function clearExportedGcsDestination() 57 | { 58 | unset($this->exported_gcs_destination); 59 | } 60 | 61 | /** 62 | * Cloud Storage file path of the exported data. 63 | * 64 | * Generated from protobuf field .google.cloud.dialogflow.v2.GcsDestination exported_gcs_destination = 1; 65 | * @param \Google\Cloud\Dialogflow\V2\GcsDestination $var 66 | * @return $this 67 | */ 68 | public function setExportedGcsDestination($var) 69 | { 70 | GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsDestination::class); 71 | $this->exported_gcs_destination = $var; 72 | 73 | return $this; 74 | } 75 | 76 | } 77 | 78 | -------------------------------------------------------------------------------- /src/V2/FreeFormContext.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.FreeFormContext 15 | */ 16 | class FreeFormContext extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Optional. Free form text input to LLM. 20 | * 21 | * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; 22 | */ 23 | protected $text = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $text 32 | * Optional. Free form text input to LLM. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Optional. Free form text input to LLM. 42 | * 43 | * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; 44 | * @return string 45 | */ 46 | public function getText() 47 | { 48 | return $this->text; 49 | } 50 | 51 | /** 52 | * Optional. Free form text input to LLM. 53 | * 54 | * Generated from protobuf field string text = 1 [(.google.api.field_behavior) = OPTIONAL]; 55 | * @param string $var 56 | * @return $this 57 | */ 58 | public function setText($var) 59 | { 60 | GPBUtil::checkString($var, True); 61 | $this->text = $var; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/FreeFormSuggestion.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.FreeFormSuggestion 15 | */ 16 | class FreeFormSuggestion extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. Free form suggestion. 20 | * 21 | * Generated from protobuf field string response = 1 [(.google.api.field_behavior) = REQUIRED]; 22 | */ 23 | protected $response = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $response 32 | * Required. Free form suggestion. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Required. Free form suggestion. 42 | * 43 | * Generated from protobuf field string response = 1 [(.google.api.field_behavior) = REQUIRED]; 44 | * @return string 45 | */ 46 | public function getResponse() 47 | { 48 | return $this->response; 49 | } 50 | 51 | /** 52 | * Required. Free form suggestion. 53 | * 54 | * Generated from protobuf field string response = 1 [(.google.api.field_behavior) = REQUIRED]; 55 | * @param string $var 56 | * @return $this 57 | */ 58 | public function setResponse($var) 59 | { 60 | GPBUtil::checkString($var, True); 61 | $this->response = $var; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/Fulfillment/Feature.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Fulfillment.Feature 15 | */ 16 | class Feature extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * The type of the feature that enabled for fulfillment. 20 | * 21 | * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; 22 | */ 23 | protected $type = 0; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type int $type 32 | * The type of the feature that enabled for fulfillment. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Fulfillment::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * The type of the feature that enabled for fulfillment. 42 | * 43 | * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; 44 | * @return int 45 | */ 46 | public function getType() 47 | { 48 | return $this->type; 49 | } 50 | 51 | /** 52 | * The type of the feature that enabled for fulfillment. 53 | * 54 | * Generated from protobuf field .google.cloud.dialogflow.v2.Fulfillment.Feature.Type type = 1; 55 | * @param int $var 56 | * @return $this 57 | */ 58 | public function setType($var) 59 | { 60 | GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Fulfillment\Feature\Type::class); 61 | $this->type = $var; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/Fulfillment/Feature/Type.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Fulfillment.Feature.Type 13 | */ 14 | class Type 15 | { 16 | /** 17 | * Feature type not specified. 18 | * 19 | * Generated from protobuf enum TYPE_UNSPECIFIED = 0; 20 | */ 21 | const TYPE_UNSPECIFIED = 0; 22 | /** 23 | * Fulfillment is enabled for SmallTalk. 24 | * 25 | * Generated from protobuf enum SMALLTALK = 1; 26 | */ 27 | const SMALLTALK = 1; 28 | 29 | private static $valueToName = [ 30 | self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', 31 | self::SMALLTALK => 'SMALLTALK', 32 | ]; 33 | 34 | public static function name($value) 35 | { 36 | if (!isset(self::$valueToName[$value])) { 37 | throw new UnexpectedValueException(sprintf( 38 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 39 | } 40 | return self::$valueToName[$value]; 41 | } 42 | 43 | 44 | public static function value($name) 45 | { 46 | $const = __CLASS__ . '::' . strtoupper($name); 47 | if (!defined($const)) { 48 | throw new UnexpectedValueException(sprintf( 49 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 50 | } 51 | return constant($const); 52 | } 53 | } 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/V2/GcsDestination.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.GcsDestination 15 | */ 16 | class GcsDestination extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * The Google Cloud Storage URIs for the output. A URI is of the 20 | * form: 21 | * `gs://bucket/object-prefix-or-name` 22 | * Whether a prefix or name is used depends on the use case. The requesting 23 | * user must have "write-permission" to the bucket. 24 | * 25 | * Generated from protobuf field string uri = 1; 26 | */ 27 | protected $uri = ''; 28 | 29 | /** 30 | * Constructor. 31 | * 32 | * @param array $data { 33 | * Optional. Data for populating the Message object. 34 | * 35 | * @type string $uri 36 | * The Google Cloud Storage URIs for the output. A URI is of the 37 | * form: 38 | * `gs://bucket/object-prefix-or-name` 39 | * Whether a prefix or name is used depends on the use case. The requesting 40 | * user must have "write-permission" to the bucket. 41 | * } 42 | */ 43 | public function __construct($data = NULL) { 44 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Gcs::initOnce(); 45 | parent::__construct($data); 46 | } 47 | 48 | /** 49 | * The Google Cloud Storage URIs for the output. A URI is of the 50 | * form: 51 | * `gs://bucket/object-prefix-or-name` 52 | * Whether a prefix or name is used depends on the use case. The requesting 53 | * user must have "write-permission" to the bucket. 54 | * 55 | * Generated from protobuf field string uri = 1; 56 | * @return string 57 | */ 58 | public function getUri() 59 | { 60 | return $this->uri; 61 | } 62 | 63 | /** 64 | * The Google Cloud Storage URIs for the output. A URI is of the 65 | * form: 66 | * `gs://bucket/object-prefix-or-name` 67 | * Whether a prefix or name is used depends on the use case. The requesting 68 | * user must have "write-permission" to the bucket. 69 | * 70 | * Generated from protobuf field string uri = 1; 71 | * @param string $var 72 | * @return $this 73 | */ 74 | public function setUri($var) 75 | { 76 | GPBUtil::checkString($var, True); 77 | $this->uri = $var; 78 | 79 | return $this; 80 | } 81 | 82 | } 83 | 84 | -------------------------------------------------------------------------------- /src/V2/GcsSources.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.GcsSources 15 | */ 16 | class GcsSources extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: 20 | * `gs://bucket/object-prefix-or-name` 21 | * Whether a prefix or name is used depends on the use case. 22 | * 23 | * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; 24 | */ 25 | private $uris; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type array|\Google\Protobuf\Internal\RepeatedField $uris 34 | * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: 35 | * `gs://bucket/object-prefix-or-name` 36 | * Whether a prefix or name is used depends on the use case. 37 | * } 38 | */ 39 | public function __construct($data = NULL) { 40 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Gcs::initOnce(); 41 | parent::__construct($data); 42 | } 43 | 44 | /** 45 | * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: 46 | * `gs://bucket/object-prefix-or-name` 47 | * Whether a prefix or name is used depends on the use case. 48 | * 49 | * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; 50 | * @return \Google\Protobuf\Internal\RepeatedField 51 | */ 52 | public function getUris() 53 | { 54 | return $this->uris; 55 | } 56 | 57 | /** 58 | * Required. Google Cloud Storage URIs for the inputs. A URI is of the form: 59 | * `gs://bucket/object-prefix-or-name` 60 | * Whether a prefix or name is used depends on the use case. 61 | * 62 | * Generated from protobuf field repeated string uris = 2 [(.google.api.field_behavior) = REQUIRED]; 63 | * @param array|\Google\Protobuf\Internal\RepeatedField $var 64 | * @return $this 65 | */ 66 | public function setUris($var) 67 | { 68 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); 69 | $this->uris = $arr; 70 | 71 | return $this; 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/V2/GenerateStatelessSuggestionResponse.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.GenerateStatelessSuggestionResponse 16 | */ 17 | class GenerateStatelessSuggestionResponse extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * Required. Generated suggestion for a conversation. 21 | * 22 | * Generated from protobuf field .google.cloud.dialogflow.v2.GeneratorSuggestion generator_suggestion = 1 [(.google.api.field_behavior) = REQUIRED]; 23 | */ 24 | protected $generator_suggestion = null; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type \Google\Cloud\Dialogflow\V2\GeneratorSuggestion $generator_suggestion 33 | * Required. Generated suggestion for a conversation. 34 | * } 35 | */ 36 | public function __construct($data = NULL) { 37 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); 38 | parent::__construct($data); 39 | } 40 | 41 | /** 42 | * Required. Generated suggestion for a conversation. 43 | * 44 | * Generated from protobuf field .google.cloud.dialogflow.v2.GeneratorSuggestion generator_suggestion = 1 [(.google.api.field_behavior) = REQUIRED]; 45 | * @return \Google\Cloud\Dialogflow\V2\GeneratorSuggestion|null 46 | */ 47 | public function getGeneratorSuggestion() 48 | { 49 | return $this->generator_suggestion; 50 | } 51 | 52 | public function hasGeneratorSuggestion() 53 | { 54 | return isset($this->generator_suggestion); 55 | } 56 | 57 | public function clearGeneratorSuggestion() 58 | { 59 | unset($this->generator_suggestion); 60 | } 61 | 62 | /** 63 | * Required. Generated suggestion for a conversation. 64 | * 65 | * Generated from protobuf field .google.cloud.dialogflow.v2.GeneratorSuggestion generator_suggestion = 1 [(.google.api.field_behavior) = REQUIRED]; 66 | * @param \Google\Cloud\Dialogflow\V2\GeneratorSuggestion $var 67 | * @return $this 68 | */ 69 | public function setGeneratorSuggestion($var) 70 | { 71 | GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GeneratorSuggestion::class); 72 | $this->generator_suggestion = $var; 73 | 74 | return $this; 75 | } 76 | 77 | } 78 | 79 | -------------------------------------------------------------------------------- /src/V2/GetEncryptionSpecRequest.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.GetEncryptionSpecRequest 15 | */ 16 | class GetEncryptionSpecRequest extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. The name of the encryption spec resource to get. 20 | * 21 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { 22 | */ 23 | protected $name = ''; 24 | 25 | /** 26 | * @param string $name Required. The name of the encryption spec resource to get. Please see 27 | * {@see EncryptionSpecServiceClient::encryptionSpecName()} for help formatting this field. 28 | * 29 | * @return \Google\Cloud\Dialogflow\V2\GetEncryptionSpecRequest 30 | * 31 | * @experimental 32 | */ 33 | public static function build(string $name): self 34 | { 35 | return (new self()) 36 | ->setName($name); 37 | } 38 | 39 | /** 40 | * Constructor. 41 | * 42 | * @param array $data { 43 | * Optional. Data for populating the Message object. 44 | * 45 | * @type string $name 46 | * Required. The name of the encryption spec resource to get. 47 | * } 48 | */ 49 | public function __construct($data = NULL) { 50 | \GPBMetadata\Google\Cloud\Dialogflow\V2\EncryptionSpec::initOnce(); 51 | parent::__construct($data); 52 | } 53 | 54 | /** 55 | * Required. The name of the encryption spec resource to get. 56 | * 57 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { 58 | * @return string 59 | */ 60 | public function getName() 61 | { 62 | return $this->name; 63 | } 64 | 65 | /** 66 | * Required. The name of the encryption spec resource to get. 67 | * 68 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { 69 | * @param string $var 70 | * @return $this 71 | */ 72 | public function setName($var) 73 | { 74 | GPBUtil::checkString($var, True); 75 | $this->name = $var; 76 | 77 | return $this; 78 | } 79 | 80 | } 81 | 82 | -------------------------------------------------------------------------------- /src/V2/HumanAgentAssistantConfig/ConversationProcessConfig.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.HumanAgentAssistantConfig.ConversationProcessConfig 15 | */ 16 | class ConversationProcessConfig extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Number of recent non-small-talk sentences to use as context for article 20 | * and FAQ suggestion 21 | * 22 | * Generated from protobuf field int32 recent_sentences_count = 2; 23 | */ 24 | protected $recent_sentences_count = 0; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type int $recent_sentences_count 33 | * Number of recent non-small-talk sentences to use as context for article 34 | * and FAQ suggestion 35 | * } 36 | */ 37 | public function __construct($data = NULL) { 38 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); 39 | parent::__construct($data); 40 | } 41 | 42 | /** 43 | * Number of recent non-small-talk sentences to use as context for article 44 | * and FAQ suggestion 45 | * 46 | * Generated from protobuf field int32 recent_sentences_count = 2; 47 | * @return int 48 | */ 49 | public function getRecentSentencesCount() 50 | { 51 | return $this->recent_sentences_count; 52 | } 53 | 54 | /** 55 | * Number of recent non-small-talk sentences to use as context for article 56 | * and FAQ suggestion 57 | * 58 | * Generated from protobuf field int32 recent_sentences_count = 2; 59 | * @param int $var 60 | * @return $this 61 | */ 62 | public function setRecentSentencesCount($var) 63 | { 64 | GPBUtil::checkInt32($var); 65 | $this->recent_sentences_count = $var; 66 | 67 | return $this; 68 | } 69 | 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/V2/HumanAgentHandoffConfig/LivePersonConfig.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig 15 | */ 16 | class LivePersonConfig extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. Account number of the LivePerson account to connect. This is 20 | * the account number you input at the login page. 21 | * 22 | * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; 23 | */ 24 | protected $account_number = ''; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type string $account_number 33 | * Required. Account number of the LivePerson account to connect. This is 34 | * the account number you input at the login page. 35 | * } 36 | */ 37 | public function __construct($data = NULL) { 38 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); 39 | parent::__construct($data); 40 | } 41 | 42 | /** 43 | * Required. Account number of the LivePerson account to connect. This is 44 | * the account number you input at the login page. 45 | * 46 | * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; 47 | * @return string 48 | */ 49 | public function getAccountNumber() 50 | { 51 | return $this->account_number; 52 | } 53 | 54 | /** 55 | * Required. Account number of the LivePerson account to connect. This is 56 | * the account number you input at the login page. 57 | * 58 | * Generated from protobuf field string account_number = 1 [(.google.api.field_behavior) = REQUIRED]; 59 | * @param string $var 60 | * @return $this 61 | */ 62 | public function setAccountNumber($var) 63 | { 64 | GPBUtil::checkString($var, True); 65 | $this->account_number = $var; 66 | 67 | return $this; 68 | } 69 | 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/V2/ImportDocumentsResponse.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ImportDocumentsResponse 16 | */ 17 | class ImportDocumentsResponse extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * Includes details about skipped documents or any other warnings. 21 | * 22 | * Generated from protobuf field repeated .google.rpc.Status warnings = 1; 23 | */ 24 | private $warnings; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $warnings 33 | * Includes details about skipped documents or any other warnings. 34 | * } 35 | */ 36 | public function __construct($data = NULL) { 37 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Document::initOnce(); 38 | parent::__construct($data); 39 | } 40 | 41 | /** 42 | * Includes details about skipped documents or any other warnings. 43 | * 44 | * Generated from protobuf field repeated .google.rpc.Status warnings = 1; 45 | * @return \Google\Protobuf\Internal\RepeatedField 46 | */ 47 | public function getWarnings() 48 | { 49 | return $this->warnings; 50 | } 51 | 52 | /** 53 | * Includes details about skipped documents or any other warnings. 54 | * 55 | * Generated from protobuf field repeated .google.rpc.Status warnings = 1; 56 | * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var 57 | * @return $this 58 | */ 59 | public function setWarnings($var) 60 | { 61 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); 62 | $this->warnings = $arr; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /src/V2/IngestContextReferencesResponse.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.IngestContextReferencesResponse 15 | */ 16 | class IngestContextReferencesResponse extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * All context references ingested. 20 | * 21 | * Generated from protobuf field map ingested_context_references = 1; 22 | */ 23 | private $ingested_context_references; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array|\Google\Protobuf\Internal\MapField $ingested_context_references 32 | * All context references ingested. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Conversation::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * All context references ingested. 42 | * 43 | * Generated from protobuf field map ingested_context_references = 1; 44 | * @return \Google\Protobuf\Internal\MapField 45 | */ 46 | public function getIngestedContextReferences() 47 | { 48 | return $this->ingested_context_references; 49 | } 50 | 51 | /** 52 | * All context references ingested. 53 | * 54 | * Generated from protobuf field map ingested_context_references = 1; 55 | * @param array|\Google\Protobuf\Internal\MapField $var 56 | * @return $this 57 | */ 58 | public function setIngestedContextReferences($var) 59 | { 60 | $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Conversation\ContextReference::class); 61 | $this->ingested_context_references = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/InitializeEncryptionSpecMetadata.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.InitializeEncryptionSpecMetadata 15 | */ 16 | class InitializeEncryptionSpecMetadata extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Output only. The original request for initialization. 20 | * 21 | * Generated from protobuf field .google.cloud.dialogflow.v2.InitializeEncryptionSpecRequest request = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 22 | */ 23 | protected $request = null; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type \Google\Cloud\Dialogflow\V2\InitializeEncryptionSpecRequest $request 32 | * Output only. The original request for initialization. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\EncryptionSpec::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Output only. The original request for initialization. 42 | * 43 | * Generated from protobuf field .google.cloud.dialogflow.v2.InitializeEncryptionSpecRequest request = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 44 | * @return \Google\Cloud\Dialogflow\V2\InitializeEncryptionSpecRequest|null 45 | */ 46 | public function getRequest() 47 | { 48 | return $this->request; 49 | } 50 | 51 | public function hasRequest() 52 | { 53 | return isset($this->request); 54 | } 55 | 56 | public function clearRequest() 57 | { 58 | unset($this->request); 59 | } 60 | 61 | /** 62 | * Output only. The original request for initialization. 63 | * 64 | * Generated from protobuf field .google.cloud.dialogflow.v2.InitializeEncryptionSpecRequest request = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; 65 | * @param \Google\Cloud\Dialogflow\V2\InitializeEncryptionSpecRequest $var 66 | * @return $this 67 | */ 68 | public function setRequest($var) 69 | { 70 | GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\InitializeEncryptionSpecRequest::class); 71 | $this->request = $var; 72 | 73 | return $this; 74 | } 75 | 76 | } 77 | 78 | -------------------------------------------------------------------------------- /src/V2/InitializeEncryptionSpecResponse.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.InitializeEncryptionSpecResponse 15 | */ 16 | class InitializeEncryptionSpecResponse extends \Google\Protobuf\Internal\Message 17 | { 18 | 19 | /** 20 | * Constructor. 21 | * 22 | * @param array $data { 23 | * Optional. Data for populating the Message object. 24 | * 25 | * } 26 | */ 27 | public function __construct($data = NULL) { 28 | \GPBMetadata\Google\Cloud\Dialogflow\V2\EncryptionSpec::initOnce(); 29 | parent::__construct($data); 30 | } 31 | 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/V2/InputConfig.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.InputConfig 16 | */ 17 | class InputConfig extends \Google\Protobuf\Internal\Message 18 | { 19 | protected $source; 20 | 21 | /** 22 | * Constructor. 23 | * 24 | * @param array $data { 25 | * Optional. Data for populating the Message object. 26 | * 27 | * @type \Google\Cloud\Dialogflow\V2\GcsSources $gcs_source 28 | * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all 30 | * matched JSON files, which will be read as one conversation per file. 31 | * } 32 | */ 33 | public function __construct($data = NULL) { 34 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationDataset::initOnce(); 35 | parent::__construct($data); 36 | } 37 | 38 | /** 39 | * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all 41 | * matched JSON files, which will be read as one conversation per file. 42 | * 43 | * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 1; 44 | * @return \Google\Cloud\Dialogflow\V2\GcsSources|null 45 | */ 46 | public function getGcsSource() 47 | { 48 | return $this->readOneof(1); 49 | } 50 | 51 | public function hasGcsSource() 52 | { 53 | return $this->hasOneof(1); 54 | } 55 | 56 | /** 57 | * The Cloud Storage URI has the form gs:////agent*.json. Wildcards are allowed and will be expanded into all 59 | * matched JSON files, which will be read as one conversation per file. 60 | * 61 | * Generated from protobuf field .google.cloud.dialogflow.v2.GcsSources gcs_source = 1; 62 | * @param \Google\Cloud\Dialogflow\V2\GcsSources $var 63 | * @return $this 64 | */ 65 | public function setGcsSource($var) 66 | { 67 | GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\GcsSources::class); 68 | $this->writeOneof(1, $var); 69 | 70 | return $this; 71 | } 72 | 73 | /** 74 | * @return string 75 | */ 76 | public function getSource() 77 | { 78 | return $this->whichOneof("source"); 79 | } 80 | 81 | } 82 | 83 | -------------------------------------------------------------------------------- /src/V2/InputDataset.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.InputDataset 16 | */ 17 | class InputDataset extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * Required. ConversationDataset resource name. Format: 21 | * `projects//locations//conversationDatasets/` 23 | * 24 | * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { 25 | */ 26 | protected $dataset = ''; 27 | 28 | /** 29 | * Constructor. 30 | * 31 | * @param array $data { 32 | * Optional. Data for populating the Message object. 33 | * 34 | * @type string $dataset 35 | * Required. ConversationDataset resource name. Format: 36 | * `projects//locations//conversationDatasets/` 38 | * } 39 | */ 40 | public function __construct($data = NULL) { 41 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); 42 | parent::__construct($data); 43 | } 44 | 45 | /** 46 | * Required. ConversationDataset resource name. Format: 47 | * `projects//locations//conversationDatasets/` 49 | * 50 | * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { 51 | * @return string 52 | */ 53 | public function getDataset() 54 | { 55 | return $this->dataset; 56 | } 57 | 58 | /** 59 | * Required. ConversationDataset resource name. Format: 60 | * `projects//locations//conversationDatasets/` 62 | * 63 | * Generated from protobuf field string dataset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { 64 | * @param string $var 65 | * @return $this 66 | */ 67 | public function setDataset($var) 68 | { 69 | GPBUtil::checkString($var, True); 70 | $this->dataset = $var; 71 | 72 | return $this; 73 | } 74 | 75 | } 76 | 77 | -------------------------------------------------------------------------------- /src/V2/InputTextConfig.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.InputTextConfig 15 | */ 16 | class InputTextConfig extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. The language of this conversational query. See [Language 20 | * Support](https://cloud.google.com/dialogflow/docs/reference/language) 21 | * for a list of the currently supported language codes. 22 | * 23 | * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; 24 | */ 25 | protected $language_code = ''; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type string $language_code 34 | * Required. The language of this conversational query. See [Language 35 | * Support](https://cloud.google.com/dialogflow/docs/reference/language) 36 | * for a list of the currently supported language codes. 37 | * } 38 | */ 39 | public function __construct($data = NULL) { 40 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); 41 | parent::__construct($data); 42 | } 43 | 44 | /** 45 | * Required. The language of this conversational query. See [Language 46 | * Support](https://cloud.google.com/dialogflow/docs/reference/language) 47 | * for a list of the currently supported language codes. 48 | * 49 | * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; 50 | * @return string 51 | */ 52 | public function getLanguageCode() 53 | { 54 | return $this->language_code; 55 | } 56 | 57 | /** 58 | * Required. The language of this conversational query. See [Language 59 | * Support](https://cloud.google.com/dialogflow/docs/reference/language) 60 | * for a list of the currently supported language codes. 61 | * 62 | * Generated from protobuf field string language_code = 1 [(.google.api.field_behavior) = REQUIRED]; 63 | * @param string $var 64 | * @return $this 65 | */ 66 | public function setLanguageCode($var) 67 | { 68 | GPBUtil::checkString($var, True); 69 | $this->language_code = $var; 70 | 71 | return $this; 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/BasicCard/Button/OpenUriAction.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction 15 | */ 16 | class OpenUriAction extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. The HTTP or HTTPS scheme URI. 20 | * 21 | * Generated from protobuf field string uri = 1; 22 | */ 23 | protected $uri = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $uri 32 | * Required. The HTTP or HTTPS scheme URI. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Required. The HTTP or HTTPS scheme URI. 42 | * 43 | * Generated from protobuf field string uri = 1; 44 | * @return string 45 | */ 46 | public function getUri() 47 | { 48 | return $this->uri; 49 | } 50 | 51 | /** 52 | * Required. The HTTP or HTTPS scheme URI. 53 | * 54 | * Generated from protobuf field string uri = 1; 55 | * @param string $var 56 | * @return $this 57 | */ 58 | public function setUri($var) 59 | { 60 | GPBUtil::checkString($var, True); 61 | $this->uri = $var; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/BrowseCarouselCard/BrowseCarouselCardItem/OpenUrlAction/UrlTypeHint.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint 13 | */ 14 | class UrlTypeHint 15 | { 16 | /** 17 | * Unspecified 18 | * 19 | * Generated from protobuf enum URL_TYPE_HINT_UNSPECIFIED = 0; 20 | */ 21 | const URL_TYPE_HINT_UNSPECIFIED = 0; 22 | /** 23 | * Url would be an amp action 24 | * 25 | * Generated from protobuf enum AMP_ACTION = 1; 26 | */ 27 | const AMP_ACTION = 1; 28 | /** 29 | * URL that points directly to AMP content, or to a canonical URL 30 | * which refers to AMP content via . 31 | * 32 | * Generated from protobuf enum AMP_CONTENT = 2; 33 | */ 34 | const AMP_CONTENT = 2; 35 | 36 | private static $valueToName = [ 37 | self::URL_TYPE_HINT_UNSPECIFIED => 'URL_TYPE_HINT_UNSPECIFIED', 38 | self::AMP_ACTION => 'AMP_ACTION', 39 | self::AMP_CONTENT => 'AMP_CONTENT', 40 | ]; 41 | 42 | public static function name($value) 43 | { 44 | if (!isset(self::$valueToName[$value])) { 45 | throw new UnexpectedValueException(sprintf( 46 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 47 | } 48 | return self::$valueToName[$value]; 49 | } 50 | 51 | 52 | public static function value($name) 53 | { 54 | $const = __CLASS__ . '::' . strtoupper($name); 55 | if (!defined($const)) { 56 | throw new UnexpectedValueException(sprintf( 57 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 58 | } 59 | return constant($const); 60 | } 61 | } 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/CarouselSelect.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.CarouselSelect 15 | */ 16 | class CarouselSelect extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. Carousel items. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; 22 | */ 23 | private $items; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item>|\Google\Protobuf\Internal\RepeatedField $items 32 | * Required. Carousel items. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Required. Carousel items. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getItems() 47 | { 48 | return $this->items; 49 | } 50 | 51 | /** 52 | * Required. Carousel items. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED]; 55 | * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setItems($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\CarouselSelect\Item::class); 61 | $this->items = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/ColumnProperties/HorizontalAlignment.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment 13 | */ 14 | class HorizontalAlignment 15 | { 16 | /** 17 | * Text is aligned to the leading edge of the column. 18 | * 19 | * Generated from protobuf enum HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; 20 | */ 21 | const HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; 22 | /** 23 | * Text is aligned to the leading edge of the column. 24 | * 25 | * Generated from protobuf enum LEADING = 1; 26 | */ 27 | const LEADING = 1; 28 | /** 29 | * Text is centered in the column. 30 | * 31 | * Generated from protobuf enum CENTER = 2; 32 | */ 33 | const CENTER = 2; 34 | /** 35 | * Text is aligned to the trailing edge of the column. 36 | * 37 | * Generated from protobuf enum TRAILING = 3; 38 | */ 39 | const TRAILING = 3; 40 | 41 | private static $valueToName = [ 42 | self::HORIZONTAL_ALIGNMENT_UNSPECIFIED => 'HORIZONTAL_ALIGNMENT_UNSPECIFIED', 43 | self::LEADING => 'LEADING', 44 | self::CENTER => 'CENTER', 45 | self::TRAILING => 'TRAILING', 46 | ]; 47 | 48 | public static function name($value) 49 | { 50 | if (!isset(self::$valueToName[$value])) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 53 | } 54 | return self::$valueToName[$value]; 55 | } 56 | 57 | 58 | public static function value($name) 59 | { 60 | $const = __CLASS__ . '::' . strtoupper($name); 61 | if (!defined($const)) { 62 | throw new UnexpectedValueException(sprintf( 63 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 64 | } 65 | return constant($const); 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/MediaContent/ResponseMediaType.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType 13 | */ 14 | class ResponseMediaType 15 | { 16 | /** 17 | * Unspecified. 18 | * 19 | * Generated from protobuf enum RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; 20 | */ 21 | const RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0; 22 | /** 23 | * Response media type is audio. 24 | * 25 | * Generated from protobuf enum AUDIO = 1; 26 | */ 27 | const AUDIO = 1; 28 | 29 | private static $valueToName = [ 30 | self::RESPONSE_MEDIA_TYPE_UNSPECIFIED => 'RESPONSE_MEDIA_TYPE_UNSPECIFIED', 31 | self::AUDIO => 'AUDIO', 32 | ]; 33 | 34 | public static function name($value) 35 | { 36 | if (!isset(self::$valueToName[$value])) { 37 | throw new UnexpectedValueException(sprintf( 38 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 39 | } 40 | return self::$valueToName[$value]; 41 | } 42 | 43 | 44 | public static function value($name) 45 | { 46 | $const = __CLASS__ . '::' . strtoupper($name); 47 | if (!defined($const)) { 48 | throw new UnexpectedValueException(sprintf( 49 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 50 | } 51 | return constant($const); 52 | } 53 | } 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/SimpleResponses.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.SimpleResponses 18 | */ 19 | class SimpleResponses extends \Google\Protobuf\Internal\Message 20 | { 21 | /** 22 | * Required. The list of simple responses. 23 | * 24 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; 25 | */ 26 | private $simple_responses; 27 | 28 | /** 29 | * Constructor. 30 | * 31 | * @param array $data { 32 | * Optional. Data for populating the Message object. 33 | * 34 | * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse>|\Google\Protobuf\Internal\RepeatedField $simple_responses 35 | * Required. The list of simple responses. 36 | * } 37 | */ 38 | public function __construct($data = NULL) { 39 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 40 | parent::__construct($data); 41 | } 42 | 43 | /** 44 | * Required. The list of simple responses. 45 | * 46 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; 47 | * @return \Google\Protobuf\Internal\RepeatedField 48 | */ 49 | public function getSimpleResponses() 50 | { 51 | return $this->simple_responses; 52 | } 53 | 54 | /** 55 | * Required. The list of simple responses. 56 | * 57 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED]; 58 | * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse>|\Google\Protobuf\Internal\RepeatedField $var 59 | * @return $this 60 | */ 61 | public function setSimpleResponses($var) 62 | { 63 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\SimpleResponse::class); 64 | $this->simple_responses = $arr; 65 | 66 | return $this; 67 | } 68 | 69 | } 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/Suggestion.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.Suggestion 16 | */ 17 | class Suggestion extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * Required. The text shown the in the suggestion chip. 21 | * 22 | * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; 23 | */ 24 | protected $title = ''; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type string $title 33 | * Required. The text shown the in the suggestion chip. 34 | * } 35 | */ 36 | public function __construct($data = NULL) { 37 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 38 | parent::__construct($data); 39 | } 40 | 41 | /** 42 | * Required. The text shown the in the suggestion chip. 43 | * 44 | * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; 45 | * @return string 46 | */ 47 | public function getTitle() 48 | { 49 | return $this->title; 50 | } 51 | 52 | /** 53 | * Required. The text shown the in the suggestion chip. 54 | * 55 | * Generated from protobuf field string title = 1 [(.google.api.field_behavior) = REQUIRED]; 56 | * @param string $var 57 | * @return $this 58 | */ 59 | public function setTitle($var) 60 | { 61 | GPBUtil::checkString($var, True); 62 | $this->title = $var; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/Suggestions.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.Suggestions 15 | */ 16 | class Suggestions extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. The list of suggested replies. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; 22 | */ 23 | private $suggestions; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion>|\Google\Protobuf\Internal\RepeatedField $suggestions 32 | * Required. The list of suggested replies. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Required. The list of suggested replies. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getSuggestions() 47 | { 48 | return $this->suggestions; 49 | } 50 | 51 | /** 52 | * Required. The list of suggested replies. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED]; 55 | * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setSuggestions($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\Suggestion::class); 61 | $this->suggestions = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/TableCardCell.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.TableCardCell 16 | */ 17 | class TableCardCell extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * Required. Text in this cell. 21 | * 22 | * Generated from protobuf field string text = 1; 23 | */ 24 | protected $text = ''; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type string $text 33 | * Required. Text in this cell. 34 | * } 35 | */ 36 | public function __construct($data = NULL) { 37 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 38 | parent::__construct($data); 39 | } 40 | 41 | /** 42 | * Required. Text in this cell. 43 | * 44 | * Generated from protobuf field string text = 1; 45 | * @return string 46 | */ 47 | public function getText() 48 | { 49 | return $this->text; 50 | } 51 | 52 | /** 53 | * Required. Text in this cell. 54 | * 55 | * Generated from protobuf field string text = 1; 56 | * @param string $var 57 | * @return $this 58 | */ 59 | public function setText($var) 60 | { 61 | GPBUtil::checkString($var, True); 62 | $this->text = $var; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/Intent/Message/Text.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.Message.Text 15 | */ 16 | class Text extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Optional. The collection of the agent's responses. 20 | * 21 | * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; 22 | */ 23 | private $text; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array|\Google\Protobuf\Internal\RepeatedField $text 32 | * Optional. The collection of the agent's responses. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Optional. The collection of the agent's responses. 42 | * 43 | * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getText() 47 | { 48 | return $this->text; 49 | } 50 | 51 | /** 52 | * Optional. The collection of the agent's responses. 53 | * 54 | * Generated from protobuf field repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL]; 55 | * @param array|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setText($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); 61 | $this->text = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/Intent/TrainingPhrase/Type.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type 13 | */ 14 | class Type 15 | { 16 | /** 17 | * Not specified. This value should never be used. 18 | * 19 | * Generated from protobuf enum TYPE_UNSPECIFIED = 0; 20 | */ 21 | const TYPE_UNSPECIFIED = 0; 22 | /** 23 | * Examples do not contain @-prefixed entity type names, but example parts 24 | * can be annotated with entity types. 25 | * 26 | * Generated from protobuf enum EXAMPLE = 1; 27 | */ 28 | const EXAMPLE = 1; 29 | /** 30 | * Templates are not annotated with entity types, but they can contain 31 | * @-prefixed entity type names as substrings. 32 | * Template mode has been deprecated. Example mode is the only supported 33 | * way to create new training phrases. If you have existing training 34 | * phrases that you've created in template mode, those will continue to 35 | * work. 36 | * 37 | * Generated from protobuf enum TEMPLATE = 2 [deprecated = true]; 38 | */ 39 | const TEMPLATE = 2; 40 | 41 | private static $valueToName = [ 42 | self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', 43 | self::EXAMPLE => 'EXAMPLE', 44 | self::TEMPLATE => 'TEMPLATE', 45 | ]; 46 | 47 | public static function name($value) 48 | { 49 | if (!isset(self::$valueToName[$value])) { 50 | throw new UnexpectedValueException(sprintf( 51 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 52 | } 53 | return self::$valueToName[$value]; 54 | } 55 | 56 | 57 | public static function value($name) 58 | { 59 | $const = __CLASS__ . '::' . strtoupper($name); 60 | if (!defined($const)) { 61 | throw new UnexpectedValueException(sprintf( 62 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 63 | } 64 | return constant($const); 65 | } 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/Intent/WebhookState.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Intent.WebhookState 13 | */ 14 | class WebhookState 15 | { 16 | /** 17 | * Webhook is disabled in the agent and in the intent. 18 | * 19 | * Generated from protobuf enum WEBHOOK_STATE_UNSPECIFIED = 0; 20 | */ 21 | const WEBHOOK_STATE_UNSPECIFIED = 0; 22 | /** 23 | * Webhook is enabled in the agent and in the intent. 24 | * 25 | * Generated from protobuf enum WEBHOOK_STATE_ENABLED = 1; 26 | */ 27 | const WEBHOOK_STATE_ENABLED = 1; 28 | /** 29 | * Webhook is enabled in the agent and in the intent. Also, each slot 30 | * filling prompt is forwarded to the webhook. 31 | * 32 | * Generated from protobuf enum WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; 33 | */ 34 | const WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; 35 | 36 | private static $valueToName = [ 37 | self::WEBHOOK_STATE_UNSPECIFIED => 'WEBHOOK_STATE_UNSPECIFIED', 38 | self::WEBHOOK_STATE_ENABLED => 'WEBHOOK_STATE_ENABLED', 39 | self::WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING => 'WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING', 40 | ]; 41 | 42 | public static function name($value) 43 | { 44 | if (!isset(self::$valueToName[$value])) { 45 | throw new UnexpectedValueException(sprintf( 46 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 47 | } 48 | return self::$valueToName[$value]; 49 | } 50 | 51 | 52 | public static function value($name) 53 | { 54 | $const = __CLASS__ . '::' . strtoupper($name); 55 | if (!defined($const)) { 56 | throw new UnexpectedValueException(sprintf( 57 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 58 | } 59 | return constant($const); 60 | } 61 | } 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/V2/IntentBatch.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.IntentBatch 15 | */ 16 | class IntentBatch extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * A collection of intents. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; 22 | */ 23 | private $intents; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $intents 32 | * A collection of intents. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * A collection of intents. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getIntents() 47 | { 48 | return $this->intents; 49 | } 50 | 51 | /** 52 | * A collection of intents. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.Intent intents = 1; 55 | * @param array<\Google\Cloud\Dialogflow\V2\Intent>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setIntents($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent::class); 61 | $this->intents = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/IntentView.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.IntentView 15 | */ 16 | class IntentView 17 | { 18 | /** 19 | * Training phrases field is not populated in the response. 20 | * 21 | * Generated from protobuf enum INTENT_VIEW_UNSPECIFIED = 0; 22 | */ 23 | const INTENT_VIEW_UNSPECIFIED = 0; 24 | /** 25 | * All fields are populated. 26 | * 27 | * Generated from protobuf enum INTENT_VIEW_FULL = 1; 28 | */ 29 | const INTENT_VIEW_FULL = 1; 30 | 31 | private static $valueToName = [ 32 | self::INTENT_VIEW_UNSPECIFIED => 'INTENT_VIEW_UNSPECIFIED', 33 | self::INTENT_VIEW_FULL => 'INTENT_VIEW_FULL', 34 | ]; 35 | 36 | public static function name($value) 37 | { 38 | if (!isset(self::$valueToName[$value])) { 39 | throw new UnexpectedValueException(sprintf( 40 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 41 | } 42 | return self::$valueToName[$value]; 43 | } 44 | 45 | 46 | public static function value($name) 47 | { 48 | $const = __CLASS__ . '::' . strtoupper($name); 49 | if (!defined($const)) { 50 | throw new UnexpectedValueException(sprintf( 51 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 52 | } 53 | return constant($const); 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /src/V2/KnowledgeAssistAnswer/KnowledgeAnswer/FaqSource.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.FaqSource 15 | */ 16 | class FaqSource extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * The corresponding FAQ question. 20 | * 21 | * Generated from protobuf field string question = 2; 22 | */ 23 | protected $question = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $question 32 | * The corresponding FAQ question. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * The corresponding FAQ question. 42 | * 43 | * Generated from protobuf field string question = 2; 44 | * @return string 45 | */ 46 | public function getQuestion() 47 | { 48 | return $this->question; 49 | } 50 | 51 | /** 52 | * The corresponding FAQ question. 53 | * 54 | * Generated from protobuf field string question = 2; 55 | * @param string $var 56 | * @return $this 57 | */ 58 | public function setQuestion($var) 59 | { 60 | GPBUtil::checkString($var, True); 61 | $this->question = $var; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/KnowledgeAssistAnswer/KnowledgeAnswer/GenerativeSource.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource 15 | */ 16 | class GenerativeSource extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * All snippets used for this Generative Prediction, with their source URI 20 | * and data. 21 | * 22 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Snippet snippets = 1; 23 | */ 24 | private $snippets; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type array<\Google\Cloud\Dialogflow\V2\KnowledgeAssistAnswer\KnowledgeAnswer\GenerativeSource\Snippet>|\Google\Protobuf\Internal\RepeatedField $snippets 33 | * All snippets used for this Generative Prediction, with their source URI 34 | * and data. 35 | * } 36 | */ 37 | public function __construct($data = NULL) { 38 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); 39 | parent::__construct($data); 40 | } 41 | 42 | /** 43 | * All snippets used for this Generative Prediction, with their source URI 44 | * and data. 45 | * 46 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Snippet snippets = 1; 47 | * @return \Google\Protobuf\Internal\RepeatedField 48 | */ 49 | public function getSnippets() 50 | { 51 | return $this->snippets; 52 | } 53 | 54 | /** 55 | * All snippets used for this Generative Prediction, with their source URI 56 | * and data. 57 | * 58 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.KnowledgeAssistAnswer.KnowledgeAnswer.GenerativeSource.Snippet snippets = 1; 59 | * @param array<\Google\Cloud\Dialogflow\V2\KnowledgeAssistAnswer\KnowledgeAnswer\GenerativeSource\Snippet>|\Google\Protobuf\Internal\RepeatedField $var 60 | * @return $this 61 | */ 62 | public function setSnippets($var) 63 | { 64 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\KnowledgeAssistAnswer\KnowledgeAnswer\GenerativeSource\Snippet::class); 65 | $this->snippets = $arr; 66 | 67 | return $this; 68 | } 69 | 70 | } 71 | 72 | 73 | -------------------------------------------------------------------------------- /src/V2/KnowledgeAssistAnswer/SuggestedQuery.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.KnowledgeAssistAnswer.SuggestedQuery 15 | */ 16 | class SuggestedQuery extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Suggested query text. 20 | * 21 | * Generated from protobuf field string query_text = 1; 22 | */ 23 | protected $query_text = ''; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type string $query_text 32 | * Suggested query text. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Suggested query text. 42 | * 43 | * Generated from protobuf field string query_text = 1; 44 | * @return string 45 | */ 46 | public function getQueryText() 47 | { 48 | return $this->query_text; 49 | } 50 | 51 | /** 52 | * Suggested query text. 53 | * 54 | * Generated from protobuf field string query_text = 1; 55 | * @param string $var 56 | * @return $this 57 | */ 58 | public function setQueryText($var) 59 | { 60 | GPBUtil::checkString($var, True); 61 | $this->query_text = $var; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /src/V2/KnowledgeOperationMetadata/State.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.KnowledgeOperationMetadata.State 13 | */ 14 | class State 15 | { 16 | /** 17 | * State unspecified. 18 | * 19 | * Generated from protobuf enum STATE_UNSPECIFIED = 0; 20 | */ 21 | const STATE_UNSPECIFIED = 0; 22 | /** 23 | * The operation has been created. 24 | * 25 | * Generated from protobuf enum PENDING = 1; 26 | */ 27 | const PENDING = 1; 28 | /** 29 | * The operation is currently running. 30 | * 31 | * Generated from protobuf enum RUNNING = 2; 32 | */ 33 | const RUNNING = 2; 34 | /** 35 | * The operation is done, either cancelled or completed. 36 | * 37 | * Generated from protobuf enum DONE = 3; 38 | */ 39 | const DONE = 3; 40 | 41 | private static $valueToName = [ 42 | self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', 43 | self::PENDING => 'PENDING', 44 | self::RUNNING => 'RUNNING', 45 | self::DONE => 'DONE', 46 | ]; 47 | 48 | public static function name($value) 49 | { 50 | if (!isset(self::$valueToName[$value])) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 53 | } 54 | return self::$valueToName[$value]; 55 | } 56 | 57 | 58 | public static function value($name) 59 | { 60 | $const = __CLASS__ . '::' . strtoupper($name); 61 | if (!defined($const)) { 62 | throw new UnexpectedValueException(sprintf( 63 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 64 | } 65 | return constant($const); 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/MessageEntry/Role.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.MessageEntry.Role 13 | */ 14 | class Role 15 | { 16 | /** 17 | * Participant role not set. 18 | * 19 | * Generated from protobuf enum ROLE_UNSPECIFIED = 0; 20 | */ 21 | const ROLE_UNSPECIFIED = 0; 22 | /** 23 | * Participant is a human agent. 24 | * 25 | * Generated from protobuf enum HUMAN_AGENT = 1; 26 | */ 27 | const HUMAN_AGENT = 1; 28 | /** 29 | * Participant is an automated agent, such as a Dialogflow agent. 30 | * 31 | * Generated from protobuf enum AUTOMATED_AGENT = 2; 32 | */ 33 | const AUTOMATED_AGENT = 2; 34 | /** 35 | * Participant is an end user that has called or chatted with 36 | * Dialogflow services. 37 | * 38 | * Generated from protobuf enum END_USER = 3; 39 | */ 40 | const END_USER = 3; 41 | 42 | private static $valueToName = [ 43 | self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', 44 | self::HUMAN_AGENT => 'HUMAN_AGENT', 45 | self::AUTOMATED_AGENT => 'AUTOMATED_AGENT', 46 | self::END_USER => 'END_USER', 47 | ]; 48 | 49 | public static function name($value) 50 | { 51 | if (!isset(self::$valueToName[$value])) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 54 | } 55 | return self::$valueToName[$value]; 56 | } 57 | 58 | 59 | public static function value($name) 60 | { 61 | $const = __CLASS__ . '::' . strtoupper($name); 62 | if (!defined($const)) { 63 | throw new UnexpectedValueException(sprintf( 64 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 65 | } 66 | return constant($const); 67 | } 68 | } 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/V2/NotificationConfig/MessageFormat.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.NotificationConfig.MessageFormat 13 | */ 14 | class MessageFormat 15 | { 16 | /** 17 | * If it is unspecified, PROTO will be used. 18 | * 19 | * Generated from protobuf enum MESSAGE_FORMAT_UNSPECIFIED = 0; 20 | */ 21 | const MESSAGE_FORMAT_UNSPECIFIED = 0; 22 | /** 23 | * Pub/Sub message will be serialized proto. 24 | * 25 | * Generated from protobuf enum PROTO = 1; 26 | */ 27 | const PROTO = 1; 28 | /** 29 | * Pub/Sub message will be json. 30 | * 31 | * Generated from protobuf enum JSON = 2; 32 | */ 33 | const JSON = 2; 34 | 35 | private static $valueToName = [ 36 | self::MESSAGE_FORMAT_UNSPECIFIED => 'MESSAGE_FORMAT_UNSPECIFIED', 37 | self::PROTO => 'PROTO', 38 | self::JSON => 'JSON', 39 | ]; 40 | 41 | public static function name($value) 42 | { 43 | if (!isset(self::$valueToName[$value])) { 44 | throw new UnexpectedValueException(sprintf( 45 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 46 | } 47 | return self::$valueToName[$value]; 48 | } 49 | 50 | 51 | public static function value($name) 52 | { 53 | $const = __CLASS__ . '::' . strtoupper($name); 54 | if (!defined($const)) { 55 | throw new UnexpectedValueException(sprintf( 56 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 57 | } 58 | return constant($const); 59 | } 60 | } 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/V2/Participant/Role.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Participant.Role 13 | */ 14 | class Role 15 | { 16 | /** 17 | * Participant role not set. 18 | * 19 | * Generated from protobuf enum ROLE_UNSPECIFIED = 0; 20 | */ 21 | const ROLE_UNSPECIFIED = 0; 22 | /** 23 | * Participant is a human agent. 24 | * 25 | * Generated from protobuf enum HUMAN_AGENT = 1; 26 | */ 27 | const HUMAN_AGENT = 1; 28 | /** 29 | * Participant is an automated agent, such as a Dialogflow agent. 30 | * 31 | * Generated from protobuf enum AUTOMATED_AGENT = 2; 32 | */ 33 | const AUTOMATED_AGENT = 2; 34 | /** 35 | * Participant is an end user that has called or chatted with 36 | * Dialogflow services. 37 | * 38 | * Generated from protobuf enum END_USER = 3; 39 | */ 40 | const END_USER = 3; 41 | 42 | private static $valueToName = [ 43 | self::ROLE_UNSPECIFIED => 'ROLE_UNSPECIFIED', 44 | self::HUMAN_AGENT => 'HUMAN_AGENT', 45 | self::AUTOMATED_AGENT => 'AUTOMATED_AGENT', 46 | self::END_USER => 'END_USER', 47 | ]; 48 | 49 | public static function name($value) 50 | { 51 | if (!isset(self::$valueToName[$value])) { 52 | throw new UnexpectedValueException(sprintf( 53 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 54 | } 55 | return self::$valueToName[$value]; 56 | } 57 | 58 | 59 | public static function value($name) 60 | { 61 | $const = __CLASS__ . '::' . strtoupper($name); 62 | if (!defined($const)) { 63 | throw new UnexpectedValueException(sprintf( 64 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 65 | } 66 | return constant($const); 67 | } 68 | } 69 | 70 | 71 | -------------------------------------------------------------------------------- /src/V2/SearchKnowledgeAnswer/AnswerType.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SearchKnowledgeAnswer.AnswerType 13 | */ 14 | class AnswerType 15 | { 16 | /** 17 | * The answer has a unspecified type. 18 | * 19 | * Generated from protobuf enum ANSWER_TYPE_UNSPECIFIED = 0; 20 | */ 21 | const ANSWER_TYPE_UNSPECIFIED = 0; 22 | /** 23 | * The answer is from FAQ documents. 24 | * 25 | * Generated from protobuf enum FAQ = 1; 26 | */ 27 | const FAQ = 1; 28 | /** 29 | * The answer is from generative model. 30 | * 31 | * Generated from protobuf enum GENERATIVE = 2; 32 | */ 33 | const GENERATIVE = 2; 34 | /** 35 | * The answer is from intent matching. 36 | * 37 | * Generated from protobuf enum INTENT = 3; 38 | */ 39 | const INTENT = 3; 40 | 41 | private static $valueToName = [ 42 | self::ANSWER_TYPE_UNSPECIFIED => 'ANSWER_TYPE_UNSPECIFIED', 43 | self::FAQ => 'FAQ', 44 | self::GENERATIVE => 'GENERATIVE', 45 | self::INTENT => 'INTENT', 46 | ]; 47 | 48 | public static function name($value) 49 | { 50 | if (!isset(self::$valueToName[$value])) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 53 | } 54 | return self::$valueToName[$value]; 55 | } 56 | 57 | 58 | public static function value($name) 59 | { 60 | $const = __CLASS__ . '::' . strtoupper($name); 61 | if (!defined($const)) { 62 | throw new UnexpectedValueException(sprintf( 63 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 64 | } 65 | return constant($const); 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/SearchKnowledgeRequest/QuerySource.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SearchKnowledgeRequest.QuerySource 17 | */ 18 | class QuerySource 19 | { 20 | /** 21 | * Unknown query source. 22 | * 23 | * Generated from protobuf enum QUERY_SOURCE_UNSPECIFIED = 0; 24 | */ 25 | const QUERY_SOURCE_UNSPECIFIED = 0; 26 | /** 27 | * The query is from agents. 28 | * 29 | * Generated from protobuf enum AGENT_QUERY = 1; 30 | */ 31 | const AGENT_QUERY = 1; 32 | /** 33 | * The query is a suggested query from 34 | * [Participants.SuggestKnowledgeAssist][google.cloud.dialogflow.v2.Participants.SuggestKnowledgeAssist]. 35 | * 36 | * Generated from protobuf enum SUGGESTED_QUERY = 2; 37 | */ 38 | const SUGGESTED_QUERY = 2; 39 | 40 | private static $valueToName = [ 41 | self::QUERY_SOURCE_UNSPECIFIED => 'QUERY_SOURCE_UNSPECIFIED', 42 | self::AGENT_QUERY => 'AGENT_QUERY', 43 | self::SUGGESTED_QUERY => 'SUGGESTED_QUERY', 44 | ]; 45 | 46 | public static function name($value) 47 | { 48 | if (!isset(self::$valueToName[$value])) { 49 | throw new UnexpectedValueException(sprintf( 50 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 51 | } 52 | return self::$valueToName[$value]; 53 | } 54 | 55 | 56 | public static function value($name) 57 | { 58 | $const = __CLASS__ . '::' . strtoupper($name); 59 | if (!defined($const)) { 60 | throw new UnexpectedValueException(sprintf( 61 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 62 | } 63 | return constant($const); 64 | } 65 | } 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/V2/SearchKnowledgeRequest/SearchConfig/BoostSpecs/BoostSpec/ConditionBoostSpec/BoostControlSpec/AttributeType.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.AttributeType 14 | */ 15 | class AttributeType 16 | { 17 | /** 18 | * Unspecified AttributeType. 19 | * 20 | * Generated from protobuf enum ATTRIBUTE_TYPE_UNSPECIFIED = 0; 21 | */ 22 | const ATTRIBUTE_TYPE_UNSPECIFIED = 0; 23 | /** 24 | * The value of the numerical field will be used to dynamically 25 | * update the boost amount. In this case, the attribute_value (the 26 | * x value) of the control point will be the actual value of the 27 | * numerical field for which the boost_amount is specified. 28 | * 29 | * Generated from protobuf enum NUMERICAL = 1; 30 | */ 31 | const NUMERICAL = 1; 32 | /** 33 | * For the freshness use case the attribute value will be the 34 | * duration between the current time and the date in the datetime 35 | * field specified. The value must be formatted as an XSD 36 | * `dayTimeDuration` value (a restricted subset of an ISO 8601 37 | * duration value). The pattern for this is: 38 | * `[nD][T[nH][nM][nS]]`. E.g. `5D`, `3DT12H30M`, `T24H`. 39 | * 40 | * Generated from protobuf enum FRESHNESS = 2; 41 | */ 42 | const FRESHNESS = 2; 43 | 44 | private static $valueToName = [ 45 | self::ATTRIBUTE_TYPE_UNSPECIFIED => 'ATTRIBUTE_TYPE_UNSPECIFIED', 46 | self::NUMERICAL => 'NUMERICAL', 47 | self::FRESHNESS => 'FRESHNESS', 48 | ]; 49 | 50 | public static function name($value) 51 | { 52 | if (!isset(self::$valueToName[$value])) { 53 | throw new UnexpectedValueException(sprintf( 54 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 55 | } 56 | return self::$valueToName[$value]; 57 | } 58 | 59 | 60 | public static function value($name) 61 | { 62 | $const = __CLASS__ . '::' . strtoupper($name); 63 | if (!defined($const)) { 64 | throw new UnexpectedValueException(sprintf( 65 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 66 | } 67 | return constant($const); 68 | } 69 | } 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/V2/SearchKnowledgeRequest/SearchConfig/BoostSpecs/BoostSpec/ConditionBoostSpec/BoostControlSpec/InterpolationType.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SearchKnowledgeRequest.SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.InterpolationType 14 | */ 15 | class InterpolationType 16 | { 17 | /** 18 | * Interpolation type is unspecified. In this case, it defaults to 19 | * Linear. 20 | * 21 | * Generated from protobuf enum INTERPOLATION_TYPE_UNSPECIFIED = 0; 22 | */ 23 | const INTERPOLATION_TYPE_UNSPECIFIED = 0; 24 | /** 25 | * Piecewise linear interpolation will be applied. 26 | * 27 | * Generated from protobuf enum LINEAR = 1; 28 | */ 29 | const LINEAR = 1; 30 | 31 | private static $valueToName = [ 32 | self::INTERPOLATION_TYPE_UNSPECIFIED => 'INTERPOLATION_TYPE_UNSPECIFIED', 33 | self::LINEAR => 'LINEAR', 34 | ]; 35 | 36 | public static function name($value) 37 | { 38 | if (!isset(self::$valueToName[$value])) { 39 | throw new UnexpectedValueException(sprintf( 40 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 41 | } 42 | return self::$valueToName[$value]; 43 | } 44 | 45 | 46 | public static function value($name) 47 | { 48 | $const = __CLASS__ . '::' . strtoupper($name); 49 | if (!defined($const)) { 50 | throw new UnexpectedValueException(sprintf( 51 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 52 | } 53 | return constant($const); 54 | } 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/V2/SentimentAnalysisRequestConfig.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SentimentAnalysisRequestConfig 15 | */ 16 | class SentimentAnalysisRequestConfig extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Instructs the service to perform sentiment analysis on 20 | * `query_text`. If not provided, sentiment analysis is not performed on 21 | * `query_text`. 22 | * 23 | * Generated from protobuf field bool analyze_query_text_sentiment = 1; 24 | */ 25 | protected $analyze_query_text_sentiment = false; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type bool $analyze_query_text_sentiment 34 | * Instructs the service to perform sentiment analysis on 35 | * `query_text`. If not provided, sentiment analysis is not performed on 36 | * `query_text`. 37 | * } 38 | */ 39 | public function __construct($data = NULL) { 40 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Session::initOnce(); 41 | parent::__construct($data); 42 | } 43 | 44 | /** 45 | * Instructs the service to perform sentiment analysis on 46 | * `query_text`. If not provided, sentiment analysis is not performed on 47 | * `query_text`. 48 | * 49 | * Generated from protobuf field bool analyze_query_text_sentiment = 1; 50 | * @return bool 51 | */ 52 | public function getAnalyzeQueryTextSentiment() 53 | { 54 | return $this->analyze_query_text_sentiment; 55 | } 56 | 57 | /** 58 | * Instructs the service to perform sentiment analysis on 59 | * `query_text`. If not provided, sentiment analysis is not performed on 60 | * `query_text`. 61 | * 62 | * Generated from protobuf field bool analyze_query_text_sentiment = 1; 63 | * @param bool $var 64 | * @return $this 65 | */ 66 | public function setAnalyzeQueryTextSentiment($var) 67 | { 68 | GPBUtil::checkBool($var); 69 | $this->analyze_query_text_sentiment = $var; 70 | 71 | return $this; 72 | } 73 | 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/V2/SessionEntityType/EntityOverrideMode.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SessionEntityType.EntityOverrideMode 13 | */ 14 | class EntityOverrideMode 15 | { 16 | /** 17 | * Not specified. This value should be never used. 18 | * 19 | * Generated from protobuf enum ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; 20 | */ 21 | const ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0; 22 | /** 23 | * The collection of session entities overrides the collection of entities 24 | * in the corresponding custom entity type. 25 | * 26 | * Generated from protobuf enum ENTITY_OVERRIDE_MODE_OVERRIDE = 1; 27 | */ 28 | const ENTITY_OVERRIDE_MODE_OVERRIDE = 1; 29 | /** 30 | * The collection of session entities extends the collection of entities in 31 | * the corresponding custom entity type. 32 | * Note: Even in this override mode calls to `ListSessionEntityTypes`, 33 | * `GetSessionEntityType`, `CreateSessionEntityType` and 34 | * `UpdateSessionEntityType` only return the additional entities added in 35 | * this session entity type. If you want to get the supplemented list, 36 | * please call 37 | * [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] 38 | * on the custom entity type and merge. 39 | * 40 | * Generated from protobuf enum ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; 41 | */ 42 | const ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2; 43 | 44 | private static $valueToName = [ 45 | self::ENTITY_OVERRIDE_MODE_UNSPECIFIED => 'ENTITY_OVERRIDE_MODE_UNSPECIFIED', 46 | self::ENTITY_OVERRIDE_MODE_OVERRIDE => 'ENTITY_OVERRIDE_MODE_OVERRIDE', 47 | self::ENTITY_OVERRIDE_MODE_SUPPLEMENT => 'ENTITY_OVERRIDE_MODE_SUPPLEMENT', 48 | ]; 49 | 50 | public static function name($value) 51 | { 52 | if (!isset(self::$valueToName[$value])) { 53 | throw new UnexpectedValueException(sprintf( 54 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 55 | } 56 | return self::$valueToName[$value]; 57 | } 58 | 59 | 60 | public static function value($name) 61 | { 62 | $const = __CLASS__ . '::' . strtoupper($name); 63 | if (!defined($const)) { 64 | throw new UnexpectedValueException(sprintf( 65 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 66 | } 67 | return constant($const); 68 | } 69 | } 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/V2/SmartReplyModelMetadata.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SmartReplyModelMetadata 15 | */ 16 | class SmartReplyModelMetadata extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Optional. Type of the smart reply model. If not provided, model_type is 20 | * used. 21 | * 22 | * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; 23 | */ 24 | protected $training_model_type = 0; 25 | 26 | /** 27 | * Constructor. 28 | * 29 | * @param array $data { 30 | * Optional. Data for populating the Message object. 31 | * 32 | * @type int $training_model_type 33 | * Optional. Type of the smart reply model. If not provided, model_type is 34 | * used. 35 | * } 36 | */ 37 | public function __construct($data = NULL) { 38 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); 39 | parent::__construct($data); 40 | } 41 | 42 | /** 43 | * Optional. Type of the smart reply model. If not provided, model_type is 44 | * used. 45 | * 46 | * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; 47 | * @return int 48 | */ 49 | public function getTrainingModelType() 50 | { 51 | return $this->training_model_type; 52 | } 53 | 54 | /** 55 | * Optional. Type of the smart reply model. If not provided, model_type is 56 | * used. 57 | * 58 | * Generated from protobuf field .google.cloud.dialogflow.v2.ConversationModel.ModelType training_model_type = 6 [(.google.api.field_behavior) = OPTIONAL]; 59 | * @param int $var 60 | * @return $this 61 | */ 62 | public function setTrainingModelType($var) 63 | { 64 | GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\ConversationModel\ModelType::class); 65 | $this->training_model_type = $var; 66 | 67 | return $this; 68 | } 69 | 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/V2/SsmlVoiceGender.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SsmlVoiceGender 14 | */ 15 | class SsmlVoiceGender 16 | { 17 | /** 18 | * An unspecified gender, which means that the client doesn't care which 19 | * gender the selected voice will have. 20 | * 21 | * Generated from protobuf enum SSML_VOICE_GENDER_UNSPECIFIED = 0; 22 | */ 23 | const SSML_VOICE_GENDER_UNSPECIFIED = 0; 24 | /** 25 | * A male voice. 26 | * 27 | * Generated from protobuf enum SSML_VOICE_GENDER_MALE = 1; 28 | */ 29 | const SSML_VOICE_GENDER_MALE = 1; 30 | /** 31 | * A female voice. 32 | * 33 | * Generated from protobuf enum SSML_VOICE_GENDER_FEMALE = 2; 34 | */ 35 | const SSML_VOICE_GENDER_FEMALE = 2; 36 | /** 37 | * A gender-neutral voice. 38 | * 39 | * Generated from protobuf enum SSML_VOICE_GENDER_NEUTRAL = 3; 40 | */ 41 | const SSML_VOICE_GENDER_NEUTRAL = 3; 42 | 43 | private static $valueToName = [ 44 | self::SSML_VOICE_GENDER_UNSPECIFIED => 'SSML_VOICE_GENDER_UNSPECIFIED', 45 | self::SSML_VOICE_GENDER_MALE => 'SSML_VOICE_GENDER_MALE', 46 | self::SSML_VOICE_GENDER_FEMALE => 'SSML_VOICE_GENDER_FEMALE', 47 | self::SSML_VOICE_GENDER_NEUTRAL => 'SSML_VOICE_GENDER_NEUTRAL', 48 | ]; 49 | 50 | public static function name($value) 51 | { 52 | if (!isset(self::$valueToName[$value])) { 53 | throw new UnexpectedValueException(sprintf( 54 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 55 | } 56 | return self::$valueToName[$value]; 57 | } 58 | 59 | 60 | public static function value($name) 61 | { 62 | $const = __CLASS__ . '::' . strtoupper($name); 63 | if (!defined($const)) { 64 | throw new UnexpectedValueException(sprintf( 65 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 66 | } 67 | return constant($const); 68 | } 69 | } 70 | 71 | -------------------------------------------------------------------------------- /src/V2/StreamingRecognitionResult/MessageType.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.StreamingRecognitionResult.MessageType 13 | */ 14 | class MessageType 15 | { 16 | /** 17 | * Not specified. Should never be used. 18 | * 19 | * Generated from protobuf enum MESSAGE_TYPE_UNSPECIFIED = 0; 20 | */ 21 | const MESSAGE_TYPE_UNSPECIFIED = 0; 22 | /** 23 | * Message contains a (possibly partial) transcript. 24 | * 25 | * Generated from protobuf enum TRANSCRIPT = 1; 26 | */ 27 | const TRANSCRIPT = 1; 28 | /** 29 | * This event indicates that the server has detected the end of the user's 30 | * speech utterance and expects no additional inputs. 31 | * Therefore, the server will not process additional audio (although it may 32 | * subsequently return additional results). The client should stop sending 33 | * additional audio data, half-close the gRPC connection, and wait for any 34 | * additional results until the server closes the gRPC connection. This 35 | * message is only sent if `single_utterance` was set to `true`, and is not 36 | * used otherwise. 37 | * 38 | * Generated from protobuf enum END_OF_SINGLE_UTTERANCE = 2; 39 | */ 40 | const END_OF_SINGLE_UTTERANCE = 2; 41 | 42 | private static $valueToName = [ 43 | self::MESSAGE_TYPE_UNSPECIFIED => 'MESSAGE_TYPE_UNSPECIFIED', 44 | self::TRANSCRIPT => 'TRANSCRIPT', 45 | self::END_OF_SINGLE_UTTERANCE => 'END_OF_SINGLE_UTTERANCE', 46 | ]; 47 | 48 | public static function name($value) 49 | { 50 | if (!isset(self::$valueToName[$value])) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 53 | } 54 | return self::$valueToName[$value]; 55 | } 56 | 57 | 58 | public static function value($name) 59 | { 60 | $const = __CLASS__ . '::' . strtoupper($name); 61 | if (!defined($const)) { 62 | throw new UnexpectedValueException(sprintf( 63 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 64 | } 65 | return constant($const); 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/SuggestionFeature.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SuggestionFeature 17 | */ 18 | class SuggestionFeature extends \Google\Protobuf\Internal\Message 19 | { 20 | /** 21 | * Type of Human Agent Assistant API feature to request. 22 | * 23 | * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; 24 | */ 25 | protected $type = 0; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type int $type 34 | * Type of Human Agent Assistant API feature to request. 35 | * } 36 | */ 37 | public function __construct($data = NULL) { 38 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce(); 39 | parent::__construct($data); 40 | } 41 | 42 | /** 43 | * Type of Human Agent Assistant API feature to request. 44 | * 45 | * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; 46 | * @return int 47 | */ 48 | public function getType() 49 | { 50 | return $this->type; 51 | } 52 | 53 | /** 54 | * Type of Human Agent Assistant API feature to request. 55 | * 56 | * Generated from protobuf field .google.cloud.dialogflow.v2.SuggestionFeature.Type type = 1; 57 | * @param int $var 58 | * @return $this 59 | */ 60 | public function setType($var) 61 | { 62 | GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\SuggestionFeature\Type::class); 63 | $this->type = $var; 64 | 65 | return $this; 66 | } 67 | 68 | } 69 | 70 | -------------------------------------------------------------------------------- /src/V2/SummarizationSectionList.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SummarizationSectionList 15 | */ 16 | class SummarizationSectionList extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Optional. Summarization sections. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SummarizationSection summarization_sections = 1 [(.google.api.field_behavior) = OPTIONAL]; 22 | */ 23 | private $summarization_sections; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\SummarizationSection>|\Google\Protobuf\Internal\RepeatedField $summarization_sections 32 | * Optional. Summarization sections. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Optional. Summarization sections. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SummarizationSection summarization_sections = 1 [(.google.api.field_behavior) = OPTIONAL]; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getSummarizationSections() 47 | { 48 | return $this->summarization_sections; 49 | } 50 | 51 | /** 52 | * Optional. Summarization sections. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SummarizationSection summarization_sections = 1 [(.google.api.field_behavior) = OPTIONAL]; 55 | * @param array<\Google\Cloud\Dialogflow\V2\SummarizationSection>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setSummarizationSections($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SummarizationSection::class); 61 | $this->summarization_sections = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/SummarySuggestion.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.SummarySuggestion 15 | */ 16 | class SummarySuggestion extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Required. All the parts of generated summary. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SummarySuggestion.SummarySection summary_sections = 1 [(.google.api.field_behavior) = REQUIRED]; 22 | */ 23 | private $summary_sections; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\SummarySuggestion\SummarySection>|\Google\Protobuf\Internal\RepeatedField $summary_sections 32 | * Required. All the parts of generated summary. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\Generator::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Required. All the parts of generated summary. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SummarySuggestion.SummarySection summary_sections = 1 [(.google.api.field_behavior) = REQUIRED]; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getSummarySections() 47 | { 48 | return $this->summary_sections; 49 | } 50 | 51 | /** 52 | * Required. All the parts of generated summary. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.SummarySuggestion.SummarySection summary_sections = 1 [(.google.api.field_behavior) = REQUIRED]; 55 | * @param array<\Google\Cloud\Dialogflow\V2\SummarySuggestion\SummarySection>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setSummarySections($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\SummarySuggestion\SummarySection::class); 61 | $this->summary_sections = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/TelephonyDtmfEvents.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.TelephonyDtmfEvents 15 | */ 16 | class TelephonyDtmfEvents extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * A sequence of TelephonyDtmf digits. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; 22 | */ 23 | private $dtmf_events; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array|\Google\Protobuf\Internal\RepeatedField $dtmf_events 32 | * A sequence of TelephonyDtmf digits. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\AudioConfig::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * A sequence of TelephonyDtmf digits. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getDtmfEvents() 47 | { 48 | return $this->dtmf_events; 49 | } 50 | 51 | /** 52 | * A sequence of TelephonyDtmf digits. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.TelephonyDtmf dtmf_events = 1; 55 | * @param array|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setDtmfEvents($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\Dialogflow\V2\TelephonyDtmf::class); 61 | $this->dtmf_events = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/TriggerEvent.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.TriggerEvent 13 | */ 14 | class TriggerEvent 15 | { 16 | /** 17 | * Default value for TriggerEvent. 18 | * 19 | * Generated from protobuf enum TRIGGER_EVENT_UNSPECIFIED = 0; 20 | */ 21 | const TRIGGER_EVENT_UNSPECIFIED = 0; 22 | /** 23 | * Triggers when each chat message or voice utterance ends. 24 | * 25 | * Generated from protobuf enum END_OF_UTTERANCE = 1; 26 | */ 27 | const END_OF_UTTERANCE = 1; 28 | /** 29 | * Triggers on the conversation manually by API calls, such as 30 | * Conversations.GenerateStatelessSuggestion and 31 | * Conversations.GenerateSuggestions. 32 | * 33 | * Generated from protobuf enum MANUAL_CALL = 2; 34 | */ 35 | const MANUAL_CALL = 2; 36 | /** 37 | * Triggers after each customer message only. 38 | * 39 | * Generated from protobuf enum CUSTOMER_MESSAGE = 3; 40 | */ 41 | const CUSTOMER_MESSAGE = 3; 42 | /** 43 | * Triggers after each agent message only. 44 | * 45 | * Generated from protobuf enum AGENT_MESSAGE = 4; 46 | */ 47 | const AGENT_MESSAGE = 4; 48 | 49 | private static $valueToName = [ 50 | self::TRIGGER_EVENT_UNSPECIFIED => 'TRIGGER_EVENT_UNSPECIFIED', 51 | self::END_OF_UTTERANCE => 'END_OF_UTTERANCE', 52 | self::MANUAL_CALL => 'MANUAL_CALL', 53 | self::CUSTOMER_MESSAGE => 'CUSTOMER_MESSAGE', 54 | self::AGENT_MESSAGE => 'AGENT_MESSAGE', 55 | ]; 56 | 57 | public static function name($value) 58 | { 59 | if (!isset(self::$valueToName[$value])) { 60 | throw new UnexpectedValueException(sprintf( 61 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 62 | } 63 | return self::$valueToName[$value]; 64 | } 65 | 66 | 67 | public static function value($name) 68 | { 69 | $const = __CLASS__ . '::' . strtoupper($name); 70 | if (!defined($const)) { 71 | throw new UnexpectedValueException(sprintf( 72 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 73 | } 74 | return constant($const); 75 | } 76 | } 77 | 78 | -------------------------------------------------------------------------------- /src/V2/UndeployConversationModelRequest.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.UndeployConversationModelRequest 16 | */ 17 | class UndeployConversationModelRequest extends \Google\Protobuf\Internal\Message 18 | { 19 | /** 20 | * Required. The conversation model to undeploy. Format: 21 | * `projects//conversationModels/` 22 | * 23 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; 24 | */ 25 | protected $name = ''; 26 | 27 | /** 28 | * Constructor. 29 | * 30 | * @param array $data { 31 | * Optional. Data for populating the Message object. 32 | * 33 | * @type string $name 34 | * Required. The conversation model to undeploy. Format: 35 | * `projects//conversationModels/` 36 | * } 37 | */ 38 | public function __construct($data = NULL) { 39 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationModel::initOnce(); 40 | parent::__construct($data); 41 | } 42 | 43 | /** 44 | * Required. The conversation model to undeploy. Format: 45 | * `projects//conversationModels/` 46 | * 47 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; 48 | * @return string 49 | */ 50 | public function getName() 51 | { 52 | return $this->name; 53 | } 54 | 55 | /** 56 | * Required. The conversation model to undeploy. Format: 57 | * `projects//conversationModels/` 58 | * 59 | * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; 60 | * @param string $var 61 | * @return $this 62 | */ 63 | public function setName($var) 64 | { 65 | GPBUtil::checkString($var, True); 66 | $this->name = $var; 67 | 68 | return $this; 69 | } 70 | 71 | } 72 | 73 | -------------------------------------------------------------------------------- /src/V2/ValidationError/Severity.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ValidationError.Severity 13 | */ 14 | class Severity 15 | { 16 | /** 17 | * Not specified. This value should never be used. 18 | * 19 | * Generated from protobuf enum SEVERITY_UNSPECIFIED = 0; 20 | */ 21 | const SEVERITY_UNSPECIFIED = 0; 22 | /** 23 | * The agent doesn't follow Dialogflow best practices. 24 | * 25 | * Generated from protobuf enum INFO = 1; 26 | */ 27 | const INFO = 1; 28 | /** 29 | * The agent may not behave as expected. 30 | * 31 | * Generated from protobuf enum WARNING = 2; 32 | */ 33 | const WARNING = 2; 34 | /** 35 | * The agent may experience partial failures. 36 | * 37 | * Generated from protobuf enum ERROR = 3; 38 | */ 39 | const ERROR = 3; 40 | /** 41 | * The agent may completely fail. 42 | * 43 | * Generated from protobuf enum CRITICAL = 4; 44 | */ 45 | const CRITICAL = 4; 46 | 47 | private static $valueToName = [ 48 | self::SEVERITY_UNSPECIFIED => 'SEVERITY_UNSPECIFIED', 49 | self::INFO => 'INFO', 50 | self::WARNING => 'WARNING', 51 | self::ERROR => 'ERROR', 52 | self::CRITICAL => 'CRITICAL', 53 | ]; 54 | 55 | public static function name($value) 56 | { 57 | if (!isset(self::$valueToName[$value])) { 58 | throw new UnexpectedValueException(sprintf( 59 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 60 | } 61 | return self::$valueToName[$value]; 62 | } 63 | 64 | 65 | public static function value($name) 66 | { 67 | $const = __CLASS__ . '::' . strtoupper($name); 68 | if (!defined($const)) { 69 | throw new UnexpectedValueException(sprintf( 70 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 71 | } 72 | return constant($const); 73 | } 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /src/V2/ValidationResult.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.ValidationResult 15 | */ 16 | class ValidationResult extends \Google\Protobuf\Internal\Message 17 | { 18 | /** 19 | * Contains all validation errors. 20 | * 21 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; 22 | */ 23 | private $validation_errors; 24 | 25 | /** 26 | * Constructor. 27 | * 28 | * @param array $data { 29 | * Optional. Data for populating the Message object. 30 | * 31 | * @type array<\Google\Cloud\Dialogflow\V2\ValidationError>|\Google\Protobuf\Internal\RepeatedField $validation_errors 32 | * Contains all validation errors. 33 | * } 34 | */ 35 | public function __construct($data = NULL) { 36 | \GPBMetadata\Google\Cloud\Dialogflow\V2\ValidationResult::initOnce(); 37 | parent::__construct($data); 38 | } 39 | 40 | /** 41 | * Contains all validation errors. 42 | * 43 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; 44 | * @return \Google\Protobuf\Internal\RepeatedField 45 | */ 46 | public function getValidationErrors() 47 | { 48 | return $this->validation_errors; 49 | } 50 | 51 | /** 52 | * Contains all validation errors. 53 | * 54 | * Generated from protobuf field repeated .google.cloud.dialogflow.v2.ValidationError validation_errors = 1; 55 | * @param array<\Google\Cloud\Dialogflow\V2\ValidationError>|\Google\Protobuf\Internal\RepeatedField $var 56 | * @return $this 57 | */ 58 | public function setValidationErrors($var) 59 | { 60 | $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\ValidationError::class); 61 | $this->validation_errors = $arr; 62 | 63 | return $this; 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /src/V2/Version/VersionStatus.php: -------------------------------------------------------------------------------- 1 | google.cloud.dialogflow.v2.Version.VersionStatus 13 | */ 14 | class VersionStatus 15 | { 16 | /** 17 | * Not specified. This value is not used. 18 | * 19 | * Generated from protobuf enum VERSION_STATUS_UNSPECIFIED = 0; 20 | */ 21 | const VERSION_STATUS_UNSPECIFIED = 0; 22 | /** 23 | * Version is not ready to serve (e.g. training is in progress). 24 | * 25 | * Generated from protobuf enum IN_PROGRESS = 1; 26 | */ 27 | const IN_PROGRESS = 1; 28 | /** 29 | * Version is ready to serve. 30 | * 31 | * Generated from protobuf enum READY = 2; 32 | */ 33 | const READY = 2; 34 | /** 35 | * Version training failed. 36 | * 37 | * Generated from protobuf enum FAILED = 3; 38 | */ 39 | const FAILED = 3; 40 | 41 | private static $valueToName = [ 42 | self::VERSION_STATUS_UNSPECIFIED => 'VERSION_STATUS_UNSPECIFIED', 43 | self::IN_PROGRESS => 'IN_PROGRESS', 44 | self::READY => 'READY', 45 | self::FAILED => 'FAILED', 46 | ]; 47 | 48 | public static function name($value) 49 | { 50 | if (!isset(self::$valueToName[$value])) { 51 | throw new UnexpectedValueException(sprintf( 52 | 'Enum %s has no name defined for value %s', __CLASS__, $value)); 53 | } 54 | return self::$valueToName[$value]; 55 | } 56 | 57 | 58 | public static function value($name) 59 | { 60 | $const = __CLASS__ . '::' . strtoupper($name); 61 | if (!defined($const)) { 62 | throw new UnexpectedValueException(sprintf( 63 | 'Enum %s has no value defined for name %s', __CLASS__, $name)); 64 | } 65 | return constant($const); 66 | } 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/V2/resources/answer_records_client_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "google.cloud.dialogflow.v2.AnswerRecords": { 4 | "retry_codes": { 5 | "no_retry_codes": [], 6 | "retry_policy_1_codes": [ 7 | "UNAVAILABLE" 8 | ] 9 | }, 10 | "retry_params": { 11 | "no_retry_params": { 12 | "initial_retry_delay_millis": 0, 13 | "retry_delay_multiplier": 0.0, 14 | "max_retry_delay_millis": 0, 15 | "initial_rpc_timeout_millis": 0, 16 | "rpc_timeout_multiplier": 1.0, 17 | "max_rpc_timeout_millis": 0, 18 | "total_timeout_millis": 0 19 | }, 20 | "retry_policy_1_params": { 21 | "initial_retry_delay_millis": 100, 22 | "retry_delay_multiplier": 1.3, 23 | "max_retry_delay_millis": 60000, 24 | "initial_rpc_timeout_millis": 60000, 25 | "rpc_timeout_multiplier": 1.0, 26 | "max_rpc_timeout_millis": 60000, 27 | "total_timeout_millis": 60000 28 | } 29 | }, 30 | "methods": { 31 | "ListAnswerRecords": { 32 | "timeout_millis": 60000, 33 | "retry_codes_name": "retry_policy_1_codes", 34 | "retry_params_name": "retry_policy_1_params" 35 | }, 36 | "UpdateAnswerRecord": { 37 | "timeout_millis": 60000, 38 | "retry_codes_name": "retry_policy_1_codes", 39 | "retry_params_name": "retry_policy_1_params" 40 | }, 41 | "GetLocation": { 42 | "timeout_millis": 60000, 43 | "retry_codes_name": "retry_policy_1_codes", 44 | "retry_params_name": "retry_policy_1_params" 45 | }, 46 | "ListLocations": { 47 | "timeout_millis": 60000, 48 | "retry_codes_name": "retry_policy_1_codes", 49 | "retry_params_name": "retry_policy_1_params" 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/V2/resources/encryption_spec_service_client_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "google.cloud.dialogflow.v2.EncryptionSpecService": { 4 | "retry_codes": { 5 | "no_retry_codes": [], 6 | "retry_policy_1_codes": [ 7 | "UNAVAILABLE" 8 | ] 9 | }, 10 | "retry_params": { 11 | "no_retry_params": { 12 | "initial_retry_delay_millis": 0, 13 | "retry_delay_multiplier": 0.0, 14 | "max_retry_delay_millis": 0, 15 | "initial_rpc_timeout_millis": 0, 16 | "rpc_timeout_multiplier": 1.0, 17 | "max_rpc_timeout_millis": 0, 18 | "total_timeout_millis": 0 19 | }, 20 | "retry_policy_1_params": { 21 | "initial_retry_delay_millis": 100, 22 | "retry_delay_multiplier": 1.3, 23 | "max_retry_delay_millis": 60000, 24 | "initial_rpc_timeout_millis": 60000, 25 | "rpc_timeout_multiplier": 1.0, 26 | "max_rpc_timeout_millis": 60000, 27 | "total_timeout_millis": 60000 28 | } 29 | }, 30 | "methods": { 31 | "GetEncryptionSpec": { 32 | "timeout_millis": 60000, 33 | "retry_codes_name": "retry_policy_1_codes", 34 | "retry_params_name": "retry_policy_1_params" 35 | }, 36 | "InitializeEncryptionSpec": { 37 | "timeout_millis": 60000, 38 | "retry_codes_name": "retry_policy_1_codes", 39 | "retry_params_name": "retry_policy_1_params" 40 | }, 41 | "GetLocation": { 42 | "timeout_millis": 60000, 43 | "retry_codes_name": "retry_policy_1_codes", 44 | "retry_params_name": "retry_policy_1_params" 45 | }, 46 | "ListLocations": { 47 | "timeout_millis": 60000, 48 | "retry_codes_name": "retry_policy_1_codes", 49 | "retry_params_name": "retry_policy_1_params" 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/V2/resources/fulfillments_client_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "interfaces": { 3 | "google.cloud.dialogflow.v2.Fulfillments": { 4 | "retry_codes": { 5 | "no_retry_codes": [], 6 | "retry_policy_1_codes": [ 7 | "UNAVAILABLE" 8 | ] 9 | }, 10 | "retry_params": { 11 | "no_retry_params": { 12 | "initial_retry_delay_millis": 0, 13 | "retry_delay_multiplier": 0.0, 14 | "max_retry_delay_millis": 0, 15 | "initial_rpc_timeout_millis": 0, 16 | "rpc_timeout_multiplier": 1.0, 17 | "max_rpc_timeout_millis": 0, 18 | "total_timeout_millis": 0 19 | }, 20 | "retry_policy_1_params": { 21 | "initial_retry_delay_millis": 100, 22 | "retry_delay_multiplier": 1.3, 23 | "max_retry_delay_millis": 60000, 24 | "initial_rpc_timeout_millis": 60000, 25 | "rpc_timeout_multiplier": 1.0, 26 | "max_rpc_timeout_millis": 60000, 27 | "total_timeout_millis": 60000 28 | } 29 | }, 30 | "methods": { 31 | "GetFulfillment": { 32 | "timeout_millis": 60000, 33 | "retry_codes_name": "retry_policy_1_codes", 34 | "retry_params_name": "retry_policy_1_params" 35 | }, 36 | "UpdateFulfillment": { 37 | "timeout_millis": 60000, 38 | "retry_codes_name": "retry_policy_1_codes", 39 | "retry_params_name": "retry_policy_1_params" 40 | }, 41 | "GetLocation": { 42 | "timeout_millis": 60000, 43 | "retry_codes_name": "retry_policy_1_codes", 44 | "retry_params_name": "retry_policy_1_params" 45 | }, 46 | "ListLocations": { 47 | "timeout_millis": 60000, 48 | "retry_codes_name": "retry_policy_1_codes", 49 | "retry_params_name": "retry_policy_1_params" 50 | } 51 | } 52 | } 53 | } 54 | } 55 | --------------------------------------------------------------------------------