idx
int64
0
41.2k
question
stringlengths
74
4.04k
target
stringlengths
7
750
26,100
public ServiceCall < TrainingDataSet > listTrainingData ( ListTrainingDataOptions listTrainingDataOptions ) { Validator . notNull ( listTrainingDataOptions , "listTrainingDataOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "collections" , "training_data" } ; String [ ] pathParameters = { listTrainingDataOptions . environmentId ( ) , listTrainingDataOptions . collectionId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "listTrainingData" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( TrainingDataSet . class ) ) ; }
List training data .
26,101
public ServiceCall < TrainingExampleList > listTrainingExamples ( ListTrainingExamplesOptions listTrainingExamplesOptions ) { Validator . notNull ( listTrainingExamplesOptions , "listTrainingExamplesOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "collections" , "training_data" , "examples" } ; String [ ] pathParameters = { listTrainingExamplesOptions . environmentId ( ) , listTrainingExamplesOptions . collectionId ( ) , listTrainingExamplesOptions . queryId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "listTrainingExamples" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( TrainingExampleList . class ) ) ; }
List examples for a training data query .
26,102
public ServiceCall < TrainingExample > updateTrainingExample ( UpdateTrainingExampleOptions updateTrainingExampleOptions ) { Validator . notNull ( updateTrainingExampleOptions , "updateTrainingExampleOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "collections" , "training_data" , "examples" } ; String [ ] pathParameters = { updateTrainingExampleOptions . environmentId ( ) , updateTrainingExampleOptions . collectionId ( ) , updateTrainingExampleOptions . queryId ( ) , updateTrainingExampleOptions . exampleId ( ) } ; RequestBuilder builder = RequestBuilder . put ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "updateTrainingExample" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateTrainingExampleOptions . crossReference ( ) != null ) { contentJson . addProperty ( "cross_reference" , updateTrainingExampleOptions . crossReference ( ) ) ; } if ( updateTrainingExampleOptions . relevance ( ) != null ) { contentJson . addProperty ( "relevance" , updateTrainingExampleOptions . relevance ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( TrainingExample . class ) ) ; }
Change label or cross reference for example .
26,103
public ServiceCall < CreateEventResponse > createEvent ( CreateEventOptions createEventOptions ) { Validator . notNull ( createEventOptions , "createEventOptions cannot be null" ) ; String [ ] pathSegments = { "v1/events" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "createEvent" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "type" , createEventOptions . type ( ) ) ; contentJson . add ( "data" , GsonSingleton . getGson ( ) . toJsonTree ( createEventOptions . data ( ) ) ) ; builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( CreateEventResponse . class ) ) ; }
Create event .
26,104
public ServiceCall < MetricResponse > getMetricsEventRate ( GetMetricsEventRateOptions getMetricsEventRateOptions ) { String [ ] pathSegments = { "v1/metrics/event_rate" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "getMetricsEventRate" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getMetricsEventRateOptions != null ) { if ( getMetricsEventRateOptions . startTime ( ) != null ) { builder . query ( "start_time" , String . valueOf ( getMetricsEventRateOptions . startTime ( ) ) ) ; } if ( getMetricsEventRateOptions . endTime ( ) != null ) { builder . query ( "end_time" , String . valueOf ( getMetricsEventRateOptions . endTime ( ) ) ) ; } if ( getMetricsEventRateOptions . resultType ( ) != null ) { builder . query ( "result_type" , getMetricsEventRateOptions . resultType ( ) ) ; } } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( MetricResponse . class ) ) ; }
Percentage of queries with an associated event .
26,105
public ServiceCall < MetricTokenResponse > getMetricsQueryTokenEvent ( GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptions ) { String [ ] pathSegments = { "v1/metrics/top_query_tokens_with_event_rate" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "getMetricsQueryTokenEvent" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getMetricsQueryTokenEventOptions != null ) { if ( getMetricsQueryTokenEventOptions . count ( ) != null ) { builder . query ( "count" , String . valueOf ( getMetricsQueryTokenEventOptions . count ( ) ) ) ; } } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( MetricTokenResponse . class ) ) ; }
Most frequent query tokens with an event .
26,106
public ServiceCall < LogQueryResponse > queryLog ( QueryLogOptions queryLogOptions ) { String [ ] pathSegments = { "v1/logs" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "queryLog" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( queryLogOptions != null ) { if ( queryLogOptions . filter ( ) != null ) { builder . query ( "filter" , queryLogOptions . filter ( ) ) ; } if ( queryLogOptions . query ( ) != null ) { builder . query ( "query" , queryLogOptions . query ( ) ) ; } if ( queryLogOptions . count ( ) != null ) { builder . query ( "count" , String . valueOf ( queryLogOptions . count ( ) ) ) ; } if ( queryLogOptions . offset ( ) != null ) { builder . query ( "offset" , String . valueOf ( queryLogOptions . offset ( ) ) ) ; } if ( queryLogOptions . sort ( ) != null ) { builder . query ( "sort" , RequestUtils . join ( queryLogOptions . sort ( ) , "," ) ) ; } } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( LogQueryResponse . class ) ) ; }
Search the query and event log .
26,107
public ServiceCall < Credentials > getCredentials ( GetCredentialsOptions getCredentialsOptions ) { Validator . notNull ( getCredentialsOptions , "getCredentialsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "credentials" } ; String [ ] pathParameters = { getCredentialsOptions . environmentId ( ) , getCredentialsOptions . credentialId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "getCredentials" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Credentials . class ) ) ; }
View Credentials .
26,108
public ServiceCall < CredentialsList > listCredentials ( ListCredentialsOptions listCredentialsOptions ) { Validator . notNull ( listCredentialsOptions , "listCredentialsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "credentials" } ; String [ ] pathParameters = { listCredentialsOptions . environmentId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "listCredentials" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( CredentialsList . class ) ) ; }
List credentials .
26,109
public ServiceCall < Credentials > updateCredentials ( UpdateCredentialsOptions updateCredentialsOptions ) { Validator . notNull ( updateCredentialsOptions , "updateCredentialsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "credentials" } ; String [ ] pathParameters = { updateCredentialsOptions . environmentId ( ) , updateCredentialsOptions . credentialId ( ) } ; RequestBuilder builder = RequestBuilder . put ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "updateCredentials" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateCredentialsOptions . sourceType ( ) != null ) { contentJson . addProperty ( "source_type" , updateCredentialsOptions . sourceType ( ) ) ; } if ( updateCredentialsOptions . credentialDetails ( ) != null ) { contentJson . add ( "credential_details" , GsonSingleton . getGson ( ) . toJsonTree ( updateCredentialsOptions . credentialDetails ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Credentials . class ) ) ; }
Update credentials .
26,110
public ServiceCall < Gateway > createGateway ( CreateGatewayOptions createGatewayOptions ) { Validator . notNull ( createGatewayOptions , "createGatewayOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "gateways" } ; String [ ] pathParameters = { createGatewayOptions . environmentId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "createGateway" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( createGatewayOptions . name ( ) != null ) { contentJson . addProperty ( "name" , createGatewayOptions . name ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Gateway . class ) ) ; }
Create Gateway .
26,111
public ServiceCall < Gateway > getGateway ( GetGatewayOptions getGatewayOptions ) { Validator . notNull ( getGatewayOptions , "getGatewayOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "gateways" } ; String [ ] pathParameters = { getGatewayOptions . environmentId ( ) , getGatewayOptions . gatewayId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "getGateway" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Gateway . class ) ) ; }
List Gateway Details .
26,112
public ServiceCall < GatewayList > listGateways ( ListGatewaysOptions listGatewaysOptions ) { Validator . notNull ( listGatewaysOptions , "listGatewaysOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "gateways" } ; String [ ] pathParameters = { listGatewaysOptions . environmentId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "listGateways" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( GatewayList . class ) ) ; }
List Gateways .
26,113
public ServiceCall < SpeechModel > getModel ( GetModelOptions getModelOptions ) { Validator . notNull ( getModelOptions , "getModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/models" } ; String [ ] pathParameters = { getModelOptions . modelId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "getModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( SpeechModel . class ) ) ; }
Get a model .
26,114
public WebSocket recognizeUsingWebSocket ( RecognizeOptions recognizeOptions , RecognizeCallback callback ) { Validator . notNull ( recognizeOptions , "recognizeOptions cannot be null" ) ; Validator . notNull ( recognizeOptions . audio ( ) , "audio cannot be null" ) ; Validator . notNull ( callback , "callback cannot be null" ) ; HttpUrl . Builder urlBuilder = HttpUrl . parse ( getEndPoint ( ) + "/v1/recognize" ) . newBuilder ( ) ; if ( recognizeOptions . model ( ) != null ) { urlBuilder . addQueryParameter ( "model" , recognizeOptions . model ( ) ) ; } if ( recognizeOptions . customizationId ( ) != null ) { urlBuilder . addQueryParameter ( "customization_id" , recognizeOptions . customizationId ( ) ) ; } if ( recognizeOptions . languageCustomizationId ( ) != null ) { urlBuilder . addQueryParameter ( "language_customization_id" , recognizeOptions . languageCustomizationId ( ) ) ; } if ( recognizeOptions . acousticCustomizationId ( ) != null ) { urlBuilder . addQueryParameter ( "acoustic_customization_id" , recognizeOptions . acousticCustomizationId ( ) ) ; } if ( recognizeOptions . baseModelVersion ( ) != null ) { urlBuilder . addQueryParameter ( "base_model_version" , recognizeOptions . baseModelVersion ( ) ) ; } String url = urlBuilder . toString ( ) . replace ( "https://" , "wss://" ) ; Request . Builder builder = new Request . Builder ( ) . url ( url ) ; setAuthentication ( builder ) ; setDefaultHeaders ( builder ) ; OkHttpClient client = configureHttpClient ( ) ; return client . newWebSocket ( builder . build ( ) , new SpeechToTextWebSocketListener ( recognizeOptions , callback ) ) ; }
Sends audio and returns transcription results for recognition requests over a WebSocket connection . Requests and responses are enabled over a single TCP connection that abstracts much of the complexity of the request to offer efficient implementation low latency high throughput and an asynchronous response . By default only final results are returned for any request ; to enable interim results set the interimResults parameter to true .
26,115
public ServiceCall < RecognitionJob > checkJob ( CheckJobOptions checkJobOptions ) { Validator . notNull ( checkJobOptions , "checkJobOptions cannot be null" ) ; String [ ] pathSegments = { "v1/recognitions" } ; String [ ] pathParameters = { checkJobOptions . id ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "checkJob" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( RecognitionJob . class ) ) ; }
Check a job .
26,116
public ServiceCall < RecognitionJobs > checkJobs ( CheckJobsOptions checkJobsOptions ) { String [ ] pathSegments = { "v1/recognitions" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "checkJobs" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( checkJobsOptions != null ) { } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( RecognitionJobs . class ) ) ; }
Check jobs .
26,117
public ServiceCall < Void > deleteJob ( DeleteJobOptions deleteJobOptions ) { Validator . notNull ( deleteJobOptions , "deleteJobOptions cannot be null" ) ; String [ ] pathSegments = { "v1/recognitions" } ; String [ ] pathParameters = { deleteJobOptions . id ( ) } ; RequestBuilder builder = RequestBuilder . delete ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "deleteJob" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Delete a job .
26,118
public ServiceCall < RegisterStatus > registerCallback ( RegisterCallbackOptions registerCallbackOptions ) { Validator . notNull ( registerCallbackOptions , "registerCallbackOptions cannot be null" ) ; String [ ] pathSegments = { "v1/register_callback" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "registerCallback" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; builder . query ( "callback_url" , registerCallbackOptions . callbackUrl ( ) ) ; if ( registerCallbackOptions . userSecret ( ) != null ) { builder . query ( "user_secret" , registerCallbackOptions . userSecret ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( RegisterStatus . class ) ) ; }
Register a callback .
26,119
public ServiceCall < Void > unregisterCallback ( UnregisterCallbackOptions unregisterCallbackOptions ) { Validator . notNull ( unregisterCallbackOptions , "unregisterCallbackOptions cannot be null" ) ; String [ ] pathSegments = { "v1/unregister_callback" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "unregisterCallback" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . query ( "callback_url" , unregisterCallbackOptions . callbackUrl ( ) ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Unregister a callback .
26,120
public ServiceCall < LanguageModel > createLanguageModel ( CreateLanguageModelOptions createLanguageModelOptions ) { Validator . notNull ( createLanguageModelOptions , "createLanguageModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "createLanguageModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "name" , createLanguageModelOptions . name ( ) ) ; contentJson . addProperty ( "base_model_name" , createLanguageModelOptions . baseModelName ( ) ) ; if ( createLanguageModelOptions . dialect ( ) != null ) { contentJson . addProperty ( "dialect" , createLanguageModelOptions . dialect ( ) ) ; } if ( createLanguageModelOptions . description ( ) != null ) { contentJson . addProperty ( "description" , createLanguageModelOptions . description ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( LanguageModel . class ) ) ; }
Create a custom language model .
26,121
public ServiceCall < Void > deleteLanguageModel ( DeleteLanguageModelOptions deleteLanguageModelOptions ) { Validator . notNull ( deleteLanguageModelOptions , "deleteLanguageModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" } ; String [ ] pathParameters = { deleteLanguageModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . delete ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "deleteLanguageModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Delete a custom language model .
26,122
public ServiceCall < LanguageModel > getLanguageModel ( GetLanguageModelOptions getLanguageModelOptions ) { Validator . notNull ( getLanguageModelOptions , "getLanguageModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" } ; String [ ] pathParameters = { getLanguageModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "getLanguageModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( LanguageModel . class ) ) ; }
Get a custom language model .
26,123
public ServiceCall < LanguageModels > listLanguageModels ( ListLanguageModelsOptions listLanguageModelsOptions ) { String [ ] pathSegments = { "v1/customizations" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "listLanguageModels" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listLanguageModelsOptions != null ) { if ( listLanguageModelsOptions . language ( ) != null ) { builder . query ( "language" , listLanguageModelsOptions . language ( ) ) ; } } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( LanguageModels . class ) ) ; }
List custom language models .
26,124
public ServiceCall < Void > trainLanguageModel ( TrainLanguageModelOptions trainLanguageModelOptions ) { Validator . notNull ( trainLanguageModelOptions , "trainLanguageModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "train" } ; String [ ] pathParameters = { trainLanguageModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "trainLanguageModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( trainLanguageModelOptions . wordTypeToAdd ( ) != null ) { builder . query ( "word_type_to_add" , trainLanguageModelOptions . wordTypeToAdd ( ) ) ; } if ( trainLanguageModelOptions . customizationWeight ( ) != null ) { builder . query ( "customization_weight" , String . valueOf ( trainLanguageModelOptions . customizationWeight ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Train a custom language model .
26,125
public ServiceCall < Void > addCorpus ( AddCorpusOptions addCorpusOptions ) { Validator . notNull ( addCorpusOptions , "addCorpusOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "corpora" } ; String [ ] pathParameters = { addCorpusOptions . customizationId ( ) , addCorpusOptions . corpusName ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "addCorpus" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( addCorpusOptions . allowOverwrite ( ) != null ) { builder . query ( "allow_overwrite" , String . valueOf ( addCorpusOptions . allowOverwrite ( ) ) ) ; } builder . body ( RequestUtils . inputStreamBody ( addCorpusOptions . corpusFile ( ) , "text/plain" ) ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Add a corpus .
26,126
public ServiceCall < Void > deleteCorpus ( DeleteCorpusOptions deleteCorpusOptions ) { Validator . notNull ( deleteCorpusOptions , "deleteCorpusOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "corpora" } ; String [ ] pathParameters = { deleteCorpusOptions . customizationId ( ) , deleteCorpusOptions . corpusName ( ) } ; RequestBuilder builder = RequestBuilder . delete ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "deleteCorpus" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Delete a corpus .
26,127
public ServiceCall < Corpus > getCorpus ( GetCorpusOptions getCorpusOptions ) { Validator . notNull ( getCorpusOptions , "getCorpusOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "corpora" } ; String [ ] pathParameters = { getCorpusOptions . customizationId ( ) , getCorpusOptions . corpusName ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "getCorpus" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Corpus . class ) ) ; }
Get a corpus .
26,128
public ServiceCall < Corpora > listCorpora ( ListCorporaOptions listCorporaOptions ) { Validator . notNull ( listCorporaOptions , "listCorporaOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "corpora" } ; String [ ] pathParameters = { listCorporaOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "listCorpora" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Corpora . class ) ) ; }
List corpora .
26,129
public ServiceCall < Void > addGrammar ( AddGrammarOptions addGrammarOptions ) { Validator . notNull ( addGrammarOptions , "addGrammarOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "grammars" } ; String [ ] pathParameters = { addGrammarOptions . customizationId ( ) , addGrammarOptions . grammarName ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "addGrammar" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; builder . header ( "Content-Type" , addGrammarOptions . contentType ( ) ) ; if ( addGrammarOptions . allowOverwrite ( ) != null ) { builder . query ( "allow_overwrite" , String . valueOf ( addGrammarOptions . allowOverwrite ( ) ) ) ; } builder . bodyContent ( addGrammarOptions . contentType ( ) , null , null , addGrammarOptions . grammarFile ( ) ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Add a grammar .
26,130
public ServiceCall < Void > deleteGrammar ( DeleteGrammarOptions deleteGrammarOptions ) { Validator . notNull ( deleteGrammarOptions , "deleteGrammarOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "grammars" } ; String [ ] pathParameters = { deleteGrammarOptions . customizationId ( ) , deleteGrammarOptions . grammarName ( ) } ; RequestBuilder builder = RequestBuilder . delete ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "deleteGrammar" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Delete a grammar .
26,131
public ServiceCall < Grammar > getGrammar ( GetGrammarOptions getGrammarOptions ) { Validator . notNull ( getGrammarOptions , "getGrammarOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "grammars" } ; String [ ] pathParameters = { getGrammarOptions . customizationId ( ) , getGrammarOptions . grammarName ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "getGrammar" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Grammar . class ) ) ; }
Get a grammar .
26,132
public ServiceCall < Grammars > listGrammars ( ListGrammarsOptions listGrammarsOptions ) { Validator . notNull ( listGrammarsOptions , "listGrammarsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" , "grammars" } ; String [ ] pathParameters = { listGrammarsOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "listGrammars" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Grammars . class ) ) ; }
List grammars .
26,133
public ServiceCall < AcousticModel > createAcousticModel ( CreateAcousticModelOptions createAcousticModelOptions ) { Validator . notNull ( createAcousticModelOptions , "createAcousticModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "createAcousticModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "name" , createAcousticModelOptions . name ( ) ) ; contentJson . addProperty ( "base_model_name" , createAcousticModelOptions . baseModelName ( ) ) ; if ( createAcousticModelOptions . description ( ) != null ) { contentJson . addProperty ( "description" , createAcousticModelOptions . description ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( AcousticModel . class ) ) ; }
Create a custom acoustic model .
26,134
public ServiceCall < AcousticModel > getAcousticModel ( GetAcousticModelOptions getAcousticModelOptions ) { Validator . notNull ( getAcousticModelOptions , "getAcousticModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" } ; String [ ] pathParameters = { getAcousticModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "getAcousticModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( AcousticModel . class ) ) ; }
Get a custom acoustic model .
26,135
public ServiceCall < AcousticModels > listAcousticModels ( ListAcousticModelsOptions listAcousticModelsOptions ) { String [ ] pathSegments = { "v1/acoustic_customizations" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "listAcousticModels" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listAcousticModelsOptions != null ) { if ( listAcousticModelsOptions . language ( ) != null ) { builder . query ( "language" , listAcousticModelsOptions . language ( ) ) ; } } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( AcousticModels . class ) ) ; }
List custom acoustic models .
26,136
public ServiceCall < Void > resetAcousticModel ( ResetAcousticModelOptions resetAcousticModelOptions ) { Validator . notNull ( resetAcousticModelOptions , "resetAcousticModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" , "reset" } ; String [ ] pathParameters = { resetAcousticModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "resetAcousticModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Reset a custom acoustic model .
26,137
public ServiceCall < Void > trainAcousticModel ( TrainAcousticModelOptions trainAcousticModelOptions ) { Validator . notNull ( trainAcousticModelOptions , "trainAcousticModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" , "train" } ; String [ ] pathParameters = { trainAcousticModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "trainAcousticModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( trainAcousticModelOptions . customLanguageModelId ( ) != null ) { builder . query ( "custom_language_model_id" , trainAcousticModelOptions . customLanguageModelId ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Train a custom acoustic model .
26,138
public ServiceCall < Void > upgradeAcousticModel ( UpgradeAcousticModelOptions upgradeAcousticModelOptions ) { Validator . notNull ( upgradeAcousticModelOptions , "upgradeAcousticModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" , "upgrade_model" } ; String [ ] pathParameters = { upgradeAcousticModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "upgradeAcousticModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( upgradeAcousticModelOptions . customLanguageModelId ( ) != null ) { builder . query ( "custom_language_model_id" , upgradeAcousticModelOptions . customLanguageModelId ( ) ) ; } if ( upgradeAcousticModelOptions . force ( ) != null ) { builder . query ( "force" , String . valueOf ( upgradeAcousticModelOptions . force ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Upgrade a custom acoustic model .
26,139
public ServiceCall < Void > addAudio ( AddAudioOptions addAudioOptions ) { Validator . notNull ( addAudioOptions , "addAudioOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" , "audio" } ; String [ ] pathParameters = { addAudioOptions . customizationId ( ) , addAudioOptions . audioName ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "addAudio" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( addAudioOptions . containedContentType ( ) != null ) { builder . header ( "Contained-Content-Type" , addAudioOptions . containedContentType ( ) ) ; } if ( addAudioOptions . contentType ( ) != null ) { builder . header ( "Content-Type" , addAudioOptions . contentType ( ) ) ; } if ( addAudioOptions . allowOverwrite ( ) != null ) { builder . query ( "allow_overwrite" , String . valueOf ( addAudioOptions . allowOverwrite ( ) ) ) ; } builder . bodyContent ( addAudioOptions . contentType ( ) , null , null , addAudioOptions . audioResource ( ) ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Add an audio resource .
26,140
public ServiceCall < Void > deleteAudio ( DeleteAudioOptions deleteAudioOptions ) { Validator . notNull ( deleteAudioOptions , "deleteAudioOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" , "audio" } ; String [ ] pathParameters = { deleteAudioOptions . customizationId ( ) , deleteAudioOptions . audioName ( ) } ; RequestBuilder builder = RequestBuilder . delete ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "deleteAudio" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Delete an audio resource .
26,141
public ServiceCall < AudioListing > getAudio ( GetAudioOptions getAudioOptions ) { Validator . notNull ( getAudioOptions , "getAudioOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" , "audio" } ; String [ ] pathParameters = { getAudioOptions . customizationId ( ) , getAudioOptions . audioName ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "getAudio" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( AudioListing . class ) ) ; }
Get an audio resource .
26,142
public ServiceCall < AudioResources > listAudio ( ListAudioOptions listAudioOptions ) { Validator . notNull ( listAudioOptions , "listAudioOptions cannot be null" ) ; String [ ] pathSegments = { "v1/acoustic_customizations" , "audio" } ; String [ ] pathParameters = { listAudioOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "speech_to_text" , "v1" , "listAudio" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( AudioResources . class ) ) ; }
List audio resources .
26,143
public ServiceCall < MessageResponse > message ( MessageOptions messageOptions ) { Validator . notNull ( messageOptions , "messageOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "message" } ; String [ ] pathParameters = { messageOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "message" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( messageOptions . nodesVisitedDetails ( ) != null ) { builder . query ( "nodes_visited_details" , String . valueOf ( messageOptions . nodesVisitedDetails ( ) ) ) ; } final JsonObject contentJson = new JsonObject ( ) ; if ( messageOptions . input ( ) != null ) { contentJson . add ( "input" , GsonSingleton . getGson ( ) . toJsonTree ( messageOptions . input ( ) ) ) ; } if ( messageOptions . intents ( ) != null ) { contentJson . add ( "intents" , GsonSingleton . getGson ( ) . toJsonTree ( messageOptions . intents ( ) ) ) ; } if ( messageOptions . entities ( ) != null ) { contentJson . add ( "entities" , GsonSingleton . getGson ( ) . toJsonTree ( messageOptions . entities ( ) ) ) ; } if ( messageOptions . alternateIntents ( ) != null ) { contentJson . addProperty ( "alternate_intents" , messageOptions . alternateIntents ( ) ) ; } if ( messageOptions . context ( ) != null ) { contentJson . add ( "context" , GsonSingleton . getGson ( ) . toJsonTree ( messageOptions . context ( ) ) ) ; } if ( messageOptions . output ( ) != null ) { contentJson . add ( "output" , GsonSingleton . getGson ( ) . toJsonTree ( messageOptions . output ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( MessageResponse . class ) ) ; }
Get response to user input .
26,144
public ServiceCall < Workspace > createWorkspace ( CreateWorkspaceOptions createWorkspaceOptions ) { String [ ] pathSegments = { "v1/workspaces" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "createWorkspace" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( createWorkspaceOptions != null ) { final JsonObject contentJson = new JsonObject ( ) ; if ( createWorkspaceOptions . name ( ) != null ) { contentJson . addProperty ( "name" , createWorkspaceOptions . name ( ) ) ; } if ( createWorkspaceOptions . description ( ) != null ) { contentJson . addProperty ( "description" , createWorkspaceOptions . description ( ) ) ; } if ( createWorkspaceOptions . language ( ) != null ) { contentJson . addProperty ( "language" , createWorkspaceOptions . language ( ) ) ; } if ( createWorkspaceOptions . metadata ( ) != null ) { contentJson . add ( "metadata" , GsonSingleton . getGson ( ) . toJsonTree ( createWorkspaceOptions . metadata ( ) ) ) ; } if ( createWorkspaceOptions . learningOptOut ( ) != null ) { contentJson . addProperty ( "learning_opt_out" , createWorkspaceOptions . learningOptOut ( ) ) ; } if ( createWorkspaceOptions . systemSettings ( ) != null ) { contentJson . add ( "system_settings" , GsonSingleton . getGson ( ) . toJsonTree ( createWorkspaceOptions . systemSettings ( ) ) ) ; } if ( createWorkspaceOptions . intents ( ) != null ) { contentJson . add ( "intents" , GsonSingleton . getGson ( ) . toJsonTree ( createWorkspaceOptions . intents ( ) ) ) ; } if ( createWorkspaceOptions . entities ( ) != null ) { contentJson . add ( "entities" , GsonSingleton . getGson ( ) . toJsonTree ( createWorkspaceOptions . entities ( ) ) ) ; } if ( createWorkspaceOptions . dialogNodes ( ) != null ) { contentJson . add ( "dialog_nodes" , GsonSingleton . getGson ( ) . toJsonTree ( createWorkspaceOptions . dialogNodes ( ) ) ) ; } if ( createWorkspaceOptions . counterexamples ( ) != null ) { contentJson . add ( "counterexamples" , GsonSingleton . getGson ( ) . toJsonTree ( createWorkspaceOptions . counterexamples ( ) ) ) ; } builder . bodyJson ( contentJson ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Workspace . class ) ) ; }
Create workspace .
26,145
public ServiceCall < Workspace > getWorkspace ( GetWorkspaceOptions getWorkspaceOptions ) { Validator . notNull ( getWorkspaceOptions , "getWorkspaceOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" } ; String [ ] pathParameters = { getWorkspaceOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getWorkspace" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getWorkspaceOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( getWorkspaceOptions . export ( ) ) ) ; } if ( getWorkspaceOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getWorkspaceOptions . includeAudit ( ) ) ) ; } if ( getWorkspaceOptions . sort ( ) != null ) { builder . query ( "sort" , getWorkspaceOptions . sort ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Workspace . class ) ) ; }
Get information about a workspace .
26,146
public ServiceCall < WorkspaceCollection > listWorkspaces ( ListWorkspacesOptions listWorkspacesOptions ) { String [ ] pathSegments = { "v1/workspaces" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listWorkspaces" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listWorkspacesOptions != null ) { if ( listWorkspacesOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listWorkspacesOptions . pageLimit ( ) ) ) ; } if ( listWorkspacesOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listWorkspacesOptions . includeCount ( ) ) ) ; } if ( listWorkspacesOptions . sort ( ) != null ) { builder . query ( "sort" , listWorkspacesOptions . sort ( ) ) ; } if ( listWorkspacesOptions . cursor ( ) != null ) { builder . query ( "cursor" , listWorkspacesOptions . cursor ( ) ) ; } if ( listWorkspacesOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listWorkspacesOptions . includeAudit ( ) ) ) ; } } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( WorkspaceCollection . class ) ) ; }
List workspaces .
26,147
public ServiceCall < Workspace > updateWorkspace ( UpdateWorkspaceOptions updateWorkspaceOptions ) { Validator . notNull ( updateWorkspaceOptions , "updateWorkspaceOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" } ; String [ ] pathParameters = { updateWorkspaceOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateWorkspace" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( updateWorkspaceOptions . append ( ) != null ) { builder . query ( "append" , String . valueOf ( updateWorkspaceOptions . append ( ) ) ) ; } final JsonObject contentJson = new JsonObject ( ) ; if ( updateWorkspaceOptions . name ( ) != null ) { contentJson . addProperty ( "name" , updateWorkspaceOptions . name ( ) ) ; } if ( updateWorkspaceOptions . description ( ) != null ) { contentJson . addProperty ( "description" , updateWorkspaceOptions . description ( ) ) ; } if ( updateWorkspaceOptions . language ( ) != null ) { contentJson . addProperty ( "language" , updateWorkspaceOptions . language ( ) ) ; } if ( updateWorkspaceOptions . metadata ( ) != null ) { contentJson . add ( "metadata" , GsonSingleton . getGson ( ) . toJsonTree ( updateWorkspaceOptions . metadata ( ) ) ) ; } if ( updateWorkspaceOptions . learningOptOut ( ) != null ) { contentJson . addProperty ( "learning_opt_out" , updateWorkspaceOptions . learningOptOut ( ) ) ; } if ( updateWorkspaceOptions . systemSettings ( ) != null ) { contentJson . add ( "system_settings" , GsonSingleton . getGson ( ) . toJsonTree ( updateWorkspaceOptions . systemSettings ( ) ) ) ; } if ( updateWorkspaceOptions . intents ( ) != null ) { contentJson . add ( "intents" , GsonSingleton . getGson ( ) . toJsonTree ( updateWorkspaceOptions . intents ( ) ) ) ; } if ( updateWorkspaceOptions . entities ( ) != null ) { contentJson . add ( "entities" , GsonSingleton . getGson ( ) . toJsonTree ( updateWorkspaceOptions . entities ( ) ) ) ; } if ( updateWorkspaceOptions . dialogNodes ( ) != null ) { contentJson . add ( "dialog_nodes" , GsonSingleton . getGson ( ) . toJsonTree ( updateWorkspaceOptions . dialogNodes ( ) ) ) ; } if ( updateWorkspaceOptions . counterexamples ( ) != null ) { contentJson . add ( "counterexamples" , GsonSingleton . getGson ( ) . toJsonTree ( updateWorkspaceOptions . counterexamples ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Workspace . class ) ) ; }
Update workspace .
26,148
public ServiceCall < Intent > createIntent ( CreateIntentOptions createIntentOptions ) { Validator . notNull ( createIntentOptions , "createIntentOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "intents" } ; String [ ] pathParameters = { createIntentOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "createIntent" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "intent" , createIntentOptions . intent ( ) ) ; if ( createIntentOptions . description ( ) != null ) { contentJson . addProperty ( "description" , createIntentOptions . description ( ) ) ; } if ( createIntentOptions . examples ( ) != null ) { contentJson . add ( "examples" , GsonSingleton . getGson ( ) . toJsonTree ( createIntentOptions . examples ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Intent . class ) ) ; }
Create intent .
26,149
public ServiceCall < Intent > getIntent ( GetIntentOptions getIntentOptions ) { Validator . notNull ( getIntentOptions , "getIntentOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "intents" } ; String [ ] pathParameters = { getIntentOptions . workspaceId ( ) , getIntentOptions . intent ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getIntent" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getIntentOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( getIntentOptions . export ( ) ) ) ; } if ( getIntentOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getIntentOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Intent . class ) ) ; }
Get intent .
26,150
public ServiceCall < IntentCollection > listIntents ( ListIntentsOptions listIntentsOptions ) { Validator . notNull ( listIntentsOptions , "listIntentsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "intents" } ; String [ ] pathParameters = { listIntentsOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listIntents" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listIntentsOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( listIntentsOptions . export ( ) ) ) ; } if ( listIntentsOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listIntentsOptions . pageLimit ( ) ) ) ; } if ( listIntentsOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listIntentsOptions . includeCount ( ) ) ) ; } if ( listIntentsOptions . sort ( ) != null ) { builder . query ( "sort" , listIntentsOptions . sort ( ) ) ; } if ( listIntentsOptions . cursor ( ) != null ) { builder . query ( "cursor" , listIntentsOptions . cursor ( ) ) ; } if ( listIntentsOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listIntentsOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( IntentCollection . class ) ) ; }
List intents .
26,151
public ServiceCall < Intent > updateIntent ( UpdateIntentOptions updateIntentOptions ) { Validator . notNull ( updateIntentOptions , "updateIntentOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "intents" } ; String [ ] pathParameters = { updateIntentOptions . workspaceId ( ) , updateIntentOptions . intent ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateIntent" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateIntentOptions . newIntent ( ) != null ) { contentJson . addProperty ( "intent" , updateIntentOptions . newIntent ( ) ) ; } if ( updateIntentOptions . newDescription ( ) != null ) { contentJson . addProperty ( "description" , updateIntentOptions . newDescription ( ) ) ; } if ( updateIntentOptions . newExamples ( ) != null ) { contentJson . add ( "examples" , GsonSingleton . getGson ( ) . toJsonTree ( updateIntentOptions . newExamples ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Intent . class ) ) ; }
Update intent .
26,152
public ServiceCall < Example > createExample ( CreateExampleOptions createExampleOptions ) { Validator . notNull ( createExampleOptions , "createExampleOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "intents" , "examples" } ; String [ ] pathParameters = { createExampleOptions . workspaceId ( ) , createExampleOptions . intent ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "createExample" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "text" , createExampleOptions . text ( ) ) ; if ( createExampleOptions . mentions ( ) != null ) { contentJson . add ( "mentions" , GsonSingleton . getGson ( ) . toJsonTree ( createExampleOptions . mentions ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Example . class ) ) ; }
Create user input example .
26,153
public ServiceCall < Example > getExample ( GetExampleOptions getExampleOptions ) { Validator . notNull ( getExampleOptions , "getExampleOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "intents" , "examples" } ; String [ ] pathParameters = { getExampleOptions . workspaceId ( ) , getExampleOptions . intent ( ) , getExampleOptions . text ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getExample" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getExampleOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getExampleOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Example . class ) ) ; }
Get user input example .
26,154
public ServiceCall < ExampleCollection > listExamples ( ListExamplesOptions listExamplesOptions ) { Validator . notNull ( listExamplesOptions , "listExamplesOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "intents" , "examples" } ; String [ ] pathParameters = { listExamplesOptions . workspaceId ( ) , listExamplesOptions . intent ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listExamples" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listExamplesOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listExamplesOptions . pageLimit ( ) ) ) ; } if ( listExamplesOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listExamplesOptions . includeCount ( ) ) ) ; } if ( listExamplesOptions . sort ( ) != null ) { builder . query ( "sort" , listExamplesOptions . sort ( ) ) ; } if ( listExamplesOptions . cursor ( ) != null ) { builder . query ( "cursor" , listExamplesOptions . cursor ( ) ) ; } if ( listExamplesOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listExamplesOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( ExampleCollection . class ) ) ; }
List user input examples .
26,155
public ServiceCall < Counterexample > getCounterexample ( GetCounterexampleOptions getCounterexampleOptions ) { Validator . notNull ( getCounterexampleOptions , "getCounterexampleOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "counterexamples" } ; String [ ] pathParameters = { getCounterexampleOptions . workspaceId ( ) , getCounterexampleOptions . text ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getCounterexample" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getCounterexampleOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getCounterexampleOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Counterexample . class ) ) ; }
Get counterexample .
26,156
public ServiceCall < CounterexampleCollection > listCounterexamples ( ListCounterexamplesOptions listCounterexamplesOptions ) { Validator . notNull ( listCounterexamplesOptions , "listCounterexamplesOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "counterexamples" } ; String [ ] pathParameters = { listCounterexamplesOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listCounterexamples" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listCounterexamplesOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listCounterexamplesOptions . pageLimit ( ) ) ) ; } if ( listCounterexamplesOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listCounterexamplesOptions . includeCount ( ) ) ) ; } if ( listCounterexamplesOptions . sort ( ) != null ) { builder . query ( "sort" , listCounterexamplesOptions . sort ( ) ) ; } if ( listCounterexamplesOptions . cursor ( ) != null ) { builder . query ( "cursor" , listCounterexamplesOptions . cursor ( ) ) ; } if ( listCounterexamplesOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listCounterexamplesOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( CounterexampleCollection . class ) ) ; }
List counterexamples .
26,157
public ServiceCall < Counterexample > updateCounterexample ( UpdateCounterexampleOptions updateCounterexampleOptions ) { Validator . notNull ( updateCounterexampleOptions , "updateCounterexampleOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "counterexamples" } ; String [ ] pathParameters = { updateCounterexampleOptions . workspaceId ( ) , updateCounterexampleOptions . text ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateCounterexample" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateCounterexampleOptions . newText ( ) != null ) { contentJson . addProperty ( "text" , updateCounterexampleOptions . newText ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Counterexample . class ) ) ; }
Update counterexample .
26,158
public ServiceCall < Entity > createEntity ( CreateEntityOptions createEntityOptions ) { Validator . notNull ( createEntityOptions , "createEntityOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" } ; String [ ] pathParameters = { createEntityOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "createEntity" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "entity" , createEntityOptions . entity ( ) ) ; if ( createEntityOptions . description ( ) != null ) { contentJson . addProperty ( "description" , createEntityOptions . description ( ) ) ; } if ( createEntityOptions . metadata ( ) != null ) { contentJson . add ( "metadata" , GsonSingleton . getGson ( ) . toJsonTree ( createEntityOptions . metadata ( ) ) ) ; } if ( createEntityOptions . fuzzyMatch ( ) != null ) { contentJson . addProperty ( "fuzzy_match" , createEntityOptions . fuzzyMatch ( ) ) ; } if ( createEntityOptions . values ( ) != null ) { contentJson . add ( "values" , GsonSingleton . getGson ( ) . toJsonTree ( createEntityOptions . values ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Entity . class ) ) ; }
Create entity .
26,159
public ServiceCall < Entity > getEntity ( GetEntityOptions getEntityOptions ) { Validator . notNull ( getEntityOptions , "getEntityOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" } ; String [ ] pathParameters = { getEntityOptions . workspaceId ( ) , getEntityOptions . entity ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getEntity" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getEntityOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( getEntityOptions . export ( ) ) ) ; } if ( getEntityOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getEntityOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Entity . class ) ) ; }
Get entity .
26,160
public ServiceCall < EntityCollection > listEntities ( ListEntitiesOptions listEntitiesOptions ) { Validator . notNull ( listEntitiesOptions , "listEntitiesOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" } ; String [ ] pathParameters = { listEntitiesOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listEntities" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listEntitiesOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( listEntitiesOptions . export ( ) ) ) ; } if ( listEntitiesOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listEntitiesOptions . pageLimit ( ) ) ) ; } if ( listEntitiesOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listEntitiesOptions . includeCount ( ) ) ) ; } if ( listEntitiesOptions . sort ( ) != null ) { builder . query ( "sort" , listEntitiesOptions . sort ( ) ) ; } if ( listEntitiesOptions . cursor ( ) != null ) { builder . query ( "cursor" , listEntitiesOptions . cursor ( ) ) ; } if ( listEntitiesOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listEntitiesOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( EntityCollection . class ) ) ; }
List entities .
26,161
public ServiceCall < Entity > updateEntity ( UpdateEntityOptions updateEntityOptions ) { Validator . notNull ( updateEntityOptions , "updateEntityOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" } ; String [ ] pathParameters = { updateEntityOptions . workspaceId ( ) , updateEntityOptions . entity ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateEntity" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateEntityOptions . newEntity ( ) != null ) { contentJson . addProperty ( "entity" , updateEntityOptions . newEntity ( ) ) ; } if ( updateEntityOptions . newDescription ( ) != null ) { contentJson . addProperty ( "description" , updateEntityOptions . newDescription ( ) ) ; } if ( updateEntityOptions . newMetadata ( ) != null ) { contentJson . add ( "metadata" , GsonSingleton . getGson ( ) . toJsonTree ( updateEntityOptions . newMetadata ( ) ) ) ; } if ( updateEntityOptions . newFuzzyMatch ( ) != null ) { contentJson . addProperty ( "fuzzy_match" , updateEntityOptions . newFuzzyMatch ( ) ) ; } if ( updateEntityOptions . newValues ( ) != null ) { contentJson . add ( "values" , GsonSingleton . getGson ( ) . toJsonTree ( updateEntityOptions . newValues ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Entity . class ) ) ; }
Update entity .
26,162
public ServiceCall < Value > createValue ( CreateValueOptions createValueOptions ) { Validator . notNull ( createValueOptions , "createValueOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" } ; String [ ] pathParameters = { createValueOptions . workspaceId ( ) , createValueOptions . entity ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "createValue" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "value" , createValueOptions . value ( ) ) ; if ( createValueOptions . metadata ( ) != null ) { contentJson . add ( "metadata" , GsonSingleton . getGson ( ) . toJsonTree ( createValueOptions . metadata ( ) ) ) ; } if ( createValueOptions . valueType ( ) != null ) { contentJson . addProperty ( "type" , createValueOptions . valueType ( ) ) ; } if ( createValueOptions . synonyms ( ) != null ) { contentJson . add ( "synonyms" , GsonSingleton . getGson ( ) . toJsonTree ( createValueOptions . synonyms ( ) ) ) ; } if ( createValueOptions . patterns ( ) != null ) { contentJson . add ( "patterns" , GsonSingleton . getGson ( ) . toJsonTree ( createValueOptions . patterns ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Value . class ) ) ; }
Create entity value .
26,163
public ServiceCall < Void > deleteValue ( DeleteValueOptions deleteValueOptions ) { Validator . notNull ( deleteValueOptions , "deleteValueOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" } ; String [ ] pathParameters = { deleteValueOptions . workspaceId ( ) , deleteValueOptions . entity ( ) , deleteValueOptions . value ( ) } ; RequestBuilder builder = RequestBuilder . delete ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "deleteValue" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Delete entity value .
26,164
public ServiceCall < Value > getValue ( GetValueOptions getValueOptions ) { Validator . notNull ( getValueOptions , "getValueOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" } ; String [ ] pathParameters = { getValueOptions . workspaceId ( ) , getValueOptions . entity ( ) , getValueOptions . value ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getValue" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getValueOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( getValueOptions . export ( ) ) ) ; } if ( getValueOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getValueOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Value . class ) ) ; }
Get entity value .
26,165
public ServiceCall < ValueCollection > listValues ( ListValuesOptions listValuesOptions ) { Validator . notNull ( listValuesOptions , "listValuesOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" } ; String [ ] pathParameters = { listValuesOptions . workspaceId ( ) , listValuesOptions . entity ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listValues" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listValuesOptions . export ( ) != null ) { builder . query ( "export" , String . valueOf ( listValuesOptions . export ( ) ) ) ; } if ( listValuesOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listValuesOptions . pageLimit ( ) ) ) ; } if ( listValuesOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listValuesOptions . includeCount ( ) ) ) ; } if ( listValuesOptions . sort ( ) != null ) { builder . query ( "sort" , listValuesOptions . sort ( ) ) ; } if ( listValuesOptions . cursor ( ) != null ) { builder . query ( "cursor" , listValuesOptions . cursor ( ) ) ; } if ( listValuesOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listValuesOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( ValueCollection . class ) ) ; }
List entity values .
26,166
public ServiceCall < Value > updateValue ( UpdateValueOptions updateValueOptions ) { Validator . notNull ( updateValueOptions , "updateValueOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" } ; String [ ] pathParameters = { updateValueOptions . workspaceId ( ) , updateValueOptions . entity ( ) , updateValueOptions . value ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateValue" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateValueOptions . newValue ( ) != null ) { contentJson . addProperty ( "value" , updateValueOptions . newValue ( ) ) ; } if ( updateValueOptions . newMetadata ( ) != null ) { contentJson . add ( "metadata" , GsonSingleton . getGson ( ) . toJsonTree ( updateValueOptions . newMetadata ( ) ) ) ; } if ( updateValueOptions . valueType ( ) != null ) { contentJson . addProperty ( "type" , updateValueOptions . valueType ( ) ) ; } if ( updateValueOptions . newSynonyms ( ) != null ) { contentJson . add ( "synonyms" , GsonSingleton . getGson ( ) . toJsonTree ( updateValueOptions . newSynonyms ( ) ) ) ; } if ( updateValueOptions . newPatterns ( ) != null ) { contentJson . add ( "patterns" , GsonSingleton . getGson ( ) . toJsonTree ( updateValueOptions . newPatterns ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Value . class ) ) ; }
Update entity value .
26,167
public ServiceCall < Synonym > getSynonym ( GetSynonymOptions getSynonymOptions ) { Validator . notNull ( getSynonymOptions , "getSynonymOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" , "synonyms" } ; String [ ] pathParameters = { getSynonymOptions . workspaceId ( ) , getSynonymOptions . entity ( ) , getSynonymOptions . value ( ) , getSynonymOptions . synonym ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getSynonym" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getSynonymOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getSynonymOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Synonym . class ) ) ; }
Get entity value synonym .
26,168
public ServiceCall < SynonymCollection > listSynonyms ( ListSynonymsOptions listSynonymsOptions ) { Validator . notNull ( listSynonymsOptions , "listSynonymsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" , "synonyms" } ; String [ ] pathParameters = { listSynonymsOptions . workspaceId ( ) , listSynonymsOptions . entity ( ) , listSynonymsOptions . value ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listSynonyms" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listSynonymsOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listSynonymsOptions . pageLimit ( ) ) ) ; } if ( listSynonymsOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listSynonymsOptions . includeCount ( ) ) ) ; } if ( listSynonymsOptions . sort ( ) != null ) { builder . query ( "sort" , listSynonymsOptions . sort ( ) ) ; } if ( listSynonymsOptions . cursor ( ) != null ) { builder . query ( "cursor" , listSynonymsOptions . cursor ( ) ) ; } if ( listSynonymsOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listSynonymsOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( SynonymCollection . class ) ) ; }
List entity value synonyms .
26,169
public ServiceCall < Synonym > updateSynonym ( UpdateSynonymOptions updateSynonymOptions ) { Validator . notNull ( updateSynonymOptions , "updateSynonymOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" , "synonyms" } ; String [ ] pathParameters = { updateSynonymOptions . workspaceId ( ) , updateSynonymOptions . entity ( ) , updateSynonymOptions . value ( ) , updateSynonymOptions . synonym ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateSynonym" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateSynonymOptions . newSynonym ( ) != null ) { contentJson . addProperty ( "synonym" , updateSynonymOptions . newSynonym ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Synonym . class ) ) ; }
Update entity value synonym .
26,170
public ServiceCall < DialogNode > getDialogNode ( GetDialogNodeOptions getDialogNodeOptions ) { Validator . notNull ( getDialogNodeOptions , "getDialogNodeOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "dialog_nodes" } ; String [ ] pathParameters = { getDialogNodeOptions . workspaceId ( ) , getDialogNodeOptions . dialogNode ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "getDialogNode" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( getDialogNodeOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( getDialogNodeOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( DialogNode . class ) ) ; }
Get dialog node .
26,171
public ServiceCall < DialogNodeCollection > listDialogNodes ( ListDialogNodesOptions listDialogNodesOptions ) { Validator . notNull ( listDialogNodesOptions , "listDialogNodesOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "dialog_nodes" } ; String [ ] pathParameters = { listDialogNodesOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listDialogNodes" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listDialogNodesOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listDialogNodesOptions . pageLimit ( ) ) ) ; } if ( listDialogNodesOptions . includeCount ( ) != null ) { builder . query ( "include_count" , String . valueOf ( listDialogNodesOptions . includeCount ( ) ) ) ; } if ( listDialogNodesOptions . sort ( ) != null ) { builder . query ( "sort" , listDialogNodesOptions . sort ( ) ) ; } if ( listDialogNodesOptions . cursor ( ) != null ) { builder . query ( "cursor" , listDialogNodesOptions . cursor ( ) ) ; } if ( listDialogNodesOptions . includeAudit ( ) != null ) { builder . query ( "include_audit" , String . valueOf ( listDialogNodesOptions . includeAudit ( ) ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( DialogNodeCollection . class ) ) ; }
List dialog nodes .
26,172
public ServiceCall < LogCollection > listAllLogs ( ListAllLogsOptions listAllLogsOptions ) { Validator . notNull ( listAllLogsOptions , "listAllLogsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/logs" } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listAllLogs" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; builder . query ( "filter" , listAllLogsOptions . filter ( ) ) ; if ( listAllLogsOptions . sort ( ) != null ) { builder . query ( "sort" , listAllLogsOptions . sort ( ) ) ; } if ( listAllLogsOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listAllLogsOptions . pageLimit ( ) ) ) ; } if ( listAllLogsOptions . cursor ( ) != null ) { builder . query ( "cursor" , listAllLogsOptions . cursor ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( LogCollection . class ) ) ; }
List log events in all workspaces .
26,173
public ServiceCall < LogCollection > listLogs ( ListLogsOptions listLogsOptions ) { Validator . notNull ( listLogsOptions , "listLogsOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "logs" } ; String [ ] pathParameters = { listLogsOptions . workspaceId ( ) } ; RequestBuilder builder = RequestBuilder . get ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "listLogs" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( listLogsOptions . sort ( ) != null ) { builder . query ( "sort" , listLogsOptions . sort ( ) ) ; } if ( listLogsOptions . filter ( ) != null ) { builder . query ( "filter" , listLogsOptions . filter ( ) ) ; } if ( listLogsOptions . pageLimit ( ) != null ) { builder . query ( "page_limit" , String . valueOf ( listLogsOptions . pageLimit ( ) ) ) ; } if ( listLogsOptions . cursor ( ) != null ) { builder . query ( "cursor" , listLogsOptions . cursor ( ) ) ; } return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( LogCollection . class ) ) ; }
List log events in a workspace .
26,174
public ServiceCall < ToneAnalysis > tone ( ToneOptions toneOptions ) { Validator . notNull ( toneOptions , "toneOptions cannot be null" ) ; String [ ] pathSegments = { "v3/tone" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "tone_analyzer" , "v3" , "tone" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( toneOptions . contentLanguage ( ) != null ) { builder . header ( "Content-Language" , toneOptions . contentLanguage ( ) ) ; } if ( toneOptions . acceptLanguage ( ) != null ) { builder . header ( "Accept-Language" , toneOptions . acceptLanguage ( ) ) ; } if ( toneOptions . contentType ( ) != null ) { builder . header ( "Content-Type" , toneOptions . contentType ( ) ) ; } if ( toneOptions . sentences ( ) != null ) { builder . query ( "sentences" , String . valueOf ( toneOptions . sentences ( ) ) ) ; } if ( toneOptions . tones ( ) != null ) { builder . query ( "tones" , RequestUtils . join ( toneOptions . tones ( ) , "," ) ) ; } builder . bodyContent ( toneOptions . contentType ( ) , toneOptions . toneInput ( ) , null , toneOptions . body ( ) ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( ToneAnalysis . class ) ) ; }
Analyze general tone .
26,175
public ServiceCall < UtteranceAnalyses > toneChat ( ToneChatOptions toneChatOptions ) { Validator . notNull ( toneChatOptions , "toneChatOptions cannot be null" ) ; String [ ] pathSegments = { "v3/tone_chat" } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "tone_analyzer" , "v3" , "toneChat" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; if ( toneChatOptions . contentLanguage ( ) != null ) { builder . header ( "Content-Language" , toneChatOptions . contentLanguage ( ) ) ; } if ( toneChatOptions . acceptLanguage ( ) != null ) { builder . header ( "Accept-Language" , toneChatOptions . acceptLanguage ( ) ) ; } final JsonObject contentJson = new JsonObject ( ) ; contentJson . add ( "utterances" , GsonSingleton . getGson ( ) . toJsonTree ( toneChatOptions . utterances ( ) ) ) ; builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( UtteranceAnalyses . class ) ) ; }
Analyze customer engagement tone .
26,176
public String getName ( String oldName ) { if ( oldName != null && this . existing . containsKey ( oldName ) ) { return this . existing . get ( oldName ) ; } final String name = this . prefix + this . counter ; this . counter ++ ; if ( oldName != null ) { this . existing . put ( oldName , name ) ; } return name ; }
Gets the new name for the given old name where if no old name is given a new name will be generated .
26,177
static boolean isNode ( Object v ) { if ( v instanceof Map && ! ( ( ( Map ) v ) . containsKey ( "@value" ) || ( ( Map ) v ) . containsKey ( "@set" ) || ( ( Map ) v ) . containsKey ( "@list" ) ) ) { return ( ( Map < String , Object > ) v ) . size ( ) > 1 || ! ( ( Map ) v ) . containsKey ( "@id" ) ; } return false ; }
Returns true if the given value is a subject with properties .
26,178
static boolean isNodeReference ( Object v ) { return ( v instanceof Map && ( ( Map < String , Object > ) v ) . size ( ) == 1 && ( ( Map < String , Object > ) v ) . containsKey ( "@id" ) ) ; }
Returns true if the given value is a subject reference .
26,179
static void fillNodesToPrune ( Object input , final Map < String , Object > toPrune ) { if ( isArray ( input ) ) { for ( final Object i : ( List < Object > ) input ) { fillNodesToPrune ( i , toPrune ) ; } } else if ( isObject ( input ) ) { if ( isValue ( input ) ) { return ; } if ( isList ( input ) ) { fillNodesToPrune ( ( ( Map < String , Object > ) input ) . get ( "@list" ) , toPrune ) ; return ; } for ( final String prop : new LinkedHashSet < > ( ( ( Map < String , Object > ) input ) . keySet ( ) ) ) { if ( prop . equals ( JsonLdConsts . ID ) ) { final String id = ( String ) ( ( Map < String , Object > ) input ) . get ( JsonLdConsts . ID ) ; if ( id . startsWith ( "_:" ) ) { if ( toPrune . containsKey ( id ) ) { toPrune . put ( id , null ) ; } else { toPrune . put ( id , input ) ; } } } else { fillNodesToPrune ( ( ( Map < String , Object > ) input ) . get ( prop ) , toPrune ) ; } } } else if ( input instanceof String ) { final String p = ( String ) input ; if ( p . startsWith ( "_:" ) ) { toPrune . put ( p , null ) ; } } }
Gets the objects on which we ll prune the blank node ID
26,180
static boolean isBlankNode ( Object v ) { if ( v instanceof Map ) { final Map < String , Object > map = ( Map < String , Object > ) v ; if ( map . containsKey ( "@id" ) ) { return ( ( String ) map . get ( "@id" ) ) . startsWith ( "_:" ) ; } else { return map . isEmpty ( ) || ! map . containsKey ( "@value" ) || map . containsKey ( "@set" ) || map . containsKey ( "@list" ) ; } } return false ; }
Returns true if the given value is a blank node .
26,181
static Boolean isList ( Object v ) { return ( v instanceof Map && ( ( Map < String , Object > ) v ) . containsKey ( "@list" ) ) ; }
Returns true if the given value is a JSON - LD List
26,182
static Boolean isValue ( Object v ) { return ( v instanceof Map && ( ( Map < String , Object > ) v ) . containsKey ( "@value" ) ) ; }
Returns true if the given value is a JSON - LD value
26,183
public static String removeDotSegments ( String path , boolean hasAuthority ) { String rval = "" ; if ( path . indexOf ( "/" ) == 0 ) { rval = "/" ; } final List < String > input = new ArrayList < String > ( Arrays . asList ( path . split ( "/" ) ) ) ; if ( path . endsWith ( "/" ) ) { input . add ( "" ) ; } final List < String > output = new ArrayList < String > ( ) ; for ( int i = 0 ; i < input . size ( ) ; i ++ ) { if ( "." . equals ( input . get ( i ) ) || ( "" . equals ( input . get ( i ) ) && input . size ( ) - i > 1 ) ) { continue ; } if ( ".." . equals ( input . get ( i ) ) ) { if ( hasAuthority || ( output . size ( ) > 0 && ! ".." . equals ( output . get ( output . size ( ) - 1 ) ) ) ) { if ( output . size ( ) > 0 ) { output . remove ( output . size ( ) - 1 ) ; } } else { output . add ( ".." ) ; } continue ; } output . add ( input . get ( i ) ) ; } if ( output . size ( ) > 0 ) { rval += output . get ( 0 ) ; for ( int i = 1 ; i < output . size ( ) ; i ++ ) { rval += "/" + output . get ( i ) ; } } return rval ; }
Removes dot segments from a JsonLdUrl path .
26,184
private static void parseAuthority ( JsonLdUrl parsed ) { if ( parsed . href . indexOf ( ":" ) == - 1 && parsed . href . indexOf ( "//" ) == 0 && "" . equals ( parsed . host ) ) { parsed . pathname = parsed . pathname . substring ( 2 ) ; final int idx = parsed . pathname . indexOf ( "/" ) ; if ( idx == - 1 ) { parsed . authority = parsed . pathname ; parsed . pathname = "" ; } else { parsed . authority = parsed . pathname . substring ( 0 , idx ) ; parsed . pathname = parsed . pathname . substring ( idx ) ; } } else { parsed . authority = parsed . host ; if ( ! "" . equals ( parsed . auth ) ) { parsed . authority = parsed . auth + "@" + parsed . authority ; } } }
Parses the authority for the pre - parsed given JsonLdUrl .
26,185
public static void escape ( String str , StringBuilder rval ) { for ( int i = 0 ; i < str . length ( ) ; i ++ ) { final char hi = str . charAt ( i ) ; if ( hi <= 0x8 || hi == 0xB || hi == 0xC || ( hi >= 0xE && hi <= 0x1F ) || ( hi >= 0x7F && hi <= 0xA0 ) || ( ( hi >= 0x24F && ! Character . isHighSurrogate ( hi ) ) ) ) { rval . append ( String . format ( "\\u%04x" , ( int ) hi ) ) ; } else if ( Character . isHighSurrogate ( hi ) ) { final char lo = str . charAt ( ++ i ) ; final int c = ( hi << 10 ) + lo + ( 0x10000 - ( 0xD800 << 10 ) - 0xDC00 ) ; rval . append ( String . format ( "\\U%08x" , c ) ) ; } else { switch ( hi ) { case '\b' : rval . append ( "\\b" ) ; break ; case '\n' : rval . append ( "\\n" ) ; break ; case '\t' : rval . append ( "\\t" ) ; break ; case '\f' : rval . append ( "\\f" ) ; break ; case '\r' : rval . append ( "\\r" ) ; break ; case '\"' : rval . append ( "\\\"" ) ; break ; case '\\' : rval . append ( "\\\\" ) ; break ; default : rval . append ( hi ) ; break ; } } } }
Escapes the given string according to the N - Quads escape rules
26,186
public Map < String , Object > getContext ( ) { final Map < String , Object > rval = newMap ( ) ; rval . putAll ( context ) ; if ( rval . containsKey ( "" ) ) { rval . put ( "@vocab" , rval . remove ( "" ) ) ; } return rval ; }
Returns a valid context containing any namespaces set
26,187
public void parseContext ( Object contextLike ) throws JsonLdError { Context context ; if ( api != null ) { context = new Context ( api . opts ) ; } else { context = new Context ( ) ; } context = context . parse ( contextLike ) ; final Map < String , String > prefixes = context . getPrefixes ( true ) ; for ( final String key : prefixes . keySet ( ) ) { final String val = prefixes . get ( key ) ; if ( "@vocab" . equals ( key ) ) { if ( val == null || isString ( val ) ) { setNamespace ( "" , val ) ; } else { } } else if ( ! isKeyword ( key ) ) { setNamespace ( key , val ) ; } } }
parses a context object and sets any namespaces found within it
26,188
public void addTriple ( final String subject , final String predicate , final String object ) { addQuad ( subject , predicate , object , "@default" ) ; }
Adds a triple to the default graph of this dataset
26,189
private Node objectToRDF ( Object item ) { if ( isValue ( item ) ) { final Object value = ( ( Map < String , Object > ) item ) . get ( "@value" ) ; final Object datatype = ( ( Map < String , Object > ) item ) . get ( "@type" ) ; if ( value instanceof Boolean || value instanceof Number ) { if ( value instanceof Boolean ) { return new Literal ( value . toString ( ) , datatype == null ? XSD_BOOLEAN : ( String ) datatype , null ) ; } else if ( value instanceof Double || value instanceof Float || XSD_DOUBLE . equals ( datatype ) ) { if ( value instanceof Double && ! Double . isFinite ( ( double ) value ) ) { return new Literal ( Double . toString ( ( double ) value ) , datatype == null ? XSD_DOUBLE : ( String ) datatype , null ) ; } else if ( value instanceof Float && ! Float . isFinite ( ( float ) value ) ) { return new Literal ( Float . toString ( ( float ) value ) , datatype == null ? XSD_DOUBLE : ( String ) datatype , null ) ; } else { final DecimalFormat df = new DecimalFormat ( "0.0###############E0" ) ; df . setDecimalFormatSymbols ( DecimalFormatSymbols . getInstance ( Locale . US ) ) ; return new Literal ( df . format ( value ) , datatype == null ? XSD_DOUBLE : ( String ) datatype , null ) ; } } else { final DecimalFormat df = new DecimalFormat ( "0" ) ; return new Literal ( df . format ( value ) , datatype == null ? XSD_INTEGER : ( String ) datatype , null ) ; } } else if ( ( ( Map < String , Object > ) item ) . containsKey ( "@language" ) ) { return new Literal ( ( String ) value , datatype == null ? RDF_LANGSTRING : ( String ) datatype , ( String ) ( ( Map < String , Object > ) item ) . get ( "@language" ) ) ; } else { return new Literal ( ( String ) value , datatype == null ? XSD_STRING : ( String ) datatype , null ) ; } } else { final String id ; if ( isObject ( item ) ) { id = ( String ) ( ( Map < String , Object > ) item ) . get ( "@id" ) ; if ( JsonLdUtils . isRelativeIri ( id ) ) { return null ; } } else { id = ( String ) item ; } if ( id . indexOf ( "_:" ) == 0 ) { return new BlankNode ( id ) ; } else { return new IRI ( id ) ; } } }
Converts a JSON - LD value object to an RDF literal or a JSON - LD string or node object to an RDF resource .
26,190
public DocumentLoader addInjectedDoc ( String url , String doc ) throws JsonLdError { try { m_injectedDocs . put ( url , JsonUtils . fromString ( doc ) ) ; return this ; } catch ( final Exception e ) { throw new JsonLdError ( JsonLdError . Error . LOADING_INJECTED_CONTEXT_FAILED , url , e ) ; } }
Avoid resolving a document by instead using the given serialised representation .
26,191
public RemoteDocument loadDocument ( String url ) throws JsonLdError { if ( m_injectedDocs . containsKey ( url ) ) { try { return new RemoteDocument ( url , m_injectedDocs . get ( url ) ) ; } catch ( final Exception e ) { throw new JsonLdError ( JsonLdError . Error . LOADING_INJECTED_CONTEXT_FAILED , url , e ) ; } } else { final String disallowRemote = System . getProperty ( DocumentLoader . DISALLOW_REMOTE_CONTEXT_LOADING ) ; if ( "true" . equalsIgnoreCase ( disallowRemote ) ) { throw new JsonLdError ( JsonLdError . Error . LOADING_REMOTE_CONTEXT_FAILED , "Remote context loading has been disallowed (url was " + url + ")" ) ; } try { return new RemoteDocument ( url , JsonUtils . fromURL ( new URL ( url ) , getHttpClient ( ) ) ) ; } catch ( final Exception e ) { throw new JsonLdError ( JsonLdError . Error . LOADING_REMOTE_CONTEXT_FAILED , url , e ) ; } } }
Loads the URL if possible returning it as a RemoteDocument .
26,192
public static String toPrettyString ( Object jsonObject ) throws JsonGenerationException , IOException { final StringWriter sw = new StringWriter ( ) ; writePrettyPrint ( sw , jsonObject ) ; return sw . toString ( ) ; }
Writes the given JSON - LD Object out to a String using indentation and new lines to improve readability .
26,193
public static void write ( Writer writer , Object jsonObject ) throws JsonGenerationException , IOException { final JsonGenerator jw = JSON_FACTORY . createGenerator ( writer ) ; jw . writeObject ( jsonObject ) ; }
Writes the given JSON - LD Object out to the given Writer .
26,194
public static void writePrettyPrint ( Writer writer , Object jsonObject ) throws JsonGenerationException , IOException { final JsonGenerator jw = JSON_FACTORY . createGenerator ( writer ) ; jw . useDefaultPrettyPrinter ( ) ; jw . writeObject ( jsonObject ) ; }
Writes the given JSON - LD Object out to the given Writer using indentation and new lines to improve readability .
26,195
public static Map < String , Object > newMap ( String key , Object value ) { final Map < String , Object > result = newMap ( ) ; result . put ( key , value ) ; return result ; }
Helper function for creating maps and tuning them as necessary .
26,196
public static Object fromRDF ( Object dataset , JsonLdOptions options ) throws JsonLdError { RDFParser parser = null ; if ( options . format == null && dataset instanceof String ) { options . format = JsonLdConsts . APPLICATION_NQUADS ; } if ( rdfParsers . containsKey ( options . format ) ) { parser = rdfParsers . get ( options . format ) ; } else { throw new JsonLdError ( JsonLdError . Error . UNKNOWN_FORMAT , options . format ) ; } return fromRDF ( dataset , options , parser ) ; }
Converts an RDF dataset to JSON - LD .
26,197
public static Object normalize ( Object input , JsonLdOptions options ) throws JsonLdError { final JsonLdOptions opts = options . copy ( ) ; opts . format = null ; final RDFDataset dataset = ( RDFDataset ) toRDF ( input , opts ) ; return new JsonLdApi ( options ) . normalize ( dataset ) ; }
Performs RDF dataset normalization on the given JSON - LD input . The output is an RDF dataset unless the format option is used .
26,198
public Object compactValue ( String activeProperty , Map < String , Object > value ) { int numberMembers = value . size ( ) ; if ( value . containsKey ( JsonLdConsts . INDEX ) && JsonLdConsts . INDEX . equals ( this . getContainer ( activeProperty ) ) ) { numberMembers -- ; } if ( numberMembers > 2 ) { return value ; } final String typeMapping = getTypeMapping ( activeProperty ) ; final String languageMapping = getLanguageMapping ( activeProperty ) ; if ( value . containsKey ( JsonLdConsts . ID ) ) { if ( numberMembers == 1 && JsonLdConsts . ID . equals ( typeMapping ) ) { return compactIri ( ( String ) value . get ( JsonLdConsts . ID ) ) ; } if ( numberMembers == 1 && JsonLdConsts . VOCAB . equals ( typeMapping ) ) { return compactIri ( ( String ) value . get ( JsonLdConsts . ID ) , true ) ; } return value ; } final Object valueValue = value . get ( JsonLdConsts . VALUE ) ; if ( value . containsKey ( JsonLdConsts . TYPE ) && Obj . equals ( value . get ( JsonLdConsts . TYPE ) , typeMapping ) ) { return valueValue ; } if ( value . containsKey ( JsonLdConsts . LANGUAGE ) ) { if ( Obj . equals ( value . get ( JsonLdConsts . LANGUAGE ) , languageMapping ) || Obj . equals ( value . get ( JsonLdConsts . LANGUAGE ) , this . get ( JsonLdConsts . LANGUAGE ) ) ) { return valueValue ; } } if ( numberMembers == 1 && ( ! ( valueValue instanceof String ) || ! this . containsKey ( JsonLdConsts . LANGUAGE ) || ( termDefinitions . containsKey ( activeProperty ) && getTermDefinition ( activeProperty ) . containsKey ( JsonLdConsts . LANGUAGE ) && languageMapping == null ) ) ) { return valueValue ; } return value ; }
Value Compaction Algorithm
26,199
@ SuppressWarnings ( "unchecked" ) public Context parse ( Object localContext , List < String > remoteContexts ) throws JsonLdError { return parse ( localContext , remoteContexts , false ) ; }
Context Processing Algorithm