in extension-base/src/main/java/com/azure/autorest/extension/base/plugin/JavaSettings.java [293:457]
private JavaSettings(AutorestSettings autorestSettings,
Map<String, Object> modelerSettings,
boolean azure,
boolean sdkIntegration,
String fluent,
boolean regeneratePom,
String fileHeaderText,
String serviceName,
String packageKeyword,
boolean clientSideValidations,
String clientTypePrefix,
boolean generateClientInterfaces,
boolean generateClientAsImpl,
String implementationSubpackage,
String modelsSubpackage,
String customTypes,
String customTypesSubpackage,
String fluentSubpackage,
boolean requiredParameterClientMethods,
boolean generateSyncAsyncClients,
boolean generateBuilderPerClient,
String syncMethods,
boolean clientLogger,
boolean requiredFieldsAsConstructorArgs,
boolean serviceInterfaceAsPublic,
String artifactId,
String credentialType,
String credentialScopes,
String customizationJarPath,
String customizationClass,
boolean optionalConstantAsEnum,
boolean dataPlaneClient,
boolean useIterable,
List<String> serviceVersions,
String clientFlattenAnnotationTarget,
String keyCredentialHeaderName,
boolean clientBuilderDisabled,
Map<String, PollingDetails> pollingConfig,
boolean generateSamples,
boolean generateTests,
boolean generateSendRequestMethod,
boolean annotateGettersAndSettersForSerialization,
String defaultHttpExceptionType,
boolean useDefaultHttpStatusCodeToExceptionTypeMapping,
Map<Integer, String> httpStatusCodeToExceptionTypeMapping,
boolean handlePartialUpdate,
boolean genericResponseTypes,
boolean streamStyleSerialization,
boolean isSyncStackEnabled,
boolean outputModelImmutable,
boolean streamResponseInputStream,
boolean noCustomHeaders,
boolean includeReadOnlyInConstructorArgs,
boolean urlAsString,
boolean uuidAsString,
boolean disableRequiredPropertyAnnotation,
boolean pageSizeEnabled,
boolean useKeyCredential,
boolean nullByteArrayMapsToEmptyArray,
boolean generateGraalVmConfig,
String flavor,
boolean disableTypedHeadersMethods,
boolean shareJsonSerializableCode,
boolean android) {
this.autorestSettings = autorestSettings;
this.modelerSettings = new ModelerSettings(modelerSettings);
this.azure = azure;
this.sdkIntegration = sdkIntegration;
this.fluent = fluent == null ? Fluent.NONE : (fluent.isEmpty() || fluent.equalsIgnoreCase("true")
? Fluent.PREMIUM : Fluent.valueOf(fluent.toUpperCase(Locale.ROOT)));
this.regeneratePom = regeneratePom;
this.fileHeaderText = fileHeaderText;
this.serviceName = serviceName;
this.packageName = packageKeyword;
this.clientSideValidations = clientSideValidations;
this.clientTypePrefix = clientTypePrefix;
this.generateClientInterfaces = generateClientInterfaces;
this.generateClientAsImpl = generateClientAsImpl || generateSyncAsyncClients || generateClientInterfaces;
this.implementationSubpackage = implementationSubpackage;
this.modelsSubpackage = modelsSubpackage;
this.customTypes = (customTypes == null || customTypes.isEmpty())
? new ArrayList<>() : Arrays.asList(customTypes.split(","));
this.customTypesSubpackage = customTypesSubpackage;
this.fluentSubpackage = fluentSubpackage;
this.requiredParameterClientMethods = requiredParameterClientMethods;
this.generateSyncAsyncClients = generateSyncAsyncClients;
this.generateBuilderPerClient = generateBuilderPerClient;
this.syncMethods = SyncMethodsGeneration.fromValue(syncMethods);
this.clientLogger = clientLogger;
this.requiredFieldsAsConstructorArgs = requiredFieldsAsConstructorArgs;
this.serviceInterfaceAsPublic = serviceInterfaceAsPublic;
this.artifactId = artifactId;
this.optionalConstantAsEnum = optionalConstantAsEnum;
this.dataPlaneClient = dataPlaneClient;
this.useIterable = useIterable;
this.serviceVersions = serviceVersions;
this.clientFlattenAnnotationTarget =
(clientFlattenAnnotationTarget == null || clientFlattenAnnotationTarget.isEmpty())
? ClientFlattenAnnotationTarget.TYPE
: ClientFlattenAnnotationTarget.valueOf(clientFlattenAnnotationTarget.toUpperCase(Locale.ROOT));
if (credentialType != null) {
String[] splits = credentialType.split(",");
this.credentialTypes = Arrays.stream(splits)
.map(String::trim)
.map(CredentialType::fromValue)
.collect(Collectors.toSet());
}
if (credentialScopes != null) {
String[] splits = credentialScopes.split(",");
this.credentialScopes = Arrays.stream(splits)
.map(String::trim)
.map(split -> {
if (!split.startsWith("\"")) {
split = "\"" + split + "\"";
}
return split;
})
.collect(Collectors.toSet());
}
this.customizationJarPath = customizationJarPath;
this.customizationClass = customizationClass;
this.keyCredentialHeaderName = keyCredentialHeaderName;
this.clientBuilderDisabled = clientBuilderDisabled;
if (pollingConfig != null) {
if (!pollingConfig.containsKey("default")) {
pollingConfig.put("default", new PollingDetails());
}
}
this.pollingConfig = pollingConfig;
this.generateSamples = generateSamples;
this.generateTests = generateTests;
this.generateSendRequestMethod = generateSendRequestMethod;
this.annotateGettersAndSettersForSerialization = annotateGettersAndSettersForSerialization;
// Error HTTP status code exception type handling.
this.defaultHttpExceptionType = defaultHttpExceptionType;
this.useDefaultHttpStatusCodeToExceptionTypeMapping = useDefaultHttpStatusCodeToExceptionTypeMapping;
this.httpStatusCodeToExceptionTypeMapping = httpStatusCodeToExceptionTypeMapping;
this.handlePartialUpdate = handlePartialUpdate;
this.genericResponseTypes = genericResponseTypes;
this.streamStyleSerialization = streamStyleSerialization;
this.syncStackEnabled = isSyncStackEnabled;
this.outputModelImmutable = outputModelImmutable;
this.isInputStreamForBinary = streamResponseInputStream;
this.noCustomHeaders = noCustomHeaders;
this.includeReadOnlyInConstructorArgs = includeReadOnlyInConstructorArgs;
this.urlAsString = urlAsString;
this.uuidAsString = uuidAsString;
this.disableRequiredJsonAnnotation = disableRequiredPropertyAnnotation;
this.pageSizeEnabled = pageSizeEnabled;
this.useKeyCredential = useKeyCredential;
this.nullByteArrayMapsToEmptyArray = nullByteArrayMapsToEmptyArray;
this.generateGraalVmConfig = generateGraalVmConfig;
this.flavor = flavor;
this.disableTypedHeadersMethods = disableTypedHeadersMethods;
this.shareJsonSerializableCode = shareJsonSerializableCode;
this.android = android;
}