Skip to content

Commit

Permalink
Add autogenerated code for form recognizer v2.1 features (#15237)
Browse files Browse the repository at this point in the history
  • Loading branch information
samvaity authored Sep 16, 2020
1 parent 80bf6b1 commit 53063e0
Show file tree
Hide file tree
Showing 105 changed files with 4,536 additions and 2,536 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ PollerFlux<FormRecognizerOperationResult, List<FormPage>> beginRecognizeContent(
recognizeReceiptsOptions.getPollInterval(),
urlActivationOperation(
() -> service.analyzeReceiptAsyncWithResponseAsync(isFieldElementsIncluded,
new SourcePath().setSource(receiptUrl), context)
"", new SourcePath().setSource(receiptUrl), context)
.map(response -> new FormRecognizerOperationResult(
parseModelId(response.getDeserializedHeaders().getOperationLocation())))),
pollingOperation(resultId -> service.getAnalyzeReceiptResultWithResponseAsync(resultId, context)),
Expand Down Expand Up @@ -542,7 +542,7 @@ public PollerFlux<FormRecognizerOperationResult, List<RecognizedForm>> beginReco
recognizeReceiptsOptions.getPollInterval(),
streamActivationOperation(
(contentType -> service.analyzeReceiptAsyncWithResponseAsync(
contentType, receipt, length, isFieldElementsIncluded, context)
contentType, receipt, length, isFieldElementsIncluded, "", context)
.map(response -> new FormRecognizerOperationResult(
parseModelId(response.getDeserializedHeaders().getOperationLocation())))),
receipt, recognizeReceiptsOptions.getContentType()),
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.formrecognizer.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The AnalyzeBusinessCardAsyncHeaders model. */
@Fluent
public final class AnalyzeBusinessCardAsyncHeaders {
/*
* The Operation-Location property.
*/
@JsonProperty(value = "Operation-Location")
private String operationLocation;

/**
* Get the operationLocation property: The Operation-Location property.
*
* @return the operationLocation value.
*/
public String getOperationLocation() {
return this.operationLocation;
}

/**
* Set the operationLocation property: The Operation-Location property.
*
* @param operationLocation the operationLocation value to set.
* @return the AnalyzeBusinessCardAsyncHeaders object itself.
*/
public AnalyzeBusinessCardAsyncHeaders setOperationLocation(String operationLocation) {
this.operationLocation = operationLocation;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.formrecognizer.implementation.models;

import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpRequest;
import com.azure.core.http.rest.ResponseBase;

/** Contains all response data for the analyzeBusinessCardAsync operation. */
public final class AnalyzeBusinessCardAsyncResponse extends ResponseBase<AnalyzeBusinessCardAsyncHeaders, Void> {
/**
* Creates an instance of AnalyzeBusinessCardAsyncResponse.
*
* @param request the request which resulted in this AnalyzeBusinessCardAsyncResponse.
* @param statusCode the status code of the HTTP response.
* @param rawHeaders the raw headers of the HTTP response.
* @param value the deserialized value of the HTTP response.
* @param headers the deserialized headers of the HTTP response.
*/
public AnalyzeBusinessCardAsyncResponse(
HttpRequest request,
int statusCode,
HttpHeaders rawHeaders,
Void value,
AnalyzeBusinessCardAsyncHeaders headers) {
super(request, statusCode, rawHeaders, value, headers);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.formrecognizer.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The Attributes model. */
@Fluent
public final class Attributes {
/*
* Is this model composed? (default: false).
*/
@JsonProperty(value = "isComposed")
private Boolean isComposed;

/**
* Get the isComposed property: Is this model composed? (default: false).
*
* @return the isComposed value.
*/
public Boolean isComposed() {
return this.isComposed;
}

/**
* Set the isComposed property: Is this model composed? (default: false).
*
* @param isComposed the isComposed value to set.
* @return the Attributes object itself.
*/
public Attributes setIsComposed(Boolean isComposed) {
this.isComposed = isComposed;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.formrecognizer.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The ComposeCustomModelsAsyncHeaders model. */
@Fluent
public final class ComposeCustomModelsAsyncHeaders {
/*
* The Location property.
*/
@JsonProperty(value = "Location")
private String location;

/**
* Get the location property: The Location property.
*
* @return the location value.
*/
public String getLocation() {
return this.location;
}

/**
* Set the location property: The Location property.
*
* @param location the location value to set.
* @return the ComposeCustomModelsAsyncHeaders object itself.
*/
public ComposeCustomModelsAsyncHeaders setLocation(String location) {
this.location = location;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.formrecognizer.implementation.models;

import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpRequest;
import com.azure.core.http.rest.ResponseBase;

/** Contains all response data for the composeCustomModelsAsync operation. */
public final class ComposeCustomModelsAsyncResponse extends ResponseBase<ComposeCustomModelsAsyncHeaders, Void> {
/**
* Creates an instance of ComposeCustomModelsAsyncResponse.
*
* @param request the request which resulted in this ComposeCustomModelsAsyncResponse.
* @param statusCode the status code of the HTTP response.
* @param rawHeaders the raw headers of the HTTP response.
* @param value the deserialized value of the HTTP response.
* @param headers the deserialized headers of the HTTP response.
*/
public ComposeCustomModelsAsyncResponse(
HttpRequest request,
int statusCode,
HttpHeaders rawHeaders,
Void value,
ComposeCustomModelsAsyncHeaders headers) {
super(request, statusCode, rawHeaders, value, headers);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.formrecognizer.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.UUID;

/** The ComposeRequest model. */
@Fluent
public final class ComposeRequest {
/*
* List of model ids to compose.
*/
@JsonProperty(value = "modelIds", required = true)
private List<UUID> modelIds;

/*
* Optional user defined model name (max length: 1024).
*/
@JsonProperty(value = "modelName")
private String modelName;

/**
* Get the modelIds property: List of model ids to compose.
*
* @return the modelIds value.
*/
public List<UUID> getModelIds() {
return this.modelIds;
}

/**
* Set the modelIds property: List of model ids to compose.
*
* @param modelIds the modelIds value to set.
* @return the ComposeRequest object itself.
*/
public ComposeRequest setModelIds(List<UUID> modelIds) {
this.modelIds = modelIds;
return this;
}

/**
* Get the modelName property: Optional user defined model name (max length: 1024).
*
* @return the modelName value.
*/
public String getModelName() {
return this.modelName;
}

/**
* Set the modelName property: Optional user defined model name (max length: 1024).
*
* @param modelName the modelName value to set.
* @return the ComposeRequest object itself.
*/
public ComposeRequest setModelName(String modelName) {
this.modelName = modelName;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/** The DocumentResult model. */
@Fluent
Expand All @@ -18,12 +19,24 @@ public final class DocumentResult {
@JsonProperty(value = "docType", required = true)
private String docType;

/*
* Model identifier.
*/
@JsonProperty(value = "modelId")
private UUID modelId;

/*
* First and last page number where the document is found.
*/
@JsonProperty(value = "pageRange", required = true)
private List<Integer> pageRange;

/*
* Predicted document type confidence.
*/
@JsonProperty(value = "docTypeConfidence")
private Float docTypeConfidence;

/*
* Dictionary of named field values.
*/
Expand All @@ -50,6 +63,26 @@ public DocumentResult setDocType(String docType) {
return this;
}

/**
* Get the modelId property: Model identifier.
*
* @return the modelId value.
*/
public UUID getModelId() {
return this.modelId;
}

/**
* Set the modelId property: Model identifier.
*
* @param modelId the modelId value to set.
* @return the DocumentResult object itself.
*/
public DocumentResult setModelId(UUID modelId) {
this.modelId = modelId;
return this;
}

/**
* Get the pageRange property: First and last page number where the document is found.
*
Expand All @@ -70,6 +103,26 @@ public DocumentResult setPageRange(List<Integer> pageRange) {
return this;
}

/**
* Get the docTypeConfidence property: Predicted document type confidence.
*
* @return the docTypeConfidence value.
*/
public Float getDocTypeConfidence() {
return this.docTypeConfidence;
}

/**
* Set the docTypeConfidence property: Predicted document type confidence.
*
* @param docTypeConfidence the docTypeConfidence value to set.
* @return the DocumentResult object itself.
*/
public DocumentResult setDocTypeConfidence(Float docTypeConfidence) {
this.docTypeConfidence = docTypeConfidence;
return this;
}

/**
* Get the fields property: Dictionary of named field values.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public final class FieldValue {
@JsonProperty(value = "valueObject")
private Map<String, FieldValue> valueObject;

/*
* Selection mark value.
*/
@JsonProperty(value = "valueSelectionMark")
private FieldValueSelectionMark valueSelectionMark;

/*
* Text content of the extracted field.
*/
Expand Down Expand Up @@ -278,6 +284,26 @@ public FieldValue setValueObject(Map<String, FieldValue> valueObject) {
return this;
}

/**
* Get the valueSelectionMark property: Selection mark value.
*
* @return the valueSelectionMark value.
*/
public FieldValueSelectionMark getValueSelectionMark() {
return this.valueSelectionMark;
}

/**
* Set the valueSelectionMark property: Selection mark value.
*
* @param valueSelectionMark the valueSelectionMark value to set.
* @return the FieldValue object itself.
*/
public FieldValue setValueSelectionMark(FieldValueSelectionMark valueSelectionMark) {
this.valueSelectionMark = valueSelectionMark;
return this;
}

/**
* Get the text property: Text content of the extracted field.
*
Expand Down
Loading

0 comments on commit 53063e0

Please sign in to comment.