public class

GooglePredictionConnector

extends AbstractGoogleOAuthConnector
java.lang.Object
   ↳ org.mule.modules.google.AbstractGoogleOAuthConnector
     ↳ org.mule.modules.google.prediction.GooglePredictionConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Generic module

Summary

[Expand]
Inherited Constants
From class org.mule.modules.google.AbstractGoogleOAuthConnector
Fields
private String accessToken
private String applicationName Application name registered on Google API console
private Prediction client The google api client
private String consumerKey The OAuth2 consumer key
private String consumerSecret The OAuth2 consumer secret
private IdentifierPolicy identifierPolicy This policy represents which id we want to use to represent each google account.
private String scope The OAuth scopes you want to request
[Expand]
Inherited Fields
From class org.mule.modules.google.AbstractGoogleOAuthConnector
Public Constructors
GooglePredictionConnector()
Public Methods
Analyze analyze(String modelId)
Updates an existing prediction model with new data.
Training create(String modelId, String googleStorageLocation, String storagePMMLLocation, String storagePMMLModelLocation)
Inserts a new calendar associated with the user that owns the current OAuth token

void delete(String modelId)
Deletes a prediction model using the id of that model.
Training get(String modelId)
Updates an existing prediction model with new data.
String getAccessToken()
String getAccessTokenId()
String getApplicationName()
String getConsumerKey()
String getConsumerSecret()
IdentifierPolicy getIdentifierPolicy()
String getScope()
List<Training> list()
Inserts a new calendar associated with the user that owns the current OAuth token

void postAuth()
Output predict(String modelId, List<Object> list)
Inserts a new calendar associated with the user that owns the current OAuth token

void setAccessToken(String accessToken)
void setApplicationName(String applicationName)
Set property
void setClient(Prediction prediction)
void setConsumerKey(String consumerKey)
Set property
void setConsumerSecret(String consumerSecret)
Set property
void setIdentifierPolicy(IdentifierPolicy identifierPolicy)
void setScope(String scope)
Set property
Boolean trainingComplete(String modelId)
Checks if the training of a model is completed or not.
Training update(String modelId, String label, List<Object> csv)
Updates an existing prediction model with new data.
[Expand]
Inherited Methods
From class org.mule.modules.google.AbstractGoogleOAuthConnector
From class java.lang.Object

Fields

private String accessToken

private String applicationName

Application name registered on Google API console

private Prediction client

The google api client

private String consumerKey

The OAuth2 consumer key

private String consumerSecret

The OAuth2 consumer secret

private IdentifierPolicy identifierPolicy

This policy represents which id we want to use to represent each google account. PROFILE means that we want the google profile id. That means, the user's primary key in google's DB. This is a long number represented as a string. EMAIL means you want to use the account's email address

private String scope

The OAuth scopes you want to request

Public Constructors

public GooglePredictionConnector ()

Public Methods

public Analyze analyze (String modelId)

Updates an existing prediction model with new data.

Parameters
modelId The id of your prediction model.
Returns
  • another instance of Prediction.Trainedmodels.Update representing the model that was created
Throws
IOException if there's a communication error with google's servers

public Training create (String modelId, String googleStorageLocation, String storagePMMLLocation, String storagePMMLModelLocation)

Inserts a new calendar associated with the user that owns the current OAuth token

Parameters
modelId The id of your prediction model.
googleStorageLocation The id of your google storage that holds the model.
storagePMMLLocation The id of your google storage Location that holds the PMML model.
storagePMMLModelLocation The id of your google storage Location that holds the PMML model.
Returns
  • another instance of Training representing the model that was created
Throws
IOException if there's a communication error with google's servers

public void delete (String modelId)

Deletes a prediction model using the id of that model.

Parameters
modelId The id of your prediction model.
Returns
  • another instance of Boolean representing the model that was created
Throws
IOException if there's a communication error with google's servers

public Training get (String modelId)

Updates an existing prediction model with new data.

Parameters
modelId The id of your prediction model.
Returns
  • another instance of Prediction.Trainedmodels.Update representing the model that was created
Throws
IOException if there's a communication error with google's servers

public String getAccessToken ()

public String getAccessTokenId ()

public String getApplicationName ()

public String getConsumerKey ()

public String getConsumerSecret ()

public IdentifierPolicy getIdentifierPolicy ()

public String getScope ()

public List<Training> list ()

Inserts a new calendar associated with the user that owns the current OAuth token

Returns
  • another instance of List representing the calendar that was created
Throws
IOException if there's a communication error with google's servers

public void postAuth ()

public Output predict (String modelId, List<Object> list)

Inserts a new calendar associated with the user that owns the current OAuth token

Parameters
modelId The name of your prediction model.
list A list containing the query strings that you want to predict.
Returns
  • another instance of Output representing the calendar that was created
Throws
IOException if there's a communication error with google's servers

public void setAccessToken (String accessToken)

Parameters
accessToken

public void setApplicationName (String applicationName)

Set property

Parameters
applicationName Application Name

public void setClient (Prediction prediction)

Parameters
prediction

public void setConsumerKey (String consumerKey)

Set property

Parameters
consumerKey Consumer Key

public void setConsumerSecret (String consumerSecret)

Set property

Parameters
consumerSecret Consumer Secret

public void setIdentifierPolicy (IdentifierPolicy identifierPolicy)

Parameters
identifierPolicy

public void setScope (String scope)

Set property

Parameters
scope Oauth Scope Identifier

public Boolean trainingComplete (String modelId)

Checks if the training of a model is completed or not.

Parameters
modelId The id of your prediction model.
Returns
  • another instance of Boolean representing the model that was created
Throws
IOException if there's a communication error with google's servers

public Training update (String modelId, String label, List<Object> csv)

Updates an existing prediction model with new data.

Parameters
modelId The id of your prediction model.
label The label that you want to add more training data to.
csv A list of CSV strings that you want to update this training model with for one particular label.
Returns
  • another instance of Prediction.Trainedmodels.Update representing the model that was created
Throws
IOException if there's a communication error with google's servers