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 logic/resource-manager] Change some string Microsoft.Logic modeled enums back into enums #2356

Merged
merged 2 commits into from
Sep 10, 2018
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 @@ -8,40 +8,52 @@

package com.microsoft.azure.management.logic.v2018_07_01_preview;

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

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

/** Static value AS2 for AgreementType. */
public static final AgreementType AS2 = fromString("AS2");
/** Enum value AS2. */
AS2("AS2"),

/** Static value X12 for AgreementType. */
public static final AgreementType X12 = fromString("X12");
/** Enum value X12. */
X12("X12"),

/** Static value Edifact for AgreementType. */
public static final AgreementType EDIFACT = fromString("Edifact");
/** Enum value Edifact. */
EDIFACT("Edifact");

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

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

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

/**
* @return known AgreementType values
*/
public static Collection<AgreementType> values() {
return values(AgreementType.class);
@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,61 @@

package com.microsoft.azure.management.logic.v2018_07_01_preview;

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

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

/** Static value Monday for DayOfWeek. */
public static final DayOfWeek MONDAY = fromString("Monday");
/** Enum value Monday. */
MONDAY("Monday"),

/** Static value Tuesday for DayOfWeek. */
public static final DayOfWeek TUESDAY = fromString("Tuesday");
/** Enum value Tuesday. */
TUESDAY("Tuesday"),

/** Static value Wednesday for DayOfWeek. */
public static final DayOfWeek WEDNESDAY = fromString("Wednesday");
/** Enum value Wednesday. */
WEDNESDAY("Wednesday"),

/** Static value Thursday for DayOfWeek. */
public static final DayOfWeek THURSDAY = fromString("Thursday");
/** Enum value Thursday. */
THURSDAY("Thursday"),

/** Static value Friday for DayOfWeek. */
public static final DayOfWeek FRIDAY = fromString("Friday");
/** Enum value Friday. */
FRIDAY("Friday"),

/** Static value Saturday for DayOfWeek. */
public static final DayOfWeek SATURDAY = fromString("Saturday");
/** Enum value Saturday. */
SATURDAY("Saturday");

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

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

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

/**
* @return known DayOfWeek values
*/
public static Collection<DayOfWeek> values() {
return values(DayOfWeek.class);
@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,61 @@

package com.microsoft.azure.management.logic.v2018_07_01_preview;

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

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

/** Static value Monday for DaysOfWeek. */
public static final DaysOfWeek MONDAY = fromString("Monday");
/** Enum value Monday. */
MONDAY("Monday"),

/** Static value Tuesday for DaysOfWeek. */
public static final DaysOfWeek TUESDAY = fromString("Tuesday");
/** Enum value Tuesday. */
TUESDAY("Tuesday"),

/** Static value Wednesday for DaysOfWeek. */
public static final DaysOfWeek WEDNESDAY = fromString("Wednesday");
/** Enum value Wednesday. */
WEDNESDAY("Wednesday"),

/** Static value Thursday for DaysOfWeek. */
public static final DaysOfWeek THURSDAY = fromString("Thursday");
/** Enum value Thursday. */
THURSDAY("Thursday"),

/** Static value Friday for DaysOfWeek. */
public static final DaysOfWeek FRIDAY = fromString("Friday");
/** Enum value Friday. */
FRIDAY("Friday"),

/** Static value Saturday for DaysOfWeek. */
public static final DaysOfWeek SATURDAY = fromString("Saturday");
/** Enum value Saturday. */
SATURDAY("Saturday");

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

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

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

/**
* @return known DaysOfWeek values
*/
public static Collection<DaysOfWeek> values() {
return values(DaysOfWeek.class);
@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,49 @@

package com.microsoft.azure.management.logic.v2018_07_01_preview;

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

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

/** Static value Comma for EdifactDecimalIndicator. */
public static final EdifactDecimalIndicator COMMA = fromString("Comma");
/** Enum value Comma. */
COMMA("Comma"),

/** Static value Decimal for EdifactDecimalIndicator. */
public static final EdifactDecimalIndicator DECIMAL = fromString("Decimal");
/** Enum value Decimal. */
DECIMAL("Decimal");

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

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

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

/**
* @return known EdifactDecimalIndicator values
*/
public static Collection<EdifactDecimalIndicator> values() {
return values(EdifactDecimalIndicator.class);
@JsonValue
@Override
public String toString() {
return this.value;
}
}
Loading