Skip to content
Closed
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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
// Code generated by Microsoft (R) AutoRest Code Generator.

/**
* This package contains the implementation classes for PredictionEndpoint.
* This package contains the implementation classes for CustomVisionPredictionClient.
*/
package com.microsoft.azure.cognitiveservices.vision.customvision.prediction.implementation;
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,35 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The BoundingBox model.
* Bounding box that defines a region of an image.
*/
public class BoundingBox {
/**
* The left property.
* Coordinate of the left boundary.
*/
@JsonProperty(value = "left")
private double left;

/**
* The top property.
* Coordinate of the top boundary.
*/
@JsonProperty(value = "top")
private double top;

/**
* The width property.
* Width.
*/
@JsonProperty(value = "width")
private double width;

/**
* The height property.
* Height.
*/
@JsonProperty(value = "height")
private double height;

/**
* Get the left value.
* Get coordinate of the left boundary.
*
* @return the left value
*/
Expand All @@ -48,7 +48,7 @@ public double left() {
}

/**
* Set the left value.
* Set coordinate of the left boundary.
*
* @param left the left value to set
* @return the BoundingBox object itself.
Expand All @@ -59,7 +59,7 @@ public BoundingBox withLeft(double left) {
}

/**
* Get the top value.
* Get coordinate of the top boundary.
*
* @return the top value
*/
Expand All @@ -68,7 +68,7 @@ public double top() {
}

/**
* Set the top value.
* Set coordinate of the top boundary.
*
* @param top the top value to set
* @return the BoundingBox object itself.
Expand All @@ -79,7 +79,7 @@ public BoundingBox withTop(double top) {
}

/**
* Get the width value.
* Get width.
*
* @return the width value
*/
Expand All @@ -88,7 +88,7 @@ public double width() {
}

/**
* Set the width value.
* Set width.
*
* @param width the width value to set
* @return the BoundingBox object itself.
Expand All @@ -99,7 +99,7 @@ public BoundingBox withWidth(double width) {
}

/**
* Get the height value.
* Get height.
*
* @return the height value
*/
Expand All @@ -108,7 +108,7 @@ public double height() {
}

/**
* Set the height value.
* Set height.
*
* @param height the height value to set
* @return the BoundingBox object itself.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
/**
* 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.customvision.prediction.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The CustomVisionError model.
*/
public class CustomVisionError {
/**
* Possible values include: 'NoError', 'BadRequest',
* 'BadRequestExceededBatchSize', 'BadRequestNotSupported',
* 'BadRequestInvalidIds', 'BadRequestProjectName',
* 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription',
* 'BadRequestProjectUnknownDomain',
* 'BadRequestProjectUnknownClassification',
* 'BadRequestProjectUnsupportedDomainTypeChange',
* 'BadRequestIterationName', 'BadRequestIterationNameNotUnique',
* 'BadRequestIterationDescription', 'BadRequestIterationIsNotTrained',
* 'BadRequestWorkspaceCannotBeModified',
* 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName',
* 'BadRequestTagNameNotUnique', 'BadRequestTagDescription',
* 'BadRequestTagType', 'BadRequestMultipleNegativeTag',
* 'BadRequestImageTags', 'BadRequestImageRegions',
* 'BadRequestNegativeAndRegularTagOnSameImage',
* 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName',
* 'BadRequestSubscriptionApi', 'BadRequestPublishFailed',
* 'BadRequestUnpublishFailed', 'BadRequestExceedProjectLimit',
* 'BadRequestExceedIterationPerProjectLimit',
* 'BadRequestExceedTagPerProjectLimit',
* 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota',
* 'BadRequestCannotMigrateProjectWithName', 'BadRequestNotLimitedTrial',
* 'BadRequestImageBatch', 'BadRequestImageStream', 'BadRequestImageUrl',
* 'BadRequestImageFormat', 'BadRequestImageSizeBytes',
* 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded',
* 'BadRequestTrainingValidationFailed',
* 'BadRequestClassificationTrainingValidationFailed',
* 'BadRequestMultiClassClassificationTrainingValidationFailed',
* 'BadRequestMultiLabelClassificationTrainingValidationFailed',
* 'BadRequestDetectionTrainingValidationFailed',
* 'BadRequestTrainingAlreadyInProgress',
* 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress',
* 'BadRequestPredictionIdsMissing',
* 'BadRequestPredictionIdsExceededCount',
* 'BadRequestPredictionTagsExceededCount',
* 'BadRequestPredictionResultsExceededCount',
* 'BadRequestPredictionInvalidApplicationName',
* 'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid',
* 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser',
* 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled',
* 'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist',
* 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability',
* 'ForbiddenInvalid', 'NotFound', 'NotFoundProject',
* 'NotFoundProjectDefaultIteration', 'NotFoundIteration',
* 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage',
* 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid',
* 'Conflict', 'ConflictInvalid', 'ErrorUnknown',
* 'ErrorProjectInvalidWorkspace',
* 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain',
* 'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed',
* 'ErrorFeaturizationServiceUnavailable',
* 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer',
* 'ErrorFeaturizationAugmentationUnavailable',
* 'ErrorFeaturizationUnrecognizedJob',
* 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform',
* 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier',
* 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound',
* 'ErrorPredictionModelNotCached', 'ErrorPrediction',
* 'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'.
*/
@JsonProperty(value = "code", required = true)
private String code;

/**
* The message property.
*/
@JsonProperty(value = "message", required = true)
private String message;

/**
* Get possible values include: 'NoError', 'BadRequest', 'BadRequestExceededBatchSize', 'BadRequestNotSupported', 'BadRequestInvalidIds', 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription', 'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified', 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', 'BadRequestTagType', 'BadRequestMultipleNegativeTag', 'BadRequestImageTags', 'BadRequestImageRegions', 'BadRequestNegativeAndRegularTagOnSameImage', 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName', 'BadRequestSubscriptionApi', 'BadRequestPublishFailed', 'BadRequestUnpublishFailed', 'BadRequestExceedProjectLimit', 'BadRequestExceedIterationPerProjectLimit', 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName', 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', 'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat', 'BadRequestImageSizeBytes', 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded', 'BadRequestTrainingValidationFailed', 'BadRequestClassificationTrainingValidationFailed', 'BadRequestMultiClassClassificationTrainingValidationFailed', 'BadRequestMultiLabelClassificationTrainingValidationFailed', 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', 'BadRequestPredictionTagsExceededCount', 'BadRequestPredictionResultsExceededCount', 'BadRequestPredictionInvalidApplicationName', 'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid', 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled', 'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability', 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration', 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage', 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid', 'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorProjectInvalidWorkspace', 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', 'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer', 'ErrorFeaturizationAugmentationUnavailable', 'ErrorFeaturizationUnrecognizedJob', 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', 'ErrorPredictionModelNotCached', 'ErrorPrediction', 'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'.
*
* @return the code value
*/
public String code() {
return this.code;
}

/**
* Set possible values include: 'NoError', 'BadRequest', 'BadRequestExceededBatchSize', 'BadRequestNotSupported', 'BadRequestInvalidIds', 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', 'BadRequestIterationDescription', 'BadRequestIterationIsNotTrained', 'BadRequestWorkspaceCannotBeModified', 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', 'BadRequestTagNameNotUnique', 'BadRequestTagDescription', 'BadRequestTagType', 'BadRequestMultipleNegativeTag', 'BadRequestImageTags', 'BadRequestImageRegions', 'BadRequestNegativeAndRegularTagOnSameImage', 'BadRequestIterationIsPublished', 'BadRequestInvalidPublishName', 'BadRequestSubscriptionApi', 'BadRequestPublishFailed', 'BadRequestUnpublishFailed', 'BadRequestExceedProjectLimit', 'BadRequestExceedIterationPerProjectLimit', 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit', 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName', 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', 'BadRequestImageStream', 'BadRequestImageUrl', 'BadRequestImageFormat', 'BadRequestImageSizeBytes', 'BadRequestImageExceededCount', 'BadRequestTrainingNotNeeded', 'BadRequestTrainingValidationFailed', 'BadRequestClassificationTrainingValidationFailed', 'BadRequestMultiClassClassificationTrainingValidationFailed', 'BadRequestMultiLabelClassificationTrainingValidationFailed', 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', 'BadRequestExportValidationFailed', 'BadRequestExportAlreadyInProgress', 'BadRequestPredictionIdsMissing', 'BadRequestPredictionIdsExceededCount', 'BadRequestPredictionTagsExceededCount', 'BadRequestPredictionResultsExceededCount', 'BadRequestPredictionInvalidApplicationName', 'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalid', 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', 'ForbiddenUserResource', 'ForbiddenUserSignupDisabled', 'ForbiddenUserSignupAllowanceExceeded', 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability', 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', 'NotFoundProjectDefaultIteration', 'NotFoundIteration', 'NotFoundIterationPerformance', 'NotFoundTag', 'NotFoundImage', 'NotFoundDomain', 'NotFoundApimSubscription', 'NotFoundInvalid', 'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorProjectInvalidWorkspace', 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', 'ErrorProjectTrainingRequestFailed', 'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable', 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer', 'ErrorFeaturizationAugmentationUnavailable', 'ErrorFeaturizationUnrecognizedJob', 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', 'ErrorPredictionModelNotCached', 'ErrorPrediction', 'ErrorPredictionStorage', 'ErrorRegionProposal', 'ErrorInvalid'.
*
* @param code the code value to set
* @return the CustomVisionError object itself.
*/
public CustomVisionError withCode(String code) {
this.code = code;
return this;
}

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

/**
* Set the message value.
*
* @param message the message value to set
* @return the CustomVisionError object itself.
*/
public CustomVisionError withMessage(String message) {
this.message = message;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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.customvision.prediction.models;

import com.microsoft.rest.RestException;
import okhttp3.ResponseBody;
import retrofit2.Response;

/**
* Exception thrown for an invalid response with CustomVisionError information.
*/
public class CustomVisionErrorException extends RestException {
/**
* Initializes a new instance of the CustomVisionErrorException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
*/
public CustomVisionErrorException(final String message, final Response<ResponseBody> response) {
super(message, response);
}

/**
* Initializes a new instance of the CustomVisionErrorException class.
*
* @param message the exception message or the response content if a message is not available
* @param response the HTTP response
* @param body the deserialized response body
*/
public CustomVisionErrorException(final String message, final Response<ResponseBody> response, final CustomVisionError body) {
super(message, response, body);
}

@Override
public CustomVisionError body() {
return (CustomVisionError) super.body();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,41 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The ImagePrediction model.
* Result of an image prediction request.
*/
public class ImagePrediction {
/**
* The id property.
* Prediction Id.
*/
@JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private UUID id;

/**
* The project property.
* Project Id.
*/
@JsonProperty(value = "project", access = JsonProperty.Access.WRITE_ONLY)
private UUID project;

/**
* The iteration property.
* Iteration Id.
*/
@JsonProperty(value = "iteration", access = JsonProperty.Access.WRITE_ONLY)
private UUID iteration;

/**
* The created property.
* Date this prediction was created.
*/
@JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY)
private DateTime created;

/**
* The predictions property.
* List of predictions.
*/
@JsonProperty(value = "predictions", access = JsonProperty.Access.WRITE_ONLY)
private List<Prediction> predictions;

/**
* Get the id value.
* Get prediction Id.
*
* @return the id value
*/
Expand All @@ -57,7 +57,7 @@ public UUID id() {
}

/**
* Get the project value.
* Get project Id.
*
* @return the project value
*/
Expand All @@ -66,7 +66,7 @@ public UUID project() {
}

/**
* Get the iteration value.
* Get iteration Id.
*
* @return the iteration value
*/
Expand All @@ -75,7 +75,7 @@ public UUID iteration() {
}

/**
* Get the created value.
* Get date this prediction was created.
*
* @return the created value
*/
Expand All @@ -84,7 +84,7 @@ public DateTime created() {
}

/**
* Get the predictions value.
* Get list of predictions.
*
* @return the predictions value
*/
Expand Down
Loading