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

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 the isAdultContent value.
*
* @return the isAdultContent value
*/
public boolean isAdultContent() {
return this.isAdultContent;
}

/**
* Set the isAdultContent value.
*
* @param isAdultContent the isAdultContent value to set
* @return the AdultInfo object itself.
*/
public AdultInfo withIsAdultContent(boolean isAdultContent) {
this.isAdultContent = isAdultContent;
return this;
}

/**
* Get the isRacyContent value.
*
* @return the isRacyContent value
*/
public boolean isRacyContent() {
return this.isRacyContent;
}

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

/**
* Get the adultScore value.
*
* @return the adultScore value
*/
public double adultScore() {
return this.adultScore;
}

/**
* Set the adultScore value.
*
* @param adultScore the adultScore value to set
* @return the AdultInfo object itself.
*/
public AdultInfo withAdultScore(double adultScore) {
this.adultScore = adultScore;
return this;
}

/**
* Get the racyScore value.
*
* @return the racyScore value
*/
public double racyScore() {
return this.racyScore;
}

/**
* Set the racyScore value.
*
* @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;

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;

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 the name value.
*
* @return the name value
*/
public String name() {
return this.name;
}

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

/**
* Get the score value.
*
* @return the score value
*/
public Double score() {
return this.score;
}

/**
* Set the score value.
*
* @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,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.computervision;

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;

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

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

}
Loading