Skip to content

Commit

Permalink
Generated from 0bc892729baf0d049695c873e9afe139211c259d (#2735)
Browse files Browse the repository at this point in the history
Add areaOfInterest and detectObject

* Replace the current swagger with an auto-generated one.
* Add example files for areaOfInterest and detectObject.
* Fix example validation errors for analyze and describe.
* A few fixes for generating java sdk
  • Loading branch information
AutorestCI authored Dec 11, 2018
1 parent f63f53a commit 9985a66
Show file tree
Hide file tree
Showing 23 changed files with 2,838 additions and 1,326 deletions.

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 @@ -22,14 +22,14 @@ public class AdultInfo {
private boolean isAdultContent;

/**
* A value indicating if the image is race.
* A value indicating if the image is racy.
*/
@JsonProperty(value = "isRacyContent")
private boolean isRacyContent;

/**
* Score from 0 to 1 that indicates how much of adult content is within the
* image.
* Score from 0 to 1 that indicates how much the content is considered
* adult-oriented within the image.
*/
@JsonProperty(value = "adultScore")
private double adultScore;
Expand Down Expand Up @@ -61,7 +61,7 @@ public AdultInfo withIsAdultContent(boolean isAdultContent) {
}

/**
* Get a value indicating if the image is race.
* Get a value indicating if the image is racy.
*
* @return the isRacyContent value
*/
Expand All @@ -70,7 +70,7 @@ public boolean isRacyContent() {
}

/**
* Set a value indicating if the image is race.
* Set a value indicating if the image is racy.
*
* @param isRacyContent the isRacyContent value to set
* @return the AdultInfo object itself.
Expand All @@ -81,7 +81,7 @@ public AdultInfo withIsRacyContent(boolean isRacyContent) {
}

/**
* Get score from 0 to 1 that indicates how much of adult content is within the image.
* Get score from 0 to 1 that indicates how much the content is considered adult-oriented within the image.
*
* @return the adultScore value
*/
Expand All @@ -90,7 +90,7 @@ public double adultScore() {
}

/**
* Set score from 0 to 1 that indicates how much of adult content is within the image.
* Set score from 0 to 1 that indicates how much the content is considered adult-oriented within the image.
*
* @param adultScore the adultScore value to set
* @return the AdultInfo object itself.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonProperty;

/**
* Result of AreaOfInterest operation.
*/
public class AreaOfInterestResult {
/**
* A bounding box for an area of interest inside an image.
*/
@JsonProperty(value = "areaOfInterest", access = JsonProperty.Access.WRITE_ONLY)
private BoundingRect areaOfInterest;

/**
* Id of the REST API request.
*/
@JsonProperty(value = "requestId")
private String requestId;

/**
* The metadata property.
*/
@JsonProperty(value = "metadata")
private ImageMetadata metadata;

/**
* Get a bounding box for an area of interest inside an image.
*
* @return the areaOfInterest value
*/
public BoundingRect areaOfInterest() {
return this.areaOfInterest;
}

/**
* Get id of the REST API request.
*
* @return the requestId value
*/
public String requestId() {
return this.requestId;
}

/**
* Set id of the REST API request.
*
* @param requestId the requestId value to set
* @return the AreaOfInterestResult object itself.
*/
public AreaOfInterestResult withRequestId(String requestId) {
this.requestId = requestId;
return this;
}

/**
* Get the metadata value.
*
* @return the metadata value
*/
public ImageMetadata metadata() {
return this.metadata;
}

/**
* Set the metadata value.
*
* @param metadata the metadata value to set
* @return the AreaOfInterestResult object itself.
*/
public AreaOfInterestResult withMetadata(ImageMetadata metadata) {
this.metadata = metadata;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/**
* 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 com.fasterxml.jackson.annotation.JsonProperty;

/**
* A bounding box for an area inside an image.
*/
public class BoundingRect {
/**
* X-coordinate of the top left point of the area, in pixels.
*/
@JsonProperty(value = "x")
private int x;

/**
* Y-coordinate of the top left point of the area, in pixels.
*/
@JsonProperty(value = "y")
private int y;

/**
* Width measured from the top-left point of the area, in pixels.
*/
@JsonProperty(value = "w")
private int w;

/**
* Height measured from the top-left point of the area, in pixels.
*/
@JsonProperty(value = "h")
private int h;

/**
* Get x-coordinate of the top left point of the area, in pixels.
*
* @return the x value
*/
public int x() {
return this.x;
}

/**
* Set x-coordinate of the top left point of the area, in pixels.
*
* @param x the x value to set
* @return the BoundingRect object itself.
*/
public BoundingRect withX(int x) {
this.x = x;
return this;
}

/**
* Get y-coordinate of the top left point of the area, in pixels.
*
* @return the y value
*/
public int y() {
return this.y;
}

/**
* Set y-coordinate of the top left point of the area, in pixels.
*
* @param y the y value to set
* @return the BoundingRect object itself.
*/
public BoundingRect withY(int y) {
this.y = y;
return this;
}

/**
* Get width measured from the top-left point of the area, in pixels.
*
* @return the w value
*/
public int w() {
return this.w;
}

/**
* Set width measured from the top-left point of the area, in pixels.
*
* @param w the w value to set
* @return the BoundingRect object itself.
*/
public BoundingRect withW(int w) {
this.w = w;
return this;
}

/**
* Get height measured from the top-left point of the area, in pixels.
*
* @return the h value
*/
public int h() {
return this.h;
}

/**
* Set height measured from the top-left point of the area, in pixels.
*
* @param h the h value to set
* @return the BoundingRect object itself.
*/
public BoundingRect withH(int h) {
this.h = h;
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Category {
private double score;

/**
* The detail property.
* Details of the identified category.
*/
@JsonProperty(value = "detail")
private CategoryDetail detail;
Expand Down Expand Up @@ -73,7 +73,7 @@ public Category withScore(double score) {
}

/**
* Get the detail value.
* Get details of the identified category.
*
* @return the detail value
*/
Expand All @@ -82,7 +82,7 @@ public CategoryDetail detail() {
}

/**
* Set the detail value.
* Set details of the identified category.
*
* @param detail the detail value to set
* @return the Category object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ public class CelebritiesModel {
private String name;

/**
* Level of confidence ranging from 0 to 1.
* Confidence level for the celebrity recognition as a value ranging from 0
* to 1.
*/
@JsonProperty(value = "confidence")
private double confidence;

/**
* The faceRectangle property.
* Location of the identified face in the image.
*/
@JsonProperty(value = "faceRectangle")
private FaceRectangle faceRectangle;
Expand All @@ -53,7 +54,7 @@ public CelebritiesModel withName(String name) {
}

/**
* Get level of confidence ranging from 0 to 1.
* Get confidence level for the celebrity recognition as a value ranging from 0 to 1.
*
* @return the confidence value
*/
Expand All @@ -62,7 +63,7 @@ public double confidence() {
}

/**
* Set level of confidence ranging from 0 to 1.
* Set confidence level for the celebrity recognition as a value ranging from 0 to 1.
*
* @param confidence the confidence value to set
* @return the CelebritiesModel object itself.
Expand All @@ -73,7 +74,7 @@ public CelebritiesModel withConfidence(double confidence) {
}

/**
* Get the faceRectangle value.
* Get location of the identified face in the image.
*
* @return the faceRectangle value
*/
Expand All @@ -82,7 +83,7 @@ public FaceRectangle faceRectangle() {
}

/**
* Set the faceRectangle value.
* Set location of the identified face in the image.
*
* @param faceRectangle the faceRectangle value to set
* @return the CelebritiesModel object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* List of celebrities recognized in the image.
* Result of domain-specific classifications for the domain of celebrities.
*/
public class CelebrityResults {
/**
* The celebrities property.
* List of celebrities recognized in the image.
*/
@JsonProperty(value = "celebrities")
private List<CelebritiesModel> celebrities;
Expand All @@ -34,7 +34,7 @@ public class CelebrityResults {
private ImageMetadata metadata;

/**
* Get the celebrities value.
* Get list of celebrities recognized in the image.
*
* @return the celebrities value
*/
Expand All @@ -43,7 +43,7 @@ public List<CelebritiesModel> celebrities() {
}

/**
* Set the celebrities value.
* Set list of celebrities recognized in the image.
*
* @param celebrities the celebrities value to set
* @return the CelebrityResults object itself.
Expand Down
Loading

0 comments on commit 9985a66

Please sign in to comment.