Class TrainsImpl

  • All Implemented Interfaces:
    Trains

    public class TrainsImpl
    extends Object
    implements Trains
    An instance of this class provides access to all the operations defined in Trains.
    • Constructor Detail

      • TrainsImpl

        public TrainsImpl​(retrofit2.Retrofit retrofit,
                          LUISAuthoringClientImpl client)
        Initializes an instance of TrainsImpl.
        Parameters:
        retrofit - the Retrofit instance built from a Retrofit Builder.
        client - the instance of the service client containing this operation class.
    • Method Detail

      • trainVersion

        public EnqueueTrainingResponse trainVersion​(UUID appId,
                                                    String versionId)
        Sends a training request for a version of a specified LUIS app. This POST request initiates a request asynchronously. To determine whether the training request is successful, submit a GET request to get training status. Note: The application version is not fully trained unless all the models (intents and entities) are trained successfully or are up to date. To verify training success, get the training status at least once after training is complete.
        Specified by:
        trainVersion in interface Trains
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        Returns:
        the EnqueueTrainingResponse object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • trainVersionAsync

        public com.microsoft.rest.ServiceFuture<EnqueueTrainingResponse> trainVersionAsync​(UUID appId,
                                                                                           String versionId,
                                                                                           com.microsoft.rest.ServiceCallback<EnqueueTrainingResponse> serviceCallback)
        Sends a training request for a version of a specified LUIS app. This POST request initiates a request asynchronously. To determine whether the training request is successful, submit a GET request to get training status. Note: The application version is not fully trained unless all the models (intents and entities) are trained successfully or are up to date. To verify training success, get the training status at least once after training is complete.
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • trainVersionAsync

        public rx.Observable<EnqueueTrainingResponse> trainVersionAsync​(UUID appId,
                                                                        String versionId)
        Sends a training request for a version of a specified LUIS app. This POST request initiates a request asynchronously. To determine whether the training request is successful, submit a GET request to get training status. Note: The application version is not fully trained unless all the models (intents and entities) are trained successfully or are up to date. To verify training success, get the training status at least once after training is complete.
        Specified by:
        trainVersionAsync in interface Trains
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        Returns:
        the observable to the EnqueueTrainingResponse object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • trainVersionWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<EnqueueTrainingResponse>> trainVersionWithServiceResponseAsync​(UUID appId,
                                                                                                                               String versionId)
        Sends a training request for a version of a specified LUIS app. This POST request initiates a request asynchronously. To determine whether the training request is successful, submit a GET request to get training status. Note: The application version is not fully trained unless all the models (intents and entities) are trained successfully or are up to date. To verify training success, get the training status at least once after training is complete.
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        Returns:
        the observable to the EnqueueTrainingResponse object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getStatus

        public List<ModelTrainingInfo> getStatus​(UUID appId,
                                                 String versionId)
        Gets the training status of all models (intents and entities) for the specified LUIS app. You must call the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app ID. "versionId" specifies the version number of the LUIS app. For example, "0.1".
        Specified by:
        getStatus in interface Trains
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        Returns:
        the List<ModelTrainingInfo> object if successful.
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - all other wrapped checked exceptions if the request fails to be sent
      • getStatusAsync

        public com.microsoft.rest.ServiceFuture<List<ModelTrainingInfo>> getStatusAsync​(UUID appId,
                                                                                        String versionId,
                                                                                        com.microsoft.rest.ServiceCallback<List<ModelTrainingInfo>> serviceCallback)
        Gets the training status of all models (intents and entities) for the specified LUIS app. You must call the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app ID. "versionId" specifies the version number of the LUIS app. For example, "0.1".
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        serviceCallback - the async ServiceCallback to handle successful and failed responses.
        Returns:
        the ServiceFuture object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getStatusAsync

        public rx.Observable<List<ModelTrainingInfo>> getStatusAsync​(UUID appId,
                                                                     String versionId)
        Gets the training status of all models (intents and entities) for the specified LUIS app. You must call the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app ID. "versionId" specifies the version number of the LUIS app. For example, "0.1".
        Specified by:
        getStatusAsync in interface Trains
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        Returns:
        the observable to the List<ModelTrainingInfo> object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation
      • getStatusWithServiceResponseAsync

        public rx.Observable<com.microsoft.rest.ServiceResponse<List<ModelTrainingInfo>>> getStatusWithServiceResponseAsync​(UUID appId,
                                                                                                                            String versionId)
        Gets the training status of all models (intents and entities) for the specified LUIS app. You must call the train API to train the LUIS app before you call this API to get training status. "appID" specifies the LUIS app ID. "versionId" specifies the version number of the LUIS app. For example, "0.1".
        Parameters:
        appId - The application ID.
        versionId - The version ID.
        Returns:
        the observable to the List<ModelTrainingInfo> object
        Throws:
        IllegalArgumentException - thrown if parameters fail the validation