Skip to content

Commit

Permalink
Generated from 07a72baedc442fa52b8083006c5f2b90ce4142bf
Browse files Browse the repository at this point in the history
ComputerVision remove non-nullable scalars (#2)

Generally the objects may be unspecified, but when specified, the scalars
contained within them, such as confidence scores, are present.

While this is a breaking change w/r/t to v1.0 of the Azure-named SDK, it is
actually an un-breaking change for our customers who have been using the
hand-crafted [SDK](https://github.com/microsoft/cognitive-vision-windows), which
has been the official SDK up to now.
  • Loading branch information
AutorestCI committed Jun 20, 2018
1 parent 4301c94 commit 99f9f0d
Show file tree
Hide file tree
Showing 47 changed files with 7,530 additions and 0 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
@@ -0,0 +1,11 @@
// 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.

/**
* This package contains the implementation classes for ComputerVisionAPI.
* The Computer Vision API provides state-of-the-art algorithms to process images and return information. For example, it can be used to determine if an image contains mature content, or it can be used to find all the faces in an image. It also has other features like estimating dominant and accent colors, categorizing the content of images, and describing an image with complete English sentences. Additionally, it can also intelligently generate images thumbnails for displaying large images effectively.
*/
package com.microsoft.azure.cognitiveservices.vision.computervision.implementation;
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/**
* 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;

/**
* An object describing whether the image contains adult-oriented content
* and/or is racy.
*/
public class AdultInfo {
/**
* A value indicating if the image contains adult-oriented content.
*/
@JsonProperty(value = "isAdultContent")
private boolean isAdultContent;

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

/**
* Score from 0 to 1 that indicates how much of adult content is within the
* image.
*/
@JsonProperty(value = "adultScore")
private double adultScore;

/**
* Score from 0 to 1 that indicates how suggestive is the image.
*/
@JsonProperty(value = "racyScore")
private double racyScore;

/**
* Get a value indicating if the image contains adult-oriented content.
*
* @return the isAdultContent value
*/
public boolean isAdultContent() {
return this.isAdultContent;
}

/**
* Set a value indicating if the image contains adult-oriented content.
*
* @param isAdultContent the isAdultContent value to set
* @return the AdultInfo object itself.
*/
public AdultInfo withIsAdultContent(boolean isAdultContent) {
this.isAdultContent = isAdultContent;
return this;
}

/**
* Get a value indicating if the image is race.
*
* @return the isRacyContent value
*/
public boolean isRacyContent() {
return this.isRacyContent;
}

/**
* Set a value indicating if the image is race.
*
* @param isRacyContent the isRacyContent value to set
* @return the AdultInfo object itself.
*/
public AdultInfo withIsRacyContent(boolean isRacyContent) {
this.isRacyContent = isRacyContent;
return this;
}

/**
* Get score from 0 to 1 that indicates how much of adult content is within the image.
*
* @return the adultScore value
*/
public double adultScore() {
return this.adultScore;
}

/**
* Set score from 0 to 1 that indicates how much of adult content is within the image.
*
* @param adultScore the adultScore value to set
* @return the AdultInfo object itself.
*/
public AdultInfo withAdultScore(double adultScore) {
this.adultScore = adultScore;
return this;
}

/**
* Get score from 0 to 1 that indicates how suggestive is the image.
*
* @return the racyScore value
*/
public double racyScore() {
return this.racyScore;
}

/**
* Set score from 0 to 1 that indicates how suggestive is the image.
*
* @param racyScore the racyScore value to set
* @return the AdultInfo object itself.
*/
public AdultInfo withRacyScore(double racyScore) {
this.racyScore = racyScore;
return this;
}

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

/**
* Defines values for AzureRegions.
*/
public enum AzureRegions {
/** Enum value westus. */
WESTUS("westus"),

/** Enum value westeurope. */
WESTEUROPE("westeurope"),

/** Enum value southeastasia. */
SOUTHEASTASIA("southeastasia"),

/** Enum value eastus2. */
EASTUS2("eastus2"),

/** Enum value westcentralus. */
WESTCENTRALUS("westcentralus"),

/** Enum value westus2. */
WESTUS2("westus2"),

/** Enum value eastus. */
EASTUS("eastus"),

/** Enum value southcentralus. */
SOUTHCENTRALUS("southcentralus"),

/** Enum value northeurope. */
NORTHEUROPE("northeurope"),

/** Enum value eastasia. */
EASTASIA("eastasia"),

/** Enum value australiaeast. */
AUSTRALIAEAST("australiaeast"),

/** Enum value brazilsouth. */
BRAZILSOUTH("brazilsouth");

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

AzureRegions(String value) {
this.value = value;
}

/**
* Parses a serialized value to a AzureRegions instance.
*
* @param value the serialized value to parse.
* @return the parsed AzureRegions object, or null if unable to parse.
*/
@JsonCreator
public static AzureRegions fromString(String value) {
AzureRegions[] items = AzureRegions.values();
for (AzureRegions item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* 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;

/**
* An object describing identified category.
*/
public class Category {
/**
* Name of the category.
*/
@JsonProperty(value = "name")
private String name;

/**
* Scoring of the category.
*/
@JsonProperty(value = "score")
private double score;

/**
* The detail property.
*/
@JsonProperty(value = "detail")
private CategoryDetail detail;

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

/**
* Set name of the category.
*
* @param name the name value to set
* @return the Category object itself.
*/
public Category withName(String name) {
this.name = name;
return this;
}

/**
* Get scoring of the category.
*
* @return the score value
*/
public double score() {
return this.score;
}

/**
* Set scoring of the category.
*
* @param score the score value to set
* @return the Category object itself.
*/
public Category withScore(double score) {
this.score = score;
return this;
}

/**
* Get the detail value.
*
* @return the detail value
*/
public CategoryDetail detail() {
return this.detail;
}

/**
* Set the detail value.
*
* @param detail the detail value to set
* @return the Category object itself.
*/
public Category withDetail(CategoryDetail detail) {
this.detail = detail;
return this;
}

}
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;

/**
* An object describing additional category details.
*/
public class CategoryDetail {
/**
* An array of celebrities if any identified.
*/
@JsonProperty(value = "celebrities")
private List<CelebritiesModel> celebrities;

/**
* An array of landmarks if any identified.
*/
@JsonProperty(value = "landmarks")
private List<LandmarksModel> landmarks;

/**
* Get an array of celebrities if any identified.
*
* @return the celebrities value
*/
public List<CelebritiesModel> celebrities() {
return this.celebrities;
}

/**
* Set an array of celebrities if any identified.
*
* @param celebrities the celebrities value to set
* @return the CategoryDetail object itself.
*/
public CategoryDetail withCelebrities(List<CelebritiesModel> celebrities) {
this.celebrities = celebrities;
return this;
}

/**
* Get an array of landmarks if any identified.
*
* @return the landmarks value
*/
public List<LandmarksModel> landmarks() {
return this.landmarks;
}

/**
* Set an array of landmarks if any identified.
*
* @param landmarks the landmarks value to set
* @return the CategoryDetail object itself.
*/
public CategoryDetail withLandmarks(List<LandmarksModel> landmarks) {
this.landmarks = landmarks;
return this;
}

}
Loading

0 comments on commit 99f9f0d

Please sign in to comment.