Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR cognitiveservices/resource-manager] Make filter a method parameter #35

Merged
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
Expand Up @@ -22,11 +22,13 @@ public class CheckSkuAvailabilityParameter {
private List<SkuName> skus;

/**
* The Kind of the resource. Possible values include: 'Academic',
* 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', 'Bing.SpellCheck',
* 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'Emotion', 'Face',
* 'LUIS', 'Recommendations', 'SpeakerRecognition', 'Speech',
* 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'.
* The Kind of the resource. Possible values include:
* 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7',
* 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision',
* 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction',
* 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker',
* 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics',
* 'TextTranslation', 'WebLM'.
*/
@JsonProperty(value = "kind", required = true)
private Kind kind;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
*/
public class CheckSkuAvailabilityResult {
/**
* The Kind of the resource. Possible values include: 'Academic',
* 'Bing.Autosuggest', 'Bing.Search', 'Bing.Speech', 'Bing.SpellCheck',
* 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'Emotion', 'Face',
* 'LUIS', 'Recommendations', 'SpeakerRecognition', 'Speech',
* 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'.
* The Kind of the resource. Possible values include:
* 'Bing.Autosuggest.v7', 'Bing.CustomSearch', 'Bing.Search.v7',
* 'Bing.Speech', 'Bing.SpellCheck.v7', 'ComputerVision',
* 'ContentModerator', 'CustomSpeech', 'CustomVision.Prediction',
* 'CustomVision.Training', 'Emotion', 'Face', 'LUIS', 'QnAMaker',
* 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics',
* 'TextTranslation', 'WebLM'.
*/
@JsonProperty(value = "kind")
private Kind kind;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,100 +8,85 @@

package com.microsoft.azure.management.cognitiveservices;

import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for Kind.
*/
public final class Kind {
/** Static value Academic for Kind. */
public static final Kind ACADEMIC = new Kind("Academic");
public final class Kind extends ExpandableStringEnum<Kind> {
/** Static value Bing.Autosuggest.v7 for Kind. */
public static final Kind BING_AUTOSUGGESTV7 = fromString("Bing.Autosuggest.v7");

/** Static value Bing.Autosuggest for Kind. */
public static final Kind BING_AUTOSUGGEST = new Kind("Bing.Autosuggest");
/** Static value Bing.CustomSearch for Kind. */
public static final Kind BING_CUSTOM_SEARCH = fromString("Bing.CustomSearch");

/** Static value Bing.Search for Kind. */
public static final Kind BING_SEARCH = new Kind("Bing.Search");
/** Static value Bing.Search.v7 for Kind. */
public static final Kind BING_SEARCHV7 = fromString("Bing.Search.v7");

/** Static value Bing.Speech for Kind. */
public static final Kind BING_SPEECH = new Kind("Bing.Speech");
public static final Kind BING_SPEECH = fromString("Bing.Speech");

/** Static value Bing.SpellCheck for Kind. */
public static final Kind BING_SPELL_CHECK = new Kind("Bing.SpellCheck");
/** Static value Bing.SpellCheck.v7 for Kind. */
public static final Kind BING_SPELL_CHECKV7 = fromString("Bing.SpellCheck.v7");

/** Static value ComputerVision for Kind. */
public static final Kind COMPUTER_VISION = new Kind("ComputerVision");
public static final Kind COMPUTER_VISION = fromString("ComputerVision");

/** Static value ContentModerator for Kind. */
public static final Kind CONTENT_MODERATOR = new Kind("ContentModerator");
public static final Kind CONTENT_MODERATOR = fromString("ContentModerator");

/** Static value CustomSpeech for Kind. */
public static final Kind CUSTOM_SPEECH = new Kind("CustomSpeech");
public static final Kind CUSTOM_SPEECH = fromString("CustomSpeech");

/** Static value CustomVision.Prediction for Kind. */
public static final Kind CUSTOM_VISION_PREDICTION = fromString("CustomVision.Prediction");

/** Static value CustomVision.Training for Kind. */
public static final Kind CUSTOM_VISION_TRAINING = fromString("CustomVision.Training");

/** Static value Emotion for Kind. */
public static final Kind EMOTION = new Kind("Emotion");
public static final Kind EMOTION = fromString("Emotion");

/** Static value Face for Kind. */
public static final Kind FACE = new Kind("Face");
public static final Kind FACE = fromString("Face");

/** Static value LUIS for Kind. */
public static final Kind LUIS = new Kind("LUIS");
public static final Kind LUIS = fromString("LUIS");

/** Static value Recommendations for Kind. */
public static final Kind RECOMMENDATIONS = new Kind("Recommendations");
/** Static value QnAMaker for Kind. */
public static final Kind QN_AMAKER = fromString("QnAMaker");

/** Static value SpeakerRecognition for Kind. */
public static final Kind SPEAKER_RECOGNITION = new Kind("SpeakerRecognition");

/** Static value Speech for Kind. */
public static final Kind SPEECH = new Kind("Speech");
public static final Kind SPEAKER_RECOGNITION = fromString("SpeakerRecognition");

/** Static value SpeechTranslation for Kind. */
public static final Kind SPEECH_TRANSLATION = new Kind("SpeechTranslation");
public static final Kind SPEECH_TRANSLATION = fromString("SpeechTranslation");

/** Static value TextAnalytics for Kind. */
public static final Kind TEXT_ANALYTICS = new Kind("TextAnalytics");
public static final Kind TEXT_ANALYTICS = fromString("TextAnalytics");

/** Static value TextTranslation for Kind. */
public static final Kind TEXT_TRANSLATION = new Kind("TextTranslation");
public static final Kind TEXT_TRANSLATION = fromString("TextTranslation");

/** Static value WebLM for Kind. */
public static final Kind WEB_LM = new Kind("WebLM");

private String value;
public static final Kind WEB_LM = fromString("WebLM");

/**
* Creates a custom value for Kind.
* @param value the custom value
* Creates or finds a Kind from its string representation.
* @param name a name to look for
* @return the corresponding Kind
*/
public Kind(String value) {
this.value = value;
}

@JsonValue
@Override
public String toString() {
return value;
}

@Override
public int hashCode() {
return value.hashCode();
@JsonCreator
public static Kind fromString(String name) {
return fromString(name, Kind.class);
}

@Override
public boolean equals(Object obj) {
if (!(obj instanceof Kind)) {
return false;
}
if (obj == this) {
return true;
}
Kind rhs = (Kind) obj;
if (value == null) {
return rhs.value == null;
} else {
return value.equals(rhs.value);
}
/**
* @return known Kind values
*/
public static Collection<Kind> values() {
return values(Kind.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* 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.management.cognitiveservices;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* A metric name.
*/
public class MetricName {
/**
* The name of the metric.
*/
@JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private String value;

/**
* The friendly name of the metric.
*/
@JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY)
private String localizedValue;

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

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,46 @@

package com.microsoft.azure.management.cognitiveservices;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for ProvisioningState.
*/
public enum ProvisioningState {
/** Enum value Creating. */
CREATING("Creating"),
public final class ProvisioningState extends ExpandableStringEnum<ProvisioningState> {
/** Static value Creating for ProvisioningState. */
public static final ProvisioningState CREATING = fromString("Creating");

/** Enum value ResolvingDNS. */
RESOLVING_DNS("ResolvingDNS"),
/** Static value ResolvingDNS for ProvisioningState. */
public static final ProvisioningState RESOLVING_DNS = fromString("ResolvingDNS");

/** Enum value Succeeded. */
SUCCEEDED("Succeeded"),
/** Static value Moving for ProvisioningState. */
public static final ProvisioningState MOVING = fromString("Moving");

/** Enum value Failed. */
FAILED("Failed");
/** Static value Deleting for ProvisioningState. */
public static final ProvisioningState DELETING = fromString("Deleting");

/** The actual serialized value for a ProvisioningState instance. */
private String value;
/** Static value Succeeded for ProvisioningState. */
public static final ProvisioningState SUCCEEDED = fromString("Succeeded");

ProvisioningState(String value) {
this.value = value;
}
/** Static value Failed for ProvisioningState. */
public static final ProvisioningState FAILED = fromString("Failed");

/**
* Parses a serialized value to a ProvisioningState instance.
*
* @param value the serialized value to parse.
* @return the parsed ProvisioningState object, or null if unable to parse.
* Creates or finds a ProvisioningState from its string representation.
* @param name a name to look for
* @return the corresponding ProvisioningState
*/
@JsonCreator
public static ProvisioningState fromString(String value) {
ProvisioningState[] items = ProvisioningState.values();
for (ProvisioningState item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
public static ProvisioningState fromString(String name) {
return fromString(name, ProvisioningState.class);
}

@JsonValue
@Override
public String toString() {
return this.value;
/**
* @return known ProvisioningState values
*/
public static Collection<ProvisioningState> values() {
return values(ProvisioningState.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* 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.management.cognitiveservices;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for QuotaUsageStatus.
*/
public final class QuotaUsageStatus extends ExpandableStringEnum<QuotaUsageStatus> {
/** Static value Included for QuotaUsageStatus. */
public static final QuotaUsageStatus INCLUDED = fromString("Included");

/** Static value Blocked for QuotaUsageStatus. */
public static final QuotaUsageStatus BLOCKED = fromString("Blocked");

/** Static value InOverage for QuotaUsageStatus. */
public static final QuotaUsageStatus IN_OVERAGE = fromString("InOverage");

/** Static value Unknown for QuotaUsageStatus. */
public static final QuotaUsageStatus UNKNOWN = fromString("Unknown");

/**
* Creates or finds a QuotaUsageStatus from its string representation.
* @param name a name to look for
* @return the corresponding QuotaUsageStatus
*/
@JsonCreator
public static QuotaUsageStatus fromString(String name) {
return fromString(name, QuotaUsageStatus.class);
}

/**
* @return known QuotaUsageStatus values
*/
public static Collection<QuotaUsageStatus> values() {
return values(QuotaUsageStatus.class);
}
}
Loading