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
2 changes: 1 addition & 1 deletion eng/versioning/version_data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ com.microsoft.azure.cognitiveservices:azure-cognitiveservices-newssearch;1.1.0-b
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-videosearch;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-visualsearch;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-websearch;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-computervision;1.0.3-beta;1.0.3-beta
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-computervision;1.0.4-beta;1.0.4-beta
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-contentmoderator;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customvision-prediction;1.1.0-beta.3;1.1.0-beta.3
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customvision-training;1.1.0-beta.3;1.1.0-beta.3
Expand Down
4 changes: 2 additions & 2 deletions sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</parent>
<artifactId>azure-cognitiveservices-computervision</artifactId>
<groupId>com.microsoft.azure.cognitiveservices</groupId>
<version>1.0.3-beta</version> <!-- {x-version-update;com.microsoft.azure.cognitiveservices:azure-cognitiveservices-computervision;current} -->
<version>1.0.4-beta</version> <!-- {x-version-update;com.microsoft.azure.cognitiveservices:azure-cognitiveservices-computervision;current} -->
<packaging>jar</packaging>
<name>Microsoft Azure SDK for Cognitive Service Computer Vision</name>
<description>This package contains Microsoft Cognitive Service Computer Vision SDK.</description>
Expand Down Expand Up @@ -92,4 +92,4 @@
</plugin>
</plugins>
</build>
</project>
</project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ComputerVisionManager {
* @return the Computer Vision API client
*/
public static ComputerVisionClient authenticate(String subscriptionKey) {
return authenticate("https://{endpoint}/vision/v2.1/", subscriptionKey);
return authenticate("https://{endpoint}/vision/v3.0/", subscriptionKey);
}

/**
Expand Down Expand Up @@ -67,7 +67,7 @@ public Response intercept(Chain chain) throws IOException {
* @return the Computer Vision API client
*/
public static ComputerVisionClient authenticate(ServiceClientCredentials credentials, String endpoint) {
return authenticate("https://{endpoint}/vision/v2.1/", credentials)
return authenticate("https://{endpoint}/vision/v3.0/", credentials)
.withEndpoint(endpoint);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,31 @@

package com.microsoft.azure.cognitiveservices.vision.computervision.implementation;

import com.google.common.base.Joiner;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision;
import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVisionClient;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ComputerVisionErrorException;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DetectResult;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import java.io.InputStream;
import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;

/**
* Initializes a new instance of the ComputerVisionClientImpl class.
Expand Down Expand Up @@ -141,7 +160,7 @@ public ComputerVision computerVision() {
* @param credentials the management credentials for Azure
*/
public ComputerVisionClientImpl(ServiceClientCredentials credentials) {
this("https://{Endpoint}/vision/v2.1", credentials);
this("https://{Endpoint}/vision/v3.0", credentials);
}

/**
Expand Down Expand Up @@ -180,6 +199,6 @@ protected void initialize() {
*/
@Override
public String userAgent() {
return String.format("%s (%s, %s)", super.userAgent(), "ComputerVisionClient", "2.1");
return String.format("%s (%s, %s)", super.userAgent(), "ComputerVisionClient", "3.0");
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.cognitiveservices.vision.computervision.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Analyze batch operation result.
*/
public class AnalyzeResults {
/**
* Version of schema used for this result.
*/
@JsonProperty(value = "version", required = true)
private String version;

/**
* Text extracted from the input.
*/
@JsonProperty(value = "readResults", required = true)
private List<ReadResult> readResults;

/**
* Get the version value.
*
* @return the version value
*/
public String version() {
return this.version;
}

/**
* Set the version value.
*
* @param version the version value to set
* @return the AnalyzeResults object itself.
*/
public AnalyzeResults withVersion(String version) {
this.version = version;
return this;
}

/**
* Get the readResults value.
*
* @return the readResults value
*/
public List<ReadResult> readResults() {
return this.readResults;
}

/**
* Set the readResults value.
*
* @param readResults the readResults value to set
* @return the AnalyzeResults object itself.
*/
public AnalyzeResults withReadResults(List<ReadResult> readResults) {
this.readResults = readResults;
return this;
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,51 @@
* An object representing a recognized text line.
*/
public class Line {
/**
* The BCP-47 language code of the recognized text line. Only provided
* where the language of the line differs from the page's.
*/
@JsonProperty(value = "language")
private String language;

/**
* Bounding box of a recognized line.
*/
@JsonProperty(value = "boundingBox")
@JsonProperty(value = "boundingBox", required = true)
private List<Double> boundingBox;

/**
* The text content of the line.
*/
@JsonProperty(value = "text")
@JsonProperty(value = "text", required = true)
private String text;

/**
* List of words in the text line.
*/
@JsonProperty(value = "words")
@JsonProperty(value = "words", required = true)
private List<Word> words;

/**
* Get the language value.
*
* @return the language value
*/
public String language() {
return this.language;
}

/**
* Set the language value.
*
* @param language the language value to set
* @return the Line object itself.
*/
public Line withLanguage(String language) {
this.language = language;
return this;
}

/**
* Get the boundingBox value.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.cognitiveservices.vision.computervision.models;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for OcrDetectionLanguage.
*/
public final class OcrDetectionLanguage extends ExpandableStringEnum<OcrDetectionLanguage> {
/** Static value en for OcrDetectionLanguage. */
public static final OcrDetectionLanguage EN = fromString("en");

/** Static value es for OcrDetectionLanguage. */
public static final OcrDetectionLanguage ES = fromString("es");

/** Static value fr for OcrDetectionLanguage. */
public static final OcrDetectionLanguage FR = fromString("fr");

/** Static value de for OcrDetectionLanguage. */
public static final OcrDetectionLanguage DE = fromString("de");

/** Static value it for OcrDetectionLanguage. */
public static final OcrDetectionLanguage IT = fromString("it");

/** Static value nl for OcrDetectionLanguage. */
public static final OcrDetectionLanguage NL = fromString("nl");

/** Static value pt for OcrDetectionLanguage. */
public static final OcrDetectionLanguage PT = fromString("pt");

/**
* Creates or finds a OcrDetectionLanguage from its string representation.
* @param name a name to look for
* @return the corresponding OcrDetectionLanguage
*/
@JsonCreator
public static OcrDetectionLanguage fromString(String name) {
return fromString(name, OcrDetectionLanguage.class);
}

/**
* @return known OcrDetectionLanguage values
*/
public static Collection<OcrDetectionLanguage> values() {
return values(OcrDetectionLanguage.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,38 @@
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for TextRecognitionMode.
* Defines values for OperationStatusCodes.
*/
public enum TextRecognitionMode {
/** Enum value Handwritten. */
HANDWRITTEN("Handwritten"),
public enum OperationStatusCodes {
/** Enum value notStarted. */
NOT_STARTED("notStarted"),

/** Enum value Printed. */
PRINTED("Printed");
/** Enum value running. */
RUNNING("running"),

/** The actual serialized value for a TextRecognitionMode instance. */
/** Enum value failed. */
FAILED("failed"),

/** Enum value succeeded. */
SUCCEEDED("succeeded");

/** The actual serialized value for a OperationStatusCodes instance. */
private String value;

TextRecognitionMode(String value) {
OperationStatusCodes(String value) {
this.value = value;
}

/**
* Parses a serialized value to a TextRecognitionMode instance.
* Parses a serialized value to a OperationStatusCodes instance.
*
* @param value the serialized value to parse.
* @return the parsed TextRecognitionMode object, or null if unable to parse.
* @return the parsed OperationStatusCodes object, or null if unable to parse.
*/
@JsonCreator
public static TextRecognitionMode fromString(String value) {
TextRecognitionMode[] items = TextRecognitionMode.values();
for (TextRecognitionMode item : items) {
public static OperationStatusCodes fromString(String value) {
OperationStatusCodes[] items = OperationStatusCodes.values();
for (OperationStatusCodes item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Defines headers for BatchReadFile operation.
* Defines headers for Read operation.
*/
public class BatchReadFileHeaders {
public class ReadHeaders {
/**
* URL to query for status of the operation. The operation ID will expire
* in 48 hours.
Expand All @@ -34,9 +34,9 @@ public String operationLocation() {
* Set the operationLocation value.
*
* @param operationLocation the operationLocation value to set
* @return the BatchReadFileHeaders object itself.
* @return the ReadHeaders object itself.
*/
public BatchReadFileHeaders withOperationLocation(String operationLocation) {
public ReadHeaders withOperationLocation(String operationLocation) {
this.operationLocation = operationLocation;
return this;
}
Expand Down
Loading