Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<relativePath>../../../pom.data.xml</relativePath>
</parent>
<artifactId>azure-cognitiveservices-customvision-prediction</artifactId>
<version>1.1.0-preview.1</version>
<version>1.1.0-preview.2</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for Cognitive Service Custom Vision Prediction</name>
<description>This package contains Microsoft Cognitive Service Custom Vision Prediction SDK.</description>
Expand Down Expand Up @@ -88,4 +88,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import com.microsoft.rest.RestClient;

/**
* The interface for PredictionEndpoint class.
* The interface for CustomVisionPredictionClient class.
*/
public interface PredictionEndpoint {
public interface CustomVisionPredictionClient {
/**
* Gets the REST client.
*
Expand All @@ -36,19 +36,34 @@ public interface PredictionEndpoint {
String userAgent();

/**
* Gets .
* Gets API key..
*
* @return the apiKey value.
*/
String apiKey();

/**
* Sets .
* Sets API key..
*
* @param apiKey the apiKey value.
* @return the service client itself
*/
PredictionEndpoint withApiKey(String apiKey);
CustomVisionPredictionClient withApiKey(String apiKey);

/**
* Gets Supported Cognitive Services endpoints..
*
* @return the endpoint value.
*/
String endpoint();

/**
* Sets Supported Cognitive Services endpoints..
*
* @param endpoint the endpoint value.
* @return the service client itself
*/
CustomVisionPredictionClient withEndpoint(String endpoint);

/**
* Gets Gets or sets the preferred language for the response..
Expand All @@ -63,7 +78,7 @@ public interface PredictionEndpoint {
* @param acceptLanguage the acceptLanguage value.
* @return the service client itself
*/
PredictionEndpoint withAcceptLanguage(String acceptLanguage);
CustomVisionPredictionClient withAcceptLanguage(String acceptLanguage);

/**
* Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..
Expand All @@ -78,7 +93,7 @@ public interface PredictionEndpoint {
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
* @return the service client itself
*/
PredictionEndpoint withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout);
CustomVisionPredictionClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout);

/**
* Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..
Expand All @@ -93,7 +108,7 @@ public interface PredictionEndpoint {
* @param generateClientRequestId the generateClientRequestId value.
* @return the service client itself
*/
PredictionEndpoint withGenerateClientRequestId(boolean generateClientRequestId);
CustomVisionPredictionClient withGenerateClientRequestId(boolean generateClientRequestId);

/**
* Gets the Predictions object to access its operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

package com.microsoft.azure.cognitiveservices.vision.customvision.prediction;

import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.implementation.PredictionEndpointImpl;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.implementation.CustomVisionPredictionClientImpl;
import com.microsoft.rest.RestClient;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import okhttp3.OkHttpClient;
Expand All @@ -21,7 +21,7 @@ public class CustomVisionPredictionManager {
* @param apiKey the Custom Vision Prediction API key
* @return the Computer Vision API client
*/
public static PredictionEndpoint authenticate(String apiKey) {
public static CustomVisionPredictionClient authenticate(String apiKey) {
return authenticate("https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Prediction/", apiKey);
}

Expand All @@ -32,7 +32,7 @@ public static PredictionEndpoint authenticate(String apiKey) {
* @param apiKey the Custom Vision Prediction API key
* @return the Custom Vision Prediction API client
*/
public static PredictionEndpoint authenticate(String baseUrl, final String apiKey) {
public static CustomVisionPredictionClient authenticate(String baseUrl, final String apiKey) {
ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() {
@Override
public void applyCredentialsFilter(OkHttpClient.Builder builder) {
Expand All @@ -48,7 +48,7 @@ public void applyCredentialsFilter(OkHttpClient.Builder builder) {
* @param apiKey the Custom Vision Prediction API key
* @return the Computer Vision API client
*/
public static PredictionEndpoint authenticate(ServiceClientCredentials credentials, final String apiKey) {
public static CustomVisionPredictionClient authenticate(ServiceClientCredentials credentials, final String apiKey) {
return authenticate("https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Prediction/", credentials, apiKey);
}

Expand All @@ -60,8 +60,8 @@ public static PredictionEndpoint authenticate(ServiceClientCredentials credentia
* @param apiKey the Custom Vision Prediction API key
* @return the Custom Vision Prediction API client
*/
public static PredictionEndpoint authenticate(String baseUrl, ServiceClientCredentials credentials, final String apiKey) {
return new PredictionEndpointImpl(baseUrl, credentials).withApiKey(apiKey);
public static CustomVisionPredictionClient authenticate(String baseUrl, ServiceClientCredentials credentials, final String apiKey) {
return new CustomVisionPredictionClientImpl(baseUrl, credentials).withApiKey(apiKey);
}

/**
Expand All @@ -71,7 +71,7 @@ public static PredictionEndpoint authenticate(String baseUrl, ServiceClientCrede
* @param apiKey the Custom Vision Prediction API key
* @return the Custom Vision Prediction API client
*/
public static PredictionEndpoint authenticate(RestClient restClient, final String apiKey) {
return new PredictionEndpointImpl(restClient).withApiKey(apiKey);
public static CustomVisionPredictionClient authenticate(RestClient restClient, final String apiKey) {
return new CustomVisionPredictionClientImpl(restClient).withApiKey(apiKey);
}
}
Loading