From cafe5a9f5dcb6c8abd4fa32ce8ff8bffba63be0c Mon Sep 17 00:00:00 2001 From: XiaofeiCao Date: Mon, 2 Sep 2024 16:20:41 +0800 Subject: [PATCH 1/4] fix --- .../generator/core/mapper/ChoiceMapper.java | 4 ++-- .../generator/core/mapper/MapperUtils.java | 13 ++++++++--- .../core/mapper/SealedChoiceMapper.java | 4 ++-- .../mgmt/mapper/FluentChoiceMapper.java | 23 +++++++++++++++++++ .../mgmt/mapper/FluentMapperFactory.java | 12 ++++++++++ .../mgmt/mapper/FluentSealedChoiceMapper.java | 23 +++++++++++++++++++ 6 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentChoiceMapper.java create mode 100644 packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentSealedChoiceMapper.java diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ChoiceMapper.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ChoiceMapper.java index 7d6051263b..285bab88aa 100644 --- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ChoiceMapper.java +++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/ChoiceMapper.java @@ -17,7 +17,7 @@ public class ChoiceMapper implements IMapper { private static final ChoiceMapper INSTANCE = new ChoiceMapper(); Map parsed = new ConcurrentHashMap<>(); - private ChoiceMapper() { + protected ChoiceMapper() { } /** @@ -47,6 +47,6 @@ public IType map(ChoiceSchema enumType) { } private IType createChoiceType(ChoiceSchema enumType) { - return MapperUtils.createEnumType(enumType, true); + return MapperUtils.createEnumType(enumType, true, true); } } diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/MapperUtils.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/MapperUtils.java index 244cee2184..72dc862ed3 100644 --- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/MapperUtils.java +++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/MapperUtils.java @@ -27,8 +27,15 @@ /** * Contains utility methods to help map from modelerfour to Java Autorest. */ -final class MapperUtils { - static IType createEnumType(ChoiceSchema enumType, boolean expandable) { +public final class MapperUtils { + /** + * Create enum client type from code model. + * @param enumType code model schema for enum + * @param expandable whether it's expandable enum + * @param useCodeModelNameForEnumMember whether to use code model enum member name for client enum member name + * @return enum client type + */ + public static IType createEnumType(ChoiceSchema enumType, boolean expandable, boolean useCodeModelNameForEnumMember) { JavaSettings settings = JavaSettings.getInstance(); String enumTypeName = enumType.getLanguage().getJava().getName(); @@ -54,7 +61,7 @@ static IType createEnumType(ChoiceSchema enumType, boolean expandable) { for (ChoiceValue enumValue : enumType.getChoices()) { String enumName = enumValue.getValue(); String enumDescription = null; - if (!settings.isFluent()) { + if (useCodeModelNameForEnumMember) { if (enumValue.getLanguage() != null && enumValue.getLanguage().getJava() != null && enumValue.getLanguage().getJava().getName() != null) { enumName = enumValue.getLanguage().getJava().getName(); diff --git a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/SealedChoiceMapper.java b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/SealedChoiceMapper.java index 6ed293e4c7..d4da30cdb1 100644 --- a/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/SealedChoiceMapper.java +++ b/packages/http-client-java/generator/http-client-generator-core/src/main/java/com/microsoft/typespec/http/client/generator/core/mapper/SealedChoiceMapper.java @@ -13,7 +13,7 @@ public class SealedChoiceMapper implements IMapper { private static final SealedChoiceMapper INSTANCE = new SealedChoiceMapper(); Map parsed = new ConcurrentHashMap<>(); - private SealedChoiceMapper() { + protected SealedChoiceMapper() { } public static SealedChoiceMapper getInstance() { @@ -38,6 +38,6 @@ public IType map(SealedChoiceSchema enumType) { } private IType createSealedChoiceType(SealedChoiceSchema enumType) { - return MapperUtils.createEnumType(enumType, false); + return MapperUtils.createEnumType(enumType, false, true); } } diff --git a/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentChoiceMapper.java b/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentChoiceMapper.java new file mode 100644 index 0000000000..e6268fb02f --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentChoiceMapper.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.typespec.http.client.generator.mgmt.mapper; + +import com.microsoft.typespec.http.client.generator.core.extension.model.codemodel.ChoiceSchema; +import com.microsoft.typespec.http.client.generator.core.mapper.ChoiceMapper; +import com.microsoft.typespec.http.client.generator.core.mapper.MapperUtils; +import com.microsoft.typespec.http.client.generator.core.model.clientmodel.IType; + +public class FluentChoiceMapper extends ChoiceMapper { + private static final FluentChoiceMapper INSTANCE = new FluentChoiceMapper(); + private FluentChoiceMapper() {} + + public static FluentChoiceMapper getInstance() { + return INSTANCE; + } + + @Override + public IType map(ChoiceSchema enumType) { + return MapperUtils.createEnumType(enumType, true, false); + } +} diff --git a/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentMapperFactory.java b/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentMapperFactory.java index 5d7ca385fb..4dd9bf090c 100644 --- a/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentMapperFactory.java +++ b/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentMapperFactory.java @@ -3,6 +3,7 @@ package com.microsoft.typespec.http.client.generator.mgmt.mapper; +import com.microsoft.typespec.http.client.generator.core.mapper.ChoiceMapper; import com.microsoft.typespec.http.client.generator.core.mapper.ClientMethodMapper; import com.microsoft.typespec.http.client.generator.core.mapper.DefaultMapperFactory; import com.microsoft.typespec.http.client.generator.core.mapper.ExceptionMapper; @@ -11,6 +12,7 @@ import com.microsoft.typespec.http.client.generator.core.mapper.ObjectMapper; import com.microsoft.typespec.http.client.generator.core.mapper.PrimitiveMapper; import com.microsoft.typespec.http.client.generator.core.mapper.ProxyMethodMapper; +import com.microsoft.typespec.http.client.generator.core.mapper.SealedChoiceMapper; public class FluentMapperFactory extends DefaultMapperFactory { @@ -48,4 +50,14 @@ public PrimitiveMapper getPrimitiveMapper() { public ModelMapper getModelMapper() { return FluentModelMapper.getInstance(); } + + @Override + public ChoiceMapper getChoiceMapper() { + return FluentChoiceMapper.getInstance(); + } + + @Override + public SealedChoiceMapper getSealedChoiceMapper() { + return FluentSealedChoiceMapper.getInstance(); + } } diff --git a/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentSealedChoiceMapper.java b/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentSealedChoiceMapper.java new file mode 100644 index 0000000000..bc8f99cbfb --- /dev/null +++ b/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/mapper/FluentSealedChoiceMapper.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.microsoft.typespec.http.client.generator.mgmt.mapper; + +import com.microsoft.typespec.http.client.generator.core.extension.model.codemodel.SealedChoiceSchema; +import com.microsoft.typespec.http.client.generator.core.mapper.MapperUtils; +import com.microsoft.typespec.http.client.generator.core.mapper.SealedChoiceMapper; +import com.microsoft.typespec.http.client.generator.core.model.clientmodel.IType; + +public class FluentSealedChoiceMapper extends SealedChoiceMapper { + private static final FluentSealedChoiceMapper INSTANCE = new FluentSealedChoiceMapper(); + private FluentSealedChoiceMapper() {} + + public static FluentSealedChoiceMapper getInstance() { + return INSTANCE; + } + + @Override + public IType map(SealedChoiceSchema enumType) { + return MapperUtils.createEnumType(enumType, false, false); + } +} From a7525a3dfc0774070fcb5c80b0a7561d5b0be0a0 Mon Sep 17 00:00:00 2001 From: XiaofeiCao Date: Tue, 3 Sep 2024 11:43:46 +0800 Subject: [PATCH 2/4] fix --- .../fluent/TypeSpecFluentMapperFactory.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/fluent/TypeSpecFluentMapperFactory.java b/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/fluent/TypeSpecFluentMapperFactory.java index 9779f6830a..43ba72a224 100644 --- a/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/fluent/TypeSpecFluentMapperFactory.java +++ b/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/fluent/TypeSpecFluentMapperFactory.java @@ -3,6 +3,8 @@ package com.microsoft.typespec.http.client.generator.fluent; +import com.microsoft.typespec.http.client.generator.core.mapper.ChoiceMapper; +import com.microsoft.typespec.http.client.generator.core.mapper.SealedChoiceMapper; import com.microsoft.typespec.http.client.generator.mgmt.mapper.FluentMapperFactory; import com.microsoft.typespec.http.client.generator.core.mapper.ClientMapper; import com.microsoft.typespec.http.client.generator.core.mapper.ModelMapper; @@ -37,4 +39,14 @@ public ModelMapper getModelMapper() { public ModelPropertyMapper getModelPropertyMapper() { return TypeSpecFluentModelPropertyMapper.getInstance(); } + + @Override + public ChoiceMapper getChoiceMapper() { + return ChoiceMapper.getInstance(); + } + + @Override + public SealedChoiceMapper getSealedChoiceMapper() { + return SealedChoiceMapper.getInstance(); + } } From b0cfe2976511dc7603f8dc1a08226cdcdbde17f1 Mon Sep 17 00:00:00 2001 From: XiaofeiCao Date: Tue, 3 Sep 2024 11:44:11 +0800 Subject: [PATCH 3/4] add/fix test --- .../generator/http-client-generator-test/tsp/arm.tsp | 2 +- .../com/microsoft/typespec/http/client/generator/Main.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/http-client-java/generator/http-client-generator-test/tsp/arm.tsp b/packages/http-client-java/generator/http-client-generator-test/tsp/arm.tsp index 6b76738b36..ef52c170d8 100644 --- a/packages/http-client-java/generator/http-client-generator-test/tsp/arm.tsp +++ b/packages/http-client-java/generator/http-client-generator-test/tsp/arm.tsp @@ -114,7 +114,7 @@ union DogKind { string, @doc("Species golden") - Golden: "golden", + Golden: "golden_dog", } @doc("Test extensible enum type for discriminator") diff --git a/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/Main.java b/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/Main.java index e71cf9afe4..3e38554758 100644 --- a/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/Main.java +++ b/packages/http-client-java/generator/http-client-generator/src/main/java/com/microsoft/typespec/http/client/generator/Main.java @@ -43,6 +43,7 @@ public class Main { private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); + private static final String DEFAULT_OUTPUT_DIR = "http-client-generator-test/tsp-output/"; private static Yaml yaml = null; @@ -50,7 +51,7 @@ public class Main { // java -jar target/azure-typespec-extension-jar-with-dependencies.jar public static void main(String[] args) throws IOException { // parameters - String inputYamlFileName = "typespec-tests/tsp-output/code-model.yaml"; + String inputYamlFileName = DEFAULT_OUTPUT_DIR + "code-model.yaml"; if (args.length >= 1) { inputYamlFileName = args[0]; } @@ -200,7 +201,7 @@ private static EmitterOptions loadEmitterOptions(CodeModel codeModel) { // output path if (CoreUtils.isNullOrEmpty(options.getOutputDir())) { - options.setOutputDir("typespec-tests/tsp-output/"); + options.setOutputDir(DEFAULT_OUTPUT_DIR); } else if (!options.getOutputDir().endsWith("/")) { options.setOutputDir(options.getOutputDir() + "/"); } @@ -212,7 +213,7 @@ private static EmitterOptions loadEmitterOptions(CodeModel codeModel) { if (options == null) { // default if emitterOptions fails options = new EmitterOptions(); - options.setOutputDir("typespec-tests/tsp-output/"); + options.setOutputDir(DEFAULT_OUTPUT_DIR); if (codeModel.getLanguage().getJava() != null && !CoreUtils.isNullOrEmpty( codeModel.getLanguage().getJava().getNamespace())) { options.setNamespace(codeModel.getLanguage().getJava().getNamespace()); From 094fc884697aa3884e1e8ce01e6c553382a4d16a Mon Sep 17 00:00:00 2001 From: XiaofeiCao Date: Tue, 3 Sep 2024 13:31:04 +0800 Subject: [PATCH 4/4] regen --- .../models/ManagedServiceIdentityType.java | 10 +++++----- .../models/resources/models/ProvisioningState.java | 6 +++--- .../cadl/armresourceprovider/models/ActionType.java | 2 +- .../java/com/cadl/armresourceprovider/models/Dog.java | 2 +- .../com/cadl/armresourceprovider/models/DogKind.java | 4 ++-- .../com/cadl/armresourceprovider/models/Golden.java | 2 +- .../models/ManagedServiceIdentityType.java | 10 +++++----- .../com/cadl/armresourceprovider/models/Origin.java | 6 +++--- .../armresourceprovider/models/ProvisioningState.java | 6 +++--- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/commontypes/managedidentity/models/ManagedServiceIdentityType.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/commontypes/managedidentity/models/ManagedServiceIdentityType.java index a677cdcc5f..9e329bcb41 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/commontypes/managedidentity/models/ManagedServiceIdentityType.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/commontypes/managedidentity/models/ManagedServiceIdentityType.java @@ -12,24 +12,24 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + public static final ManagedServiceIdentityType SYSTEM_AND_USER_ASSIGNED_V3 = fromString("SystemAssigned,UserAssigned"); /** diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/resources/models/ProvisioningState.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/resources/models/ProvisioningState.java index 49207cad95..7876e51d66 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/resources/models/ProvisioningState.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/azure/resourcemanager/models/resources/models/ProvisioningState.java @@ -12,17 +12,17 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for ProvisioningState. + * Resource has been created. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ProvisioningState. + * Resource creation failed. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ProvisioningState. + * Resource creation was canceled. */ public static final ProvisioningState CANCELED = fromString("Canceled"); diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ActionType.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ActionType.java index 93a5a6f09c..02efd4ddcd 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ActionType.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ActionType.java @@ -13,7 +13,7 @@ */ public final class ActionType extends ExpandableStringEnum { /** - * Static value Internal for ActionType. + * Actions are for internal-only APIs. */ public static final ActionType INTERNAL = fromString("Internal"); diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Dog.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Dog.java index 86e782823c..c94d050951 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Dog.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Dog.java @@ -16,7 +16,7 @@ */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", defaultImpl = Dog.class, visible = true) @JsonTypeName("Dog") -@JsonSubTypes({ @JsonSubTypes.Type(name = "golden", value = Golden.class) }) +@JsonSubTypes({ @JsonSubTypes.Type(name = "golden_dog", value = Golden.class) }) @Fluent public class Dog { /* diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/DogKind.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/DogKind.java index 5346ed18c8..61727a0bc2 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/DogKind.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/DogKind.java @@ -13,9 +13,9 @@ */ public final class DogKind extends ExpandableStringEnum { /** - * Static value golden for DogKind. + * Species golden. */ - public static final DogKind GOLDEN = fromString("golden"); + public static final DogKind GOLDEN = fromString("golden_dog"); /** * Creates a new instance of DogKind value. diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Golden.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Golden.java index 077195d193..b43f5cfe9b 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Golden.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Golden.java @@ -12,7 +12,7 @@ * Golden dog model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "kind", defaultImpl = Golden.class, visible = true) -@JsonTypeName("golden") +@JsonTypeName("golden_dog") @Fluent public final class Golden extends Dog { /** diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ManagedServiceIdentityType.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ManagedServiceIdentityType.java index 3870b028de..6454707cce 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ManagedServiceIdentityType.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ManagedServiceIdentityType.java @@ -13,24 +13,24 @@ */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** - * Static value None for ManagedServiceIdentityType. + * No managed identity. */ public static final ManagedServiceIdentityType NONE = fromString("None"); /** - * Static value SystemAssigned for ManagedServiceIdentityType. + * System assigned managed identity. */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); /** - * Static value UserAssigned for ManagedServiceIdentityType. + * User assigned managed identity. */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); /** - * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + * System and user assigned managed identity. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + public static final ManagedServiceIdentityType SYSTEM_AND_USER_ASSIGNED_V3 = fromString("SystemAssigned,UserAssigned"); /** diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Origin.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Origin.java index 9292d338d5..d1260fa759 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Origin.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/Origin.java @@ -14,17 +14,17 @@ */ public final class Origin extends ExpandableStringEnum { /** - * Static value user for Origin. + * Indicates the operation is initiated by a user. */ public static final Origin USER = fromString("user"); /** - * Static value system for Origin. + * Indicates the operation is initiated by a system. */ public static final Origin SYSTEM = fromString("system"); /** - * Static value user,system for Origin. + * Indicates the operation is initiated by a user or system. */ public static final Origin USER_SYSTEM = fromString("user,system"); diff --git a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ProvisioningState.java b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ProvisioningState.java index 8587874645..7a471ad4d0 100644 --- a/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ProvisioningState.java +++ b/packages/http-client-java/generator/http-client-generator-test/src/main/java/com/cadl/armresourceprovider/models/ProvisioningState.java @@ -13,17 +13,17 @@ */ public final class ProvisioningState extends ExpandableStringEnum { /** - * Static value Succeeded for ProvisioningState. + * Resource has been created. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); /** - * Static value Failed for ProvisioningState. + * Resource creation failed. */ public static final ProvisioningState FAILED = fromString("Failed"); /** - * Static value Canceled for ProvisioningState. + * Resource creation was canceled. */ public static final ProvisioningState CANCELED = fromString("Canceled");