From 9062a43b7000b53b1fae8dc36e74c01c18bd5edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pra=C5=BCak?= Date: Thu, 14 Jul 2022 14:40:21 +0200 Subject: [PATCH] [codegen] update codegen tests --- .../outputs/CompositePathResponse.java | 31 +- .../outputs/IndexingPolicyResponse.java | 24 +- ...ontainerGetPropertiesResponseResource.java | 24 +- .../com/pulumi/foobar/outputs/TopLevel.java | 24 +- .../com/pulumi/plant/outputs/Container.java | 43 +- .../config_endpoints/inputs/Endpoints.java | 1225 ++++++++--------- .../aws/ec2_getAmi/outputs/GetAmiResult.java | 24 +- .../awsnative/config/inputs/IgnoreTags.java | 31 +- .../outputs/ActionGroupResponse.java | 67 +- .../outputs/DiagnosticsResponse.java | 17 +- .../outputs/GetActionRuleByNameResult.java | 55 +- .../outputs/SuppressionResponse.java | 17 +- ...tIntegrationAccountKeyVaultKeysResult.java | 24 +- .../web/outputs/GetWebAppSlotResult.java | 24 +- .../web/outputs/SiteConfigResponse.java | 24 +- .../example/outputs/ArgFunctionResult.java | 24 +- .../com/pulumi/example/outputs/ConfigMap.java | 24 +- .../com/pulumi/example/outputs/Object.java | 49 +- .../outputs/ObjectWithNodeOptionalInputs.java | 31 +- .../example/outputs/SomeOtherObject.java | 24 +- .../AvailabilityInformationResponse.java | 37 +- .../outputs/BillingMeterDetailsResponse.java | 43 +- .../outputs/ConfigurationResponse.java | 73 +- .../outputs/CostInformationResponse.java | 31 +- .../outputs/DescriptionResponse.java | 55 +- .../outputs/DimensionsResponse.java | 61 +- .../outputs/FilterablePropertyResponse.java | 31 +- .../outputs/HierarchyInformationResponse.java | 43 +- .../outputs/ImageInformationResponse.java | 31 +- .../myedgeorder/outputs/LinkResponse.java | 31 +- .../outputs/ListConfigurationsResult.java | 31 +- .../outputs/ListProductFamiliesResult.java | 31 +- .../outputs/Pav2MeterDetailsResponse.java | 43 +- .../outputs/ProductFamilyResponse.java | 67 +- .../outputs/ProductLineResponse.java | 67 +- .../myedgeorder/outputs/ProductResponse.java | 67 +- .../outputs/PurchaseMeterDetailsResponse.java | 55 +- .../outputs/SpecificationResponse.java | 31 +- .../pulumi/mypkg/outputs/GetAmiIdsFilter.java | 31 +- .../pulumi/mypkg/outputs/GetAmiIdsResult.java | 61 +- .../outputs/ListStorageAccountKeysResult.java | 24 +- .../outputs/StorageAccountKeyResponse.java | 43 +- .../FuncWithAllOptionalInputsResult.java | 24 +- .../outputs/FuncWithDefaultValueResult.java | 24 +- .../outputs/FuncWithDictParamResult.java | 24 +- .../outputs/FuncWithListParamResult.java | 24 +- .../GetBastionShareableLinkResult.java | 24 +- .../mypkg/outputs/GetClientConfigResult.java | 43 +- ...tegrationRuntimeObjectMetadatumResult.java | 31 +- .../outputs/ListStorageAccountKeysResult.java | 24 +- .../SsisEnvironmentReferenceResponse.java | 43 +- .../outputs/SsisEnvironmentResponse.java | 55 +- .../mypkg/outputs/SsisFolderResponse.java | 43 +- .../mypkg/outputs/SsisPackageResponse.java | 67 +- .../mypkg/outputs/SsisParameterResponse.java | 91 +- .../mypkg/outputs/SsisProjectResponse.java | 67 +- .../mypkg/outputs/SsisVariableResponse.java | 61 +- .../outputs/StorageAccountKeyResponse.java | 43 +- .../java/com/pulumi/example/outputs/Chew.java | 24 +- .../com/pulumi/example/outputs/Laser.java | 37 +- .../java/com/pulumi/example/outputs/Rec.java | 24 +- .../java/com/pulumi/example/outputs/Toy.java | 37 +- .../java/com/pulumi/example/outputs/Pet.java | 24 +- .../java/com/pulumi/example/outputs/Pet.java | 24 +- .../com/pulumi/plant/outputs/Container.java | 43 +- .../java/com/pulumi/example/outputs/Foo.java | 55 +- .../java/com/pulumi/example/outputs/Foo.java | 55 +- .../example/outputs/ArgFunctionResult.java | 24 +- .../example/outputs/ArgFunctionResult.java | 24 +- .../com/pulumi/example/outputs/ConfigMap.java | 24 +- .../com/pulumi/example/outputs/Object.java | 49 +- .../outputs/ObjectWithNodeOptionalInputs.java | 31 +- .../example/outputs/SomeOtherObject.java | 24 +- .../example/outputs/ArgFunctionResult.java | 24 +- .../com/pulumi/example/outputs/ConfigMap.java | 24 +- .../com/pulumi/example/outputs/Object.java | 49 +- .../outputs/ObjectWithNodeOptionalInputs.java | 31 +- .../example/outputs/OutputOnlyObjectType.java | 24 +- .../example/outputs/SomeOtherObject.java | 24 +- 79 files changed, 1894 insertions(+), 2262 deletions(-) diff --git a/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/CompositePathResponse.java b/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/CompositePathResponse.java index d627ece5885..e2b64fffe64 100644 --- a/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/CompositePathResponse.java +++ b/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/CompositePathResponse.java @@ -15,21 +15,14 @@ public final class CompositePathResponse { * @return Sort order for composite paths. * */ - private final @Nullable String order; + private @Nullable String order; /** * @return The path for which the indexing behavior applies to. Index paths typically start with root and end with wildcard (/path/*) * */ - private final @Nullable String path; - - @CustomType.Constructor - private CompositePathResponse( - @CustomType.Parameter("order") @Nullable String order, - @CustomType.Parameter("path") @Nullable String path) { - this.order = order; - this.path = path; - } + private @Nullable String path; + private CompositePathResponse() {} /** * @return Sort order for composite paths. * @@ -52,30 +45,32 @@ public static Builder builder() { public static Builder builder(CompositePathResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String order; private @Nullable String path; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(CompositePathResponse defaults) { Objects.requireNonNull(defaults); this.order = defaults.order; this.path = defaults.path; } + @CustomType.Setter public Builder order(@Nullable String order) { this.order = order; return this; } + @CustomType.Setter public Builder path(@Nullable String path) { this.path = path; return this; - } public CompositePathResponse build() { - return new CompositePathResponse(order, path); + } + public CompositePathResponse build() { + final var o = new CompositePathResponse(); + o.order = order; + o.path = path; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/IndexingPolicyResponse.java b/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/IndexingPolicyResponse.java index 62664ca0ceb..5f2ff8f5fb4 100644 --- a/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/IndexingPolicyResponse.java +++ b/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/IndexingPolicyResponse.java @@ -15,13 +15,9 @@ public final class IndexingPolicyResponse { * @return List of composite path list * */ - private final @Nullable List> compositeIndexes; - - @CustomType.Constructor - private IndexingPolicyResponse(@CustomType.Parameter("compositeIndexes") @Nullable List> compositeIndexes) { - this.compositeIndexes = compositeIndexes; - } + private @Nullable List> compositeIndexes; + private IndexingPolicyResponse() {} /** * @return List of composite path list * @@ -37,24 +33,24 @@ public static Builder builder() { public static Builder builder(IndexingPolicyResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable List> compositeIndexes; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(IndexingPolicyResponse defaults) { Objects.requireNonNull(defaults); this.compositeIndexes = defaults.compositeIndexes; } + @CustomType.Setter public Builder compositeIndexes(@Nullable List> compositeIndexes) { this.compositeIndexes = compositeIndexes; return this; - } public IndexingPolicyResponse build() { - return new IndexingPolicyResponse(compositeIndexes); + } + public IndexingPolicyResponse build() { + final var o = new IndexingPolicyResponse(); + o.compositeIndexes = compositeIndexes; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/SqlContainerGetPropertiesResponseResource.java b/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/SqlContainerGetPropertiesResponseResource.java index 80b46e4d49d..a7185c379c8 100644 --- a/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/SqlContainerGetPropertiesResponseResource.java +++ b/pkg/codegen/testing/test/testdata/azure-native-nested-types/java/src/main/java/com/pulumi/azurenative/documentdb/outputs/SqlContainerGetPropertiesResponseResource.java @@ -15,13 +15,9 @@ public final class SqlContainerGetPropertiesResponseResource { * @return The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container * */ - private final @Nullable IndexingPolicyResponse indexingPolicy; - - @CustomType.Constructor - private SqlContainerGetPropertiesResponseResource(@CustomType.Parameter("indexingPolicy") @Nullable IndexingPolicyResponse indexingPolicy) { - this.indexingPolicy = indexingPolicy; - } + private @Nullable IndexingPolicyResponse indexingPolicy; + private SqlContainerGetPropertiesResponseResource() {} /** * @return The configuration of the indexing policy. By default, the indexing is automatic for all document paths within the container * @@ -37,24 +33,24 @@ public static Builder builder() { public static Builder builder(SqlContainerGetPropertiesResponseResource defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable IndexingPolicyResponse indexingPolicy; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SqlContainerGetPropertiesResponseResource defaults) { Objects.requireNonNull(defaults); this.indexingPolicy = defaults.indexingPolicy; } + @CustomType.Setter public Builder indexingPolicy(@Nullable IndexingPolicyResponse indexingPolicy) { this.indexingPolicy = indexingPolicy; return this; - } public SqlContainerGetPropertiesResponseResource build() { - return new SqlContainerGetPropertiesResponseResource(indexingPolicy); + } + public SqlContainerGetPropertiesResponseResource build() { + final var o = new SqlContainerGetPropertiesResponseResource(); + o.indexingPolicy = indexingPolicy; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/dash-named-schema/java/src/main/java/com/pulumi/foobar/outputs/TopLevel.java b/pkg/codegen/testing/test/testdata/dash-named-schema/java/src/main/java/com/pulumi/foobar/outputs/TopLevel.java index 1d0fe259c2b..127ae420608 100644 --- a/pkg/codegen/testing/test/testdata/dash-named-schema/java/src/main/java/com/pulumi/foobar/outputs/TopLevel.java +++ b/pkg/codegen/testing/test/testdata/dash-named-schema/java/src/main/java/com/pulumi/foobar/outputs/TopLevel.java @@ -11,13 +11,9 @@ @CustomType public final class TopLevel { - private final @Nullable String buzz; - - @CustomType.Constructor - private TopLevel(@CustomType.Parameter("buzz") @Nullable String buzz) { - this.buzz = buzz; - } + private @Nullable String buzz; + private TopLevel() {} public Optional buzz() { return Optional.ofNullable(this.buzz); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(TopLevel defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String buzz; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(TopLevel defaults) { Objects.requireNonNull(defaults); this.buzz = defaults.buzz; } + @CustomType.Setter public Builder buzz(@Nullable String buzz) { this.buzz = buzz; return this; - } public TopLevel build() { - return new TopLevel(buzz); + } + public TopLevel build() { + final var o = new TopLevel(); + o.buzz = buzz; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/dashed-import-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java b/pkg/codegen/testing/test/testdata/dashed-import-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java index 186b3ab244f..cd8858e42cd 100644 --- a/pkg/codegen/testing/test/testdata/dashed-import-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java +++ b/pkg/codegen/testing/test/testdata/dashed-import-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java @@ -13,23 +13,12 @@ @CustomType public final class Container { - private final @Nullable ContainerBrightness brightness; - private final @Nullable String color; - private final @Nullable String material; - private final ContainerSize size; - - @CustomType.Constructor - private Container( - @CustomType.Parameter("brightness") @Nullable ContainerBrightness brightness, - @CustomType.Parameter("color") @Nullable String color, - @CustomType.Parameter("material") @Nullable String material, - @CustomType.Parameter("size") ContainerSize size) { - this.brightness = brightness; - this.color = color; - this.material = material; - this.size = size; - } + private @Nullable ContainerBrightness brightness; + private @Nullable String color; + private @Nullable String material; + private ContainerSize size; + private Container() {} public Optional brightness() { return Optional.ofNullable(this.brightness); } @@ -50,17 +39,13 @@ public static Builder builder() { public static Builder builder(Container defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable ContainerBrightness brightness; private @Nullable String color; private @Nullable String material; private ContainerSize size; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Container defaults) { Objects.requireNonNull(defaults); this.brightness = defaults.brightness; @@ -69,23 +54,33 @@ public Builder(Container defaults) { this.size = defaults.size; } + @CustomType.Setter public Builder brightness(@Nullable ContainerBrightness brightness) { this.brightness = brightness; return this; } + @CustomType.Setter public Builder color(@Nullable String color) { this.color = color; return this; } + @CustomType.Setter public Builder material(@Nullable String material) { this.material = material; return this; } + @CustomType.Setter public Builder size(ContainerSize size) { this.size = Objects.requireNonNull(size); return this; - } public Container build() { - return new Container(brightness, color, material, size); + } + public Container build() { + final var o = new Container(); + o.brightness = brightness; + o.color = color; + o.material = material; + o.size = size; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/config_endpoints/inputs/Endpoints.java b/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/config_endpoints/inputs/Endpoints.java index 8588c350a09..37873020358 100644 --- a/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/config_endpoints/inputs/Endpoints.java +++ b/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/config_endpoints/inputs/Endpoints.java @@ -313,311 +313,7 @@ public final class Endpoints { private @Nullable String workspaces; private @Nullable String xray; - @CustomType.Constructor - - private Endpoints() { - this.accessanalyzer = null; - this.account = null; - this.acm = null; - this.acmpca = null; - this.alexaforbusiness = null; - this.amp = null; - this.amplify = null; - this.amplifybackend = null; - this.apigateway = null; - this.apigatewayv2 = null; - this.appautoscaling = null; - this.appconfig = null; - this.appflow = null; - this.appintegrations = null; - this.appintegrationsservice = null; - this.applicationautoscaling = null; - this.applicationcostprofiler = null; - this.applicationdiscovery = null; - this.applicationdiscoveryservice = null; - this.applicationinsights = null; - this.appmesh = null; - this.appregistry = null; - this.apprunner = null; - this.appstream = null; - this.appsync = null; - this.athena = null; - this.auditmanager = null; - this.augmentedairuntime = null; - this.autoscaling = null; - this.autoscalingplans = null; - this.backup = null; - this.batch = null; - this.braket = null; - this.budgets = null; - this.chime = null; - this.cloud9 = null; - this.cloudcontrol = null; - this.cloudcontrolapi = null; - this.clouddirectory = null; - this.cloudformation = null; - this.cloudfront = null; - this.cloudhsm = null; - this.cloudhsmv2 = null; - this.cloudsearch = null; - this.cloudsearchdomain = null; - this.cloudtrail = null; - this.cloudwatch = null; - this.cloudwatchevents = null; - this.cloudwatchlogs = null; - this.codeartifact = null; - this.codebuild = null; - this.codecommit = null; - this.codedeploy = null; - this.codeguruprofiler = null; - this.codegurureviewer = null; - this.codepipeline = null; - this.codestar = null; - this.codestarconnections = null; - this.codestarnotifications = null; - this.cognitoidentity = null; - this.cognitoidentityprovider = null; - this.cognitoidp = null; - this.cognitosync = null; - this.comprehend = null; - this.comprehendmedical = null; - this.config = null; - this.configservice = null; - this.connect = null; - this.connectcontactlens = null; - this.connectparticipant = null; - this.costandusagereportservice = null; - this.costexplorer = null; - this.cur = null; - this.databasemigration = null; - this.databasemigrationservice = null; - this.dataexchange = null; - this.datapipeline = null; - this.datasync = null; - this.dax = null; - this.detective = null; - this.devicefarm = null; - this.devopsguru = null; - this.directconnect = null; - this.dlm = null; - this.dms = null; - this.docdb = null; - this.ds = null; - this.dynamodb = null; - this.dynamodbstreams = null; - this.ec2 = null; - this.ec2instanceconnect = null; - this.ecr = null; - this.ecrpublic = null; - this.ecs = null; - this.efs = null; - this.eks = null; - this.elasticache = null; - this.elasticbeanstalk = null; - this.elasticinference = null; - this.elasticsearch = null; - this.elasticsearchservice = null; - this.elastictranscoder = null; - this.elb = null; - this.elbv2 = null; - this.emr = null; - this.emrcontainers = null; - this.es = null; - this.eventbridge = null; - this.events = null; - this.finspace = null; - this.finspacedata = null; - this.firehose = null; - this.fis = null; - this.fms = null; - this.forecast = null; - this.forecastquery = null; - this.forecastqueryservice = null; - this.forecastservice = null; - this.frauddetector = null; - this.fsx = null; - this.gamelift = null; - this.glacier = null; - this.globalaccelerator = null; - this.glue = null; - this.gluedatabrew = null; - this.greengrass = null; - this.greengrassv2 = null; - this.groundstation = null; - this.guardduty = null; - this.health = null; - this.healthlake = null; - this.honeycode = null; - this.iam = null; - this.identitystore = null; - this.imagebuilder = null; - this.inspector = null; - this.iot = null; - this.iot1clickdevices = null; - this.iot1clickdevicesservice = null; - this.iot1clickprojects = null; - this.iotanalytics = null; - this.iotdataplane = null; - this.iotdeviceadvisor = null; - this.iotevents = null; - this.ioteventsdata = null; - this.iotfleethub = null; - this.iotjobsdataplane = null; - this.iotsecuretunneling = null; - this.iotsitewise = null; - this.iotthingsgraph = null; - this.iotwireless = null; - this.kafka = null; - this.kafkaconnect = null; - this.kendra = null; - this.kinesis = null; - this.kinesisanalytics = null; - this.kinesisanalyticsv2 = null; - this.kinesisvideo = null; - this.kinesisvideoarchivedmedia = null; - this.kinesisvideomedia = null; - this.kinesisvideosignalingchannels = null; - this.kms = null; - this.lakeformation = null; - this.lambda = null; - this.lexmodelbuilding = null; - this.lexmodelbuildingservice = null; - this.lexmodels = null; - this.lexmodelsv2 = null; - this.lexruntime = null; - this.lexruntimeservice = null; - this.lexruntimev2 = null; - this.licensemanager = null; - this.lightsail = null; - this.location = null; - this.lookoutequipment = null; - this.lookoutforvision = null; - this.lookoutmetrics = null; - this.machinelearning = null; - this.macie = null; - this.macie2 = null; - this.managedblockchain = null; - this.marketplacecatalog = null; - this.marketplacecommerceanalytics = null; - this.marketplaceentitlement = null; - this.marketplaceentitlementservice = null; - this.marketplacemetering = null; - this.mediaconnect = null; - this.mediaconvert = null; - this.medialive = null; - this.mediapackage = null; - this.mediapackagevod = null; - this.mediastore = null; - this.mediastoredata = null; - this.mediatailor = null; - this.memorydb = null; - this.mgn = null; - this.migrationhub = null; - this.migrationhubconfig = null; - this.mobile = null; - this.mobileanalytics = null; - this.mq = null; - this.mturk = null; - this.mwaa = null; - this.neptune = null; - this.networkfirewall = null; - this.networkmanager = null; - this.nimblestudio = null; - this.opsworks = null; - this.opsworkscm = null; - this.organizations = null; - this.outposts = null; - this.personalize = null; - this.personalizeevents = null; - this.personalizeruntime = null; - this.pi = null; - this.pinpoint = null; - this.pinpointemail = null; - this.pinpointsmsvoice = null; - this.polly = null; - this.pricing = null; - this.prometheus = null; - this.prometheusservice = null; - this.proton = null; - this.qldb = null; - this.qldbsession = null; - this.quicksight = null; - this.ram = null; - this.rds = null; - this.rdsdata = null; - this.rdsdataservice = null; - this.redshift = null; - this.redshiftdata = null; - this.rekognition = null; - this.resourcegroups = null; - this.resourcegroupstagging = null; - this.resourcegroupstaggingapi = null; - this.robomaker = null; - this.route53 = null; - this.route53domains = null; - this.route53recoverycontrolconfig = null; - this.route53recoveryreadiness = null; - this.route53resolver = null; - this.s3 = null; - this.s3control = null; - this.s3outposts = null; - this.sagemaker = null; - this.sagemakeredgemanager = null; - this.sagemakerfeaturestoreruntime = null; - this.sagemakerruntime = null; - this.savingsplans = null; - this.schemas = null; - this.sdb = null; - this.secretsmanager = null; - this.securityhub = null; - this.serverlessapplicationrepository = null; - this.serverlessapprepo = null; - this.serverlessrepo = null; - this.servicecatalog = null; - this.servicediscovery = null; - this.servicequotas = null; - this.ses = null; - this.sesv2 = null; - this.sfn = null; - this.shield = null; - this.signer = null; - this.simpledb = null; - this.sms = null; - this.snowball = null; - this.sns = null; - this.sqs = null; - this.ssm = null; - this.ssmcontacts = null; - this.ssmincidents = null; - this.sso = null; - this.ssoadmin = null; - this.ssooidc = null; - this.stepfunctions = null; - this.storagegateway = null; - this.sts = null; - this.support = null; - this.swf = null; - this.synthetics = null; - this.textract = null; - this.timestreamquery = null; - this.timestreamwrite = null; - this.transcribe = null; - this.transcribeservice = null; - this.transcribestreaming = null; - this.transcribestreamingservice = null; - this.transfer = null; - this.translate = null; - this.waf = null; - this.wafregional = null; - this.wafv2 = null; - this.wellarchitected = null; - this.workdocs = null; - this.worklink = null; - this.workmail = null; - this.workmailmessageflow = null; - this.workspaces = null; - this.xray = null; - } + private Endpoints() {} public Optional accessanalyzer() { return Optional.ofNullable(this.accessanalyzer); } @@ -1529,7 +1225,7 @@ public static Builder builder() { public static Builder builder(Endpoints defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String accessanalyzer; private @Nullable String account; @@ -1832,11 +1528,7 @@ public static final class Builder { private @Nullable String workmailmessageflow; private @Nullable String workspaces; private @Nullable String xray; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Endpoints defaults) { Objects.requireNonNull(defaults); this.accessanalyzer = defaults.accessanalyzer; @@ -2142,1514 +1834,1815 @@ public Builder(Endpoints defaults) { this.xray = defaults.xray; } + @CustomType.Setter public Builder accessanalyzer(@Nullable String accessanalyzer) { this.accessanalyzer = accessanalyzer; return this; } + @CustomType.Setter public Builder account(@Nullable String account) { this.account = account; return this; } + @CustomType.Setter public Builder acm(@Nullable String acm) { this.acm = acm; return this; } + @CustomType.Setter public Builder acmpca(@Nullable String acmpca) { this.acmpca = acmpca; return this; } + @CustomType.Setter public Builder alexaforbusiness(@Nullable String alexaforbusiness) { this.alexaforbusiness = alexaforbusiness; return this; } + @CustomType.Setter public Builder amp(@Nullable String amp) { this.amp = amp; return this; } + @CustomType.Setter public Builder amplify(@Nullable String amplify) { this.amplify = amplify; return this; } + @CustomType.Setter public Builder amplifybackend(@Nullable String amplifybackend) { this.amplifybackend = amplifybackend; return this; } + @CustomType.Setter public Builder apigateway(@Nullable String apigateway) { this.apigateway = apigateway; return this; } + @CustomType.Setter public Builder apigatewayv2(@Nullable String apigatewayv2) { this.apigatewayv2 = apigatewayv2; return this; } + @CustomType.Setter public Builder appautoscaling(@Nullable String appautoscaling) { this.appautoscaling = appautoscaling; return this; } + @CustomType.Setter public Builder appconfig(@Nullable String appconfig) { this.appconfig = appconfig; return this; } + @CustomType.Setter public Builder appflow(@Nullable String appflow) { this.appflow = appflow; return this; } + @CustomType.Setter public Builder appintegrations(@Nullable String appintegrations) { this.appintegrations = appintegrations; return this; } + @CustomType.Setter public Builder appintegrationsservice(@Nullable String appintegrationsservice) { this.appintegrationsservice = appintegrationsservice; return this; } + @CustomType.Setter public Builder applicationautoscaling(@Nullable String applicationautoscaling) { this.applicationautoscaling = applicationautoscaling; return this; } + @CustomType.Setter public Builder applicationcostprofiler(@Nullable String applicationcostprofiler) { this.applicationcostprofiler = applicationcostprofiler; return this; } + @CustomType.Setter public Builder applicationdiscovery(@Nullable String applicationdiscovery) { this.applicationdiscovery = applicationdiscovery; return this; } + @CustomType.Setter public Builder applicationdiscoveryservice(@Nullable String applicationdiscoveryservice) { this.applicationdiscoveryservice = applicationdiscoveryservice; return this; } + @CustomType.Setter public Builder applicationinsights(@Nullable String applicationinsights) { this.applicationinsights = applicationinsights; return this; } + @CustomType.Setter public Builder appmesh(@Nullable String appmesh) { this.appmesh = appmesh; return this; } + @CustomType.Setter public Builder appregistry(@Nullable String appregistry) { this.appregistry = appregistry; return this; } + @CustomType.Setter public Builder apprunner(@Nullable String apprunner) { this.apprunner = apprunner; return this; } + @CustomType.Setter public Builder appstream(@Nullable String appstream) { this.appstream = appstream; return this; } + @CustomType.Setter public Builder appsync(@Nullable String appsync) { this.appsync = appsync; return this; } + @CustomType.Setter public Builder athena(@Nullable String athena) { this.athena = athena; return this; } + @CustomType.Setter public Builder auditmanager(@Nullable String auditmanager) { this.auditmanager = auditmanager; return this; } + @CustomType.Setter public Builder augmentedairuntime(@Nullable String augmentedairuntime) { this.augmentedairuntime = augmentedairuntime; return this; } + @CustomType.Setter public Builder autoscaling(@Nullable String autoscaling) { this.autoscaling = autoscaling; return this; } + @CustomType.Setter public Builder autoscalingplans(@Nullable String autoscalingplans) { this.autoscalingplans = autoscalingplans; return this; } + @CustomType.Setter public Builder backup(@Nullable String backup) { this.backup = backup; return this; } + @CustomType.Setter public Builder batch(@Nullable String batch) { this.batch = batch; return this; } + @CustomType.Setter public Builder braket(@Nullable String braket) { this.braket = braket; return this; } + @CustomType.Setter public Builder budgets(@Nullable String budgets) { this.budgets = budgets; return this; } + @CustomType.Setter public Builder chime(@Nullable String chime) { this.chime = chime; return this; } + @CustomType.Setter public Builder cloud9(@Nullable String cloud9) { this.cloud9 = cloud9; return this; } + @CustomType.Setter public Builder cloudcontrol(@Nullable String cloudcontrol) { this.cloudcontrol = cloudcontrol; return this; } + @CustomType.Setter public Builder cloudcontrolapi(@Nullable String cloudcontrolapi) { this.cloudcontrolapi = cloudcontrolapi; return this; } + @CustomType.Setter public Builder clouddirectory(@Nullable String clouddirectory) { this.clouddirectory = clouddirectory; return this; } + @CustomType.Setter public Builder cloudformation(@Nullable String cloudformation) { this.cloudformation = cloudformation; return this; } + @CustomType.Setter public Builder cloudfront(@Nullable String cloudfront) { this.cloudfront = cloudfront; return this; } + @CustomType.Setter public Builder cloudhsm(@Nullable String cloudhsm) { this.cloudhsm = cloudhsm; return this; } + @CustomType.Setter public Builder cloudhsmv2(@Nullable String cloudhsmv2) { this.cloudhsmv2 = cloudhsmv2; return this; } + @CustomType.Setter public Builder cloudsearch(@Nullable String cloudsearch) { this.cloudsearch = cloudsearch; return this; } + @CustomType.Setter public Builder cloudsearchdomain(@Nullable String cloudsearchdomain) { this.cloudsearchdomain = cloudsearchdomain; return this; } + @CustomType.Setter public Builder cloudtrail(@Nullable String cloudtrail) { this.cloudtrail = cloudtrail; return this; } + @CustomType.Setter public Builder cloudwatch(@Nullable String cloudwatch) { this.cloudwatch = cloudwatch; return this; } + @CustomType.Setter public Builder cloudwatchevents(@Nullable String cloudwatchevents) { this.cloudwatchevents = cloudwatchevents; return this; } + @CustomType.Setter public Builder cloudwatchlogs(@Nullable String cloudwatchlogs) { this.cloudwatchlogs = cloudwatchlogs; return this; } + @CustomType.Setter public Builder codeartifact(@Nullable String codeartifact) { this.codeartifact = codeartifact; return this; } + @CustomType.Setter public Builder codebuild(@Nullable String codebuild) { this.codebuild = codebuild; return this; } + @CustomType.Setter public Builder codecommit(@Nullable String codecommit) { this.codecommit = codecommit; return this; } + @CustomType.Setter public Builder codedeploy(@Nullable String codedeploy) { this.codedeploy = codedeploy; return this; } + @CustomType.Setter public Builder codeguruprofiler(@Nullable String codeguruprofiler) { this.codeguruprofiler = codeguruprofiler; return this; } + @CustomType.Setter public Builder codegurureviewer(@Nullable String codegurureviewer) { this.codegurureviewer = codegurureviewer; return this; } + @CustomType.Setter public Builder codepipeline(@Nullable String codepipeline) { this.codepipeline = codepipeline; return this; } + @CustomType.Setter public Builder codestar(@Nullable String codestar) { this.codestar = codestar; return this; } + @CustomType.Setter public Builder codestarconnections(@Nullable String codestarconnections) { this.codestarconnections = codestarconnections; return this; } + @CustomType.Setter public Builder codestarnotifications(@Nullable String codestarnotifications) { this.codestarnotifications = codestarnotifications; return this; } + @CustomType.Setter public Builder cognitoidentity(@Nullable String cognitoidentity) { this.cognitoidentity = cognitoidentity; return this; } + @CustomType.Setter public Builder cognitoidentityprovider(@Nullable String cognitoidentityprovider) { this.cognitoidentityprovider = cognitoidentityprovider; return this; } + @CustomType.Setter public Builder cognitoidp(@Nullable String cognitoidp) { this.cognitoidp = cognitoidp; return this; } + @CustomType.Setter public Builder cognitosync(@Nullable String cognitosync) { this.cognitosync = cognitosync; return this; } + @CustomType.Setter public Builder comprehend(@Nullable String comprehend) { this.comprehend = comprehend; return this; } + @CustomType.Setter public Builder comprehendmedical(@Nullable String comprehendmedical) { this.comprehendmedical = comprehendmedical; return this; } + @CustomType.Setter public Builder config(@Nullable String config) { this.config = config; return this; } + @CustomType.Setter public Builder configservice(@Nullable String configservice) { this.configservice = configservice; return this; } + @CustomType.Setter public Builder connect(@Nullable String connect) { this.connect = connect; return this; } + @CustomType.Setter public Builder connectcontactlens(@Nullable String connectcontactlens) { this.connectcontactlens = connectcontactlens; return this; } + @CustomType.Setter public Builder connectparticipant(@Nullable String connectparticipant) { this.connectparticipant = connectparticipant; return this; } + @CustomType.Setter public Builder costandusagereportservice(@Nullable String costandusagereportservice) { this.costandusagereportservice = costandusagereportservice; return this; } + @CustomType.Setter public Builder costexplorer(@Nullable String costexplorer) { this.costexplorer = costexplorer; return this; } + @CustomType.Setter public Builder cur(@Nullable String cur) { this.cur = cur; return this; } + @CustomType.Setter public Builder databasemigration(@Nullable String databasemigration) { this.databasemigration = databasemigration; return this; } + @CustomType.Setter public Builder databasemigrationservice(@Nullable String databasemigrationservice) { this.databasemigrationservice = databasemigrationservice; return this; } + @CustomType.Setter public Builder dataexchange(@Nullable String dataexchange) { this.dataexchange = dataexchange; return this; } + @CustomType.Setter public Builder datapipeline(@Nullable String datapipeline) { this.datapipeline = datapipeline; return this; } + @CustomType.Setter public Builder datasync(@Nullable String datasync) { this.datasync = datasync; return this; } + @CustomType.Setter public Builder dax(@Nullable String dax) { this.dax = dax; return this; } + @CustomType.Setter public Builder detective(@Nullable String detective) { this.detective = detective; return this; } + @CustomType.Setter public Builder devicefarm(@Nullable String devicefarm) { this.devicefarm = devicefarm; return this; } + @CustomType.Setter public Builder devopsguru(@Nullable String devopsguru) { this.devopsguru = devopsguru; return this; } + @CustomType.Setter public Builder directconnect(@Nullable String directconnect) { this.directconnect = directconnect; return this; } + @CustomType.Setter public Builder dlm(@Nullable String dlm) { this.dlm = dlm; return this; } + @CustomType.Setter public Builder dms(@Nullable String dms) { this.dms = dms; return this; } + @CustomType.Setter public Builder docdb(@Nullable String docdb) { this.docdb = docdb; return this; } + @CustomType.Setter public Builder ds(@Nullable String ds) { this.ds = ds; return this; } + @CustomType.Setter public Builder dynamodb(@Nullable String dynamodb) { this.dynamodb = dynamodb; return this; } + @CustomType.Setter public Builder dynamodbstreams(@Nullable String dynamodbstreams) { this.dynamodbstreams = dynamodbstreams; return this; } + @CustomType.Setter public Builder ec2(@Nullable String ec2) { this.ec2 = ec2; return this; } + @CustomType.Setter public Builder ec2instanceconnect(@Nullable String ec2instanceconnect) { this.ec2instanceconnect = ec2instanceconnect; return this; } + @CustomType.Setter public Builder ecr(@Nullable String ecr) { this.ecr = ecr; return this; } + @CustomType.Setter public Builder ecrpublic(@Nullable String ecrpublic) { this.ecrpublic = ecrpublic; return this; } + @CustomType.Setter public Builder ecs(@Nullable String ecs) { this.ecs = ecs; return this; } + @CustomType.Setter public Builder efs(@Nullable String efs) { this.efs = efs; return this; } + @CustomType.Setter public Builder eks(@Nullable String eks) { this.eks = eks; return this; } + @CustomType.Setter public Builder elasticache(@Nullable String elasticache) { this.elasticache = elasticache; return this; } + @CustomType.Setter public Builder elasticbeanstalk(@Nullable String elasticbeanstalk) { this.elasticbeanstalk = elasticbeanstalk; return this; } + @CustomType.Setter public Builder elasticinference(@Nullable String elasticinference) { this.elasticinference = elasticinference; return this; } + @CustomType.Setter public Builder elasticsearch(@Nullable String elasticsearch) { this.elasticsearch = elasticsearch; return this; } + @CustomType.Setter public Builder elasticsearchservice(@Nullable String elasticsearchservice) { this.elasticsearchservice = elasticsearchservice; return this; } + @CustomType.Setter public Builder elastictranscoder(@Nullable String elastictranscoder) { this.elastictranscoder = elastictranscoder; return this; } + @CustomType.Setter public Builder elb(@Nullable String elb) { this.elb = elb; return this; } + @CustomType.Setter public Builder elbv2(@Nullable String elbv2) { this.elbv2 = elbv2; return this; } + @CustomType.Setter public Builder emr(@Nullable String emr) { this.emr = emr; return this; } + @CustomType.Setter public Builder emrcontainers(@Nullable String emrcontainers) { this.emrcontainers = emrcontainers; return this; } + @CustomType.Setter public Builder es(@Nullable String es) { this.es = es; return this; } + @CustomType.Setter public Builder eventbridge(@Nullable String eventbridge) { this.eventbridge = eventbridge; return this; } + @CustomType.Setter public Builder events(@Nullable String events) { this.events = events; return this; } + @CustomType.Setter public Builder finspace(@Nullable String finspace) { this.finspace = finspace; return this; } + @CustomType.Setter public Builder finspacedata(@Nullable String finspacedata) { this.finspacedata = finspacedata; return this; } + @CustomType.Setter public Builder firehose(@Nullable String firehose) { this.firehose = firehose; return this; } + @CustomType.Setter public Builder fis(@Nullable String fis) { this.fis = fis; return this; } + @CustomType.Setter public Builder fms(@Nullable String fms) { this.fms = fms; return this; } + @CustomType.Setter public Builder forecast(@Nullable String forecast) { this.forecast = forecast; return this; } + @CustomType.Setter public Builder forecastquery(@Nullable String forecastquery) { this.forecastquery = forecastquery; return this; } + @CustomType.Setter public Builder forecastqueryservice(@Nullable String forecastqueryservice) { this.forecastqueryservice = forecastqueryservice; return this; } + @CustomType.Setter public Builder forecastservice(@Nullable String forecastservice) { this.forecastservice = forecastservice; return this; } + @CustomType.Setter public Builder frauddetector(@Nullable String frauddetector) { this.frauddetector = frauddetector; return this; } + @CustomType.Setter public Builder fsx(@Nullable String fsx) { this.fsx = fsx; return this; } + @CustomType.Setter public Builder gamelift(@Nullable String gamelift) { this.gamelift = gamelift; return this; } + @CustomType.Setter public Builder glacier(@Nullable String glacier) { this.glacier = glacier; return this; } + @CustomType.Setter public Builder globalaccelerator(@Nullable String globalaccelerator) { this.globalaccelerator = globalaccelerator; return this; } + @CustomType.Setter public Builder glue(@Nullable String glue) { this.glue = glue; return this; } + @CustomType.Setter public Builder gluedatabrew(@Nullable String gluedatabrew) { this.gluedatabrew = gluedatabrew; return this; } + @CustomType.Setter public Builder greengrass(@Nullable String greengrass) { this.greengrass = greengrass; return this; } + @CustomType.Setter public Builder greengrassv2(@Nullable String greengrassv2) { this.greengrassv2 = greengrassv2; return this; } + @CustomType.Setter public Builder groundstation(@Nullable String groundstation) { this.groundstation = groundstation; return this; } + @CustomType.Setter public Builder guardduty(@Nullable String guardduty) { this.guardduty = guardduty; return this; } + @CustomType.Setter public Builder health(@Nullable String health) { this.health = health; return this; } + @CustomType.Setter public Builder healthlake(@Nullable String healthlake) { this.healthlake = healthlake; return this; } + @CustomType.Setter public Builder honeycode(@Nullable String honeycode) { this.honeycode = honeycode; return this; } + @CustomType.Setter public Builder iam(@Nullable String iam) { this.iam = iam; return this; } + @CustomType.Setter public Builder identitystore(@Nullable String identitystore) { this.identitystore = identitystore; return this; } + @CustomType.Setter public Builder imagebuilder(@Nullable String imagebuilder) { this.imagebuilder = imagebuilder; return this; } + @CustomType.Setter public Builder inspector(@Nullable String inspector) { this.inspector = inspector; return this; } + @CustomType.Setter public Builder iot(@Nullable String iot) { this.iot = iot; return this; } + @CustomType.Setter public Builder iot1clickdevices(@Nullable String iot1clickdevices) { this.iot1clickdevices = iot1clickdevices; return this; } + @CustomType.Setter public Builder iot1clickdevicesservice(@Nullable String iot1clickdevicesservice) { this.iot1clickdevicesservice = iot1clickdevicesservice; return this; } + @CustomType.Setter public Builder iot1clickprojects(@Nullable String iot1clickprojects) { this.iot1clickprojects = iot1clickprojects; return this; } + @CustomType.Setter public Builder iotanalytics(@Nullable String iotanalytics) { this.iotanalytics = iotanalytics; return this; } + @CustomType.Setter public Builder iotdataplane(@Nullable String iotdataplane) { this.iotdataplane = iotdataplane; return this; } + @CustomType.Setter public Builder iotdeviceadvisor(@Nullable String iotdeviceadvisor) { this.iotdeviceadvisor = iotdeviceadvisor; return this; } + @CustomType.Setter public Builder iotevents(@Nullable String iotevents) { this.iotevents = iotevents; return this; } + @CustomType.Setter public Builder ioteventsdata(@Nullable String ioteventsdata) { this.ioteventsdata = ioteventsdata; return this; } + @CustomType.Setter public Builder iotfleethub(@Nullable String iotfleethub) { this.iotfleethub = iotfleethub; return this; } + @CustomType.Setter public Builder iotjobsdataplane(@Nullable String iotjobsdataplane) { this.iotjobsdataplane = iotjobsdataplane; return this; } + @CustomType.Setter public Builder iotsecuretunneling(@Nullable String iotsecuretunneling) { this.iotsecuretunneling = iotsecuretunneling; return this; } + @CustomType.Setter public Builder iotsitewise(@Nullable String iotsitewise) { this.iotsitewise = iotsitewise; return this; } + @CustomType.Setter public Builder iotthingsgraph(@Nullable String iotthingsgraph) { this.iotthingsgraph = iotthingsgraph; return this; } + @CustomType.Setter public Builder iotwireless(@Nullable String iotwireless) { this.iotwireless = iotwireless; return this; } + @CustomType.Setter public Builder kafka(@Nullable String kafka) { this.kafka = kafka; return this; } + @CustomType.Setter public Builder kafkaconnect(@Nullable String kafkaconnect) { this.kafkaconnect = kafkaconnect; return this; } + @CustomType.Setter public Builder kendra(@Nullable String kendra) { this.kendra = kendra; return this; } + @CustomType.Setter public Builder kinesis(@Nullable String kinesis) { this.kinesis = kinesis; return this; } + @CustomType.Setter public Builder kinesisanalytics(@Nullable String kinesisanalytics) { this.kinesisanalytics = kinesisanalytics; return this; } + @CustomType.Setter public Builder kinesisanalyticsv2(@Nullable String kinesisanalyticsv2) { this.kinesisanalyticsv2 = kinesisanalyticsv2; return this; } + @CustomType.Setter public Builder kinesisvideo(@Nullable String kinesisvideo) { this.kinesisvideo = kinesisvideo; return this; } + @CustomType.Setter public Builder kinesisvideoarchivedmedia(@Nullable String kinesisvideoarchivedmedia) { this.kinesisvideoarchivedmedia = kinesisvideoarchivedmedia; return this; } + @CustomType.Setter public Builder kinesisvideomedia(@Nullable String kinesisvideomedia) { this.kinesisvideomedia = kinesisvideomedia; return this; } + @CustomType.Setter public Builder kinesisvideosignalingchannels(@Nullable String kinesisvideosignalingchannels) { this.kinesisvideosignalingchannels = kinesisvideosignalingchannels; return this; } + @CustomType.Setter public Builder kms(@Nullable String kms) { this.kms = kms; return this; } + @CustomType.Setter public Builder lakeformation(@Nullable String lakeformation) { this.lakeformation = lakeformation; return this; } + @CustomType.Setter public Builder lambda(@Nullable String lambda) { this.lambda = lambda; return this; } + @CustomType.Setter public Builder lexmodelbuilding(@Nullable String lexmodelbuilding) { this.lexmodelbuilding = lexmodelbuilding; return this; } + @CustomType.Setter public Builder lexmodelbuildingservice(@Nullable String lexmodelbuildingservice) { this.lexmodelbuildingservice = lexmodelbuildingservice; return this; } + @CustomType.Setter public Builder lexmodels(@Nullable String lexmodels) { this.lexmodels = lexmodels; return this; } + @CustomType.Setter public Builder lexmodelsv2(@Nullable String lexmodelsv2) { this.lexmodelsv2 = lexmodelsv2; return this; } + @CustomType.Setter public Builder lexruntime(@Nullable String lexruntime) { this.lexruntime = lexruntime; return this; } + @CustomType.Setter public Builder lexruntimeservice(@Nullable String lexruntimeservice) { this.lexruntimeservice = lexruntimeservice; return this; } + @CustomType.Setter public Builder lexruntimev2(@Nullable String lexruntimev2) { this.lexruntimev2 = lexruntimev2; return this; } + @CustomType.Setter public Builder licensemanager(@Nullable String licensemanager) { this.licensemanager = licensemanager; return this; } + @CustomType.Setter public Builder lightsail(@Nullable String lightsail) { this.lightsail = lightsail; return this; } + @CustomType.Setter public Builder location(@Nullable String location) { this.location = location; return this; } + @CustomType.Setter public Builder lookoutequipment(@Nullable String lookoutequipment) { this.lookoutequipment = lookoutequipment; return this; } + @CustomType.Setter public Builder lookoutforvision(@Nullable String lookoutforvision) { this.lookoutforvision = lookoutforvision; return this; } + @CustomType.Setter public Builder lookoutmetrics(@Nullable String lookoutmetrics) { this.lookoutmetrics = lookoutmetrics; return this; } + @CustomType.Setter public Builder machinelearning(@Nullable String machinelearning) { this.machinelearning = machinelearning; return this; } + @CustomType.Setter public Builder macie(@Nullable String macie) { this.macie = macie; return this; } + @CustomType.Setter public Builder macie2(@Nullable String macie2) { this.macie2 = macie2; return this; } + @CustomType.Setter public Builder managedblockchain(@Nullable String managedblockchain) { this.managedblockchain = managedblockchain; return this; } + @CustomType.Setter public Builder marketplacecatalog(@Nullable String marketplacecatalog) { this.marketplacecatalog = marketplacecatalog; return this; } + @CustomType.Setter public Builder marketplacecommerceanalytics(@Nullable String marketplacecommerceanalytics) { this.marketplacecommerceanalytics = marketplacecommerceanalytics; return this; } + @CustomType.Setter public Builder marketplaceentitlement(@Nullable String marketplaceentitlement) { this.marketplaceentitlement = marketplaceentitlement; return this; } + @CustomType.Setter public Builder marketplaceentitlementservice(@Nullable String marketplaceentitlementservice) { this.marketplaceentitlementservice = marketplaceentitlementservice; return this; } + @CustomType.Setter public Builder marketplacemetering(@Nullable String marketplacemetering) { this.marketplacemetering = marketplacemetering; return this; } + @CustomType.Setter public Builder mediaconnect(@Nullable String mediaconnect) { this.mediaconnect = mediaconnect; return this; } + @CustomType.Setter public Builder mediaconvert(@Nullable String mediaconvert) { this.mediaconvert = mediaconvert; return this; } + @CustomType.Setter public Builder medialive(@Nullable String medialive) { this.medialive = medialive; return this; } + @CustomType.Setter public Builder mediapackage(@Nullable String mediapackage) { this.mediapackage = mediapackage; return this; } + @CustomType.Setter public Builder mediapackagevod(@Nullable String mediapackagevod) { this.mediapackagevod = mediapackagevod; return this; } + @CustomType.Setter public Builder mediastore(@Nullable String mediastore) { this.mediastore = mediastore; return this; } + @CustomType.Setter public Builder mediastoredata(@Nullable String mediastoredata) { this.mediastoredata = mediastoredata; return this; } + @CustomType.Setter public Builder mediatailor(@Nullable String mediatailor) { this.mediatailor = mediatailor; return this; } + @CustomType.Setter public Builder memorydb(@Nullable String memorydb) { this.memorydb = memorydb; return this; } + @CustomType.Setter public Builder mgn(@Nullable String mgn) { this.mgn = mgn; return this; } + @CustomType.Setter public Builder migrationhub(@Nullable String migrationhub) { this.migrationhub = migrationhub; return this; } + @CustomType.Setter public Builder migrationhubconfig(@Nullable String migrationhubconfig) { this.migrationhubconfig = migrationhubconfig; return this; } + @CustomType.Setter public Builder mobile(@Nullable String mobile) { this.mobile = mobile; return this; } + @CustomType.Setter public Builder mobileanalytics(@Nullable String mobileanalytics) { this.mobileanalytics = mobileanalytics; return this; } + @CustomType.Setter public Builder mq(@Nullable String mq) { this.mq = mq; return this; } + @CustomType.Setter public Builder mturk(@Nullable String mturk) { this.mturk = mturk; return this; } + @CustomType.Setter public Builder mwaa(@Nullable String mwaa) { this.mwaa = mwaa; return this; } + @CustomType.Setter public Builder neptune(@Nullable String neptune) { this.neptune = neptune; return this; } + @CustomType.Setter public Builder networkfirewall(@Nullable String networkfirewall) { this.networkfirewall = networkfirewall; return this; } + @CustomType.Setter public Builder networkmanager(@Nullable String networkmanager) { this.networkmanager = networkmanager; return this; } + @CustomType.Setter public Builder nimblestudio(@Nullable String nimblestudio) { this.nimblestudio = nimblestudio; return this; } + @CustomType.Setter public Builder opsworks(@Nullable String opsworks) { this.opsworks = opsworks; return this; } + @CustomType.Setter public Builder opsworkscm(@Nullable String opsworkscm) { this.opsworkscm = opsworkscm; return this; } + @CustomType.Setter public Builder organizations(@Nullable String organizations) { this.organizations = organizations; return this; } + @CustomType.Setter public Builder outposts(@Nullable String outposts) { this.outposts = outposts; return this; } + @CustomType.Setter public Builder personalize(@Nullable String personalize) { this.personalize = personalize; return this; } + @CustomType.Setter public Builder personalizeevents(@Nullable String personalizeevents) { this.personalizeevents = personalizeevents; return this; } + @CustomType.Setter public Builder personalizeruntime(@Nullable String personalizeruntime) { this.personalizeruntime = personalizeruntime; return this; } + @CustomType.Setter public Builder pi(@Nullable String pi) { this.pi = pi; return this; } + @CustomType.Setter public Builder pinpoint(@Nullable String pinpoint) { this.pinpoint = pinpoint; return this; } + @CustomType.Setter public Builder pinpointemail(@Nullable String pinpointemail) { this.pinpointemail = pinpointemail; return this; } + @CustomType.Setter public Builder pinpointsmsvoice(@Nullable String pinpointsmsvoice) { this.pinpointsmsvoice = pinpointsmsvoice; return this; } + @CustomType.Setter public Builder polly(@Nullable String polly) { this.polly = polly; return this; } + @CustomType.Setter public Builder pricing(@Nullable String pricing) { this.pricing = pricing; return this; } + @CustomType.Setter public Builder prometheus(@Nullable String prometheus) { this.prometheus = prometheus; return this; } + @CustomType.Setter public Builder prometheusservice(@Nullable String prometheusservice) { this.prometheusservice = prometheusservice; return this; } + @CustomType.Setter public Builder proton(@Nullable String proton) { this.proton = proton; return this; } + @CustomType.Setter public Builder qldb(@Nullable String qldb) { this.qldb = qldb; return this; } + @CustomType.Setter public Builder qldbsession(@Nullable String qldbsession) { this.qldbsession = qldbsession; return this; } + @CustomType.Setter public Builder quicksight(@Nullable String quicksight) { this.quicksight = quicksight; return this; } + @CustomType.Setter public Builder ram(@Nullable String ram) { this.ram = ram; return this; } + @CustomType.Setter public Builder rds(@Nullable String rds) { this.rds = rds; return this; } + @CustomType.Setter public Builder rdsdata(@Nullable String rdsdata) { this.rdsdata = rdsdata; return this; } + @CustomType.Setter public Builder rdsdataservice(@Nullable String rdsdataservice) { this.rdsdataservice = rdsdataservice; return this; } + @CustomType.Setter public Builder redshift(@Nullable String redshift) { this.redshift = redshift; return this; } + @CustomType.Setter public Builder redshiftdata(@Nullable String redshiftdata) { this.redshiftdata = redshiftdata; return this; } + @CustomType.Setter public Builder rekognition(@Nullable String rekognition) { this.rekognition = rekognition; return this; } + @CustomType.Setter public Builder resourcegroups(@Nullable String resourcegroups) { this.resourcegroups = resourcegroups; return this; } + @CustomType.Setter public Builder resourcegroupstagging(@Nullable String resourcegroupstagging) { this.resourcegroupstagging = resourcegroupstagging; return this; } + @CustomType.Setter public Builder resourcegroupstaggingapi(@Nullable String resourcegroupstaggingapi) { this.resourcegroupstaggingapi = resourcegroupstaggingapi; return this; } + @CustomType.Setter public Builder robomaker(@Nullable String robomaker) { this.robomaker = robomaker; return this; } + @CustomType.Setter public Builder route53(@Nullable String route53) { this.route53 = route53; return this; } + @CustomType.Setter public Builder route53domains(@Nullable String route53domains) { this.route53domains = route53domains; return this; } + @CustomType.Setter public Builder route53recoverycontrolconfig(@Nullable String route53recoverycontrolconfig) { this.route53recoverycontrolconfig = route53recoverycontrolconfig; return this; } + @CustomType.Setter public Builder route53recoveryreadiness(@Nullable String route53recoveryreadiness) { this.route53recoveryreadiness = route53recoveryreadiness; return this; } + @CustomType.Setter public Builder route53resolver(@Nullable String route53resolver) { this.route53resolver = route53resolver; return this; } + @CustomType.Setter public Builder s3(@Nullable String s3) { this.s3 = s3; return this; } + @CustomType.Setter public Builder s3control(@Nullable String s3control) { this.s3control = s3control; return this; } + @CustomType.Setter public Builder s3outposts(@Nullable String s3outposts) { this.s3outposts = s3outposts; return this; } + @CustomType.Setter public Builder sagemaker(@Nullable String sagemaker) { this.sagemaker = sagemaker; return this; } + @CustomType.Setter public Builder sagemakeredgemanager(@Nullable String sagemakeredgemanager) { this.sagemakeredgemanager = sagemakeredgemanager; return this; } + @CustomType.Setter public Builder sagemakerfeaturestoreruntime(@Nullable String sagemakerfeaturestoreruntime) { this.sagemakerfeaturestoreruntime = sagemakerfeaturestoreruntime; return this; } + @CustomType.Setter public Builder sagemakerruntime(@Nullable String sagemakerruntime) { this.sagemakerruntime = sagemakerruntime; return this; } + @CustomType.Setter public Builder savingsplans(@Nullable String savingsplans) { this.savingsplans = savingsplans; return this; } + @CustomType.Setter public Builder schemas(@Nullable String schemas) { this.schemas = schemas; return this; } + @CustomType.Setter public Builder sdb(@Nullable String sdb) { this.sdb = sdb; return this; } + @CustomType.Setter public Builder secretsmanager(@Nullable String secretsmanager) { this.secretsmanager = secretsmanager; return this; } + @CustomType.Setter public Builder securityhub(@Nullable String securityhub) { this.securityhub = securityhub; return this; } + @CustomType.Setter public Builder serverlessapplicationrepository(@Nullable String serverlessapplicationrepository) { this.serverlessapplicationrepository = serverlessapplicationrepository; return this; } + @CustomType.Setter public Builder serverlessapprepo(@Nullable String serverlessapprepo) { this.serverlessapprepo = serverlessapprepo; return this; } + @CustomType.Setter public Builder serverlessrepo(@Nullable String serverlessrepo) { this.serverlessrepo = serverlessrepo; return this; } + @CustomType.Setter public Builder servicecatalog(@Nullable String servicecatalog) { this.servicecatalog = servicecatalog; return this; } + @CustomType.Setter public Builder servicediscovery(@Nullable String servicediscovery) { this.servicediscovery = servicediscovery; return this; } + @CustomType.Setter public Builder servicequotas(@Nullable String servicequotas) { this.servicequotas = servicequotas; return this; } + @CustomType.Setter public Builder ses(@Nullable String ses) { this.ses = ses; return this; } + @CustomType.Setter public Builder sesv2(@Nullable String sesv2) { this.sesv2 = sesv2; return this; } + @CustomType.Setter public Builder sfn(@Nullable String sfn) { this.sfn = sfn; return this; } + @CustomType.Setter public Builder shield(@Nullable String shield) { this.shield = shield; return this; } + @CustomType.Setter public Builder signer(@Nullable String signer) { this.signer = signer; return this; } + @CustomType.Setter public Builder simpledb(@Nullable String simpledb) { this.simpledb = simpledb; return this; } + @CustomType.Setter public Builder sms(@Nullable String sms) { this.sms = sms; return this; } + @CustomType.Setter public Builder snowball(@Nullable String snowball) { this.snowball = snowball; return this; } + @CustomType.Setter public Builder sns(@Nullable String sns) { this.sns = sns; return this; } + @CustomType.Setter public Builder sqs(@Nullable String sqs) { this.sqs = sqs; return this; } + @CustomType.Setter public Builder ssm(@Nullable String ssm) { this.ssm = ssm; return this; } + @CustomType.Setter public Builder ssmcontacts(@Nullable String ssmcontacts) { this.ssmcontacts = ssmcontacts; return this; } + @CustomType.Setter public Builder ssmincidents(@Nullable String ssmincidents) { this.ssmincidents = ssmincidents; return this; } + @CustomType.Setter public Builder sso(@Nullable String sso) { this.sso = sso; return this; } + @CustomType.Setter public Builder ssoadmin(@Nullable String ssoadmin) { this.ssoadmin = ssoadmin; return this; } + @CustomType.Setter public Builder ssooidc(@Nullable String ssooidc) { this.ssooidc = ssooidc; return this; } + @CustomType.Setter public Builder stepfunctions(@Nullable String stepfunctions) { this.stepfunctions = stepfunctions; return this; } + @CustomType.Setter public Builder storagegateway(@Nullable String storagegateway) { this.storagegateway = storagegateway; return this; } + @CustomType.Setter public Builder sts(@Nullable String sts) { this.sts = sts; return this; } + @CustomType.Setter public Builder support(@Nullable String support) { this.support = support; return this; } + @CustomType.Setter public Builder swf(@Nullable String swf) { this.swf = swf; return this; } + @CustomType.Setter public Builder synthetics(@Nullable String synthetics) { this.synthetics = synthetics; return this; } + @CustomType.Setter public Builder textract(@Nullable String textract) { this.textract = textract; return this; } + @CustomType.Setter public Builder timestreamquery(@Nullable String timestreamquery) { this.timestreamquery = timestreamquery; return this; } + @CustomType.Setter public Builder timestreamwrite(@Nullable String timestreamwrite) { this.timestreamwrite = timestreamwrite; return this; } + @CustomType.Setter public Builder transcribe(@Nullable String transcribe) { this.transcribe = transcribe; return this; } + @CustomType.Setter public Builder transcribeservice(@Nullable String transcribeservice) { this.transcribeservice = transcribeservice; return this; } + @CustomType.Setter public Builder transcribestreaming(@Nullable String transcribestreaming) { this.transcribestreaming = transcribestreaming; return this; } + @CustomType.Setter public Builder transcribestreamingservice(@Nullable String transcribestreamingservice) { this.transcribestreamingservice = transcribestreamingservice; return this; } + @CustomType.Setter public Builder transfer(@Nullable String transfer) { this.transfer = transfer; return this; } + @CustomType.Setter public Builder translate(@Nullable String translate) { this.translate = translate; return this; } + @CustomType.Setter public Builder waf(@Nullable String waf) { this.waf = waf; return this; } + @CustomType.Setter public Builder wafregional(@Nullable String wafregional) { this.wafregional = wafregional; return this; } + @CustomType.Setter public Builder wafv2(@Nullable String wafv2) { this.wafv2 = wafv2; return this; } + @CustomType.Setter public Builder wellarchitected(@Nullable String wellarchitected) { this.wellarchitected = wellarchitected; return this; } + @CustomType.Setter public Builder workdocs(@Nullable String workdocs) { this.workdocs = workdocs; return this; } + @CustomType.Setter public Builder worklink(@Nullable String worklink) { this.worklink = worklink; return this; } + @CustomType.Setter public Builder workmail(@Nullable String workmail) { this.workmail = workmail; return this; } + @CustomType.Setter public Builder workmailmessageflow(@Nullable String workmailmessageflow) { this.workmailmessageflow = workmailmessageflow; return this; } + @CustomType.Setter public Builder workspaces(@Nullable String workspaces) { this.workspaces = workspaces; return this; } + @CustomType.Setter public Builder xray(@Nullable String xray) { this.xray = xray; return this; - } public Endpoints build() { - final var built = new Endpoints(); - - built.accessanalyzer = accessanalyzer; - built.account = account; - built.acm = acm; - built.acmpca = acmpca; - built.alexaforbusiness = alexaforbusiness; - built.amp = amp; - built.amplify = amplify; - built.amplifybackend = amplifybackend; - built.apigateway = apigateway; - built.apigatewayv2 = apigatewayv2; - built.appautoscaling = appautoscaling; - built.appconfig = appconfig; - built.appflow = appflow; - built.appintegrations = appintegrations; - built.appintegrationsservice = appintegrationsservice; - built.applicationautoscaling = applicationautoscaling; - built.applicationcostprofiler = applicationcostprofiler; - built.applicationdiscovery = applicationdiscovery; - built.applicationdiscoveryservice = applicationdiscoveryservice; - built.applicationinsights = applicationinsights; - built.appmesh = appmesh; - built.appregistry = appregistry; - built.apprunner = apprunner; - built.appstream = appstream; - built.appsync = appsync; - built.athena = athena; - built.auditmanager = auditmanager; - built.augmentedairuntime = augmentedairuntime; - built.autoscaling = autoscaling; - built.autoscalingplans = autoscalingplans; - built.backup = backup; - built.batch = batch; - built.braket = braket; - built.budgets = budgets; - built.chime = chime; - built.cloud9 = cloud9; - built.cloudcontrol = cloudcontrol; - built.cloudcontrolapi = cloudcontrolapi; - built.clouddirectory = clouddirectory; - built.cloudformation = cloudformation; - built.cloudfront = cloudfront; - built.cloudhsm = cloudhsm; - built.cloudhsmv2 = cloudhsmv2; - built.cloudsearch = cloudsearch; - built.cloudsearchdomain = cloudsearchdomain; - built.cloudtrail = cloudtrail; - built.cloudwatch = cloudwatch; - built.cloudwatchevents = cloudwatchevents; - built.cloudwatchlogs = cloudwatchlogs; - built.codeartifact = codeartifact; - built.codebuild = codebuild; - built.codecommit = codecommit; - built.codedeploy = codedeploy; - built.codeguruprofiler = codeguruprofiler; - built.codegurureviewer = codegurureviewer; - built.codepipeline = codepipeline; - built.codestar = codestar; - built.codestarconnections = codestarconnections; - built.codestarnotifications = codestarnotifications; - built.cognitoidentity = cognitoidentity; - built.cognitoidentityprovider = cognitoidentityprovider; - built.cognitoidp = cognitoidp; - built.cognitosync = cognitosync; - built.comprehend = comprehend; - built.comprehendmedical = comprehendmedical; - built.config = config; - built.configservice = configservice; - built.connect = connect; - built.connectcontactlens = connectcontactlens; - built.connectparticipant = connectparticipant; - built.costandusagereportservice = costandusagereportservice; - built.costexplorer = costexplorer; - built.cur = cur; - built.databasemigration = databasemigration; - built.databasemigrationservice = databasemigrationservice; - built.dataexchange = dataexchange; - built.datapipeline = datapipeline; - built.datasync = datasync; - built.dax = dax; - built.detective = detective; - built.devicefarm = devicefarm; - built.devopsguru = devopsguru; - built.directconnect = directconnect; - built.dlm = dlm; - built.dms = dms; - built.docdb = docdb; - built.ds = ds; - built.dynamodb = dynamodb; - built.dynamodbstreams = dynamodbstreams; - built.ec2 = ec2; - built.ec2instanceconnect = ec2instanceconnect; - built.ecr = ecr; - built.ecrpublic = ecrpublic; - built.ecs = ecs; - built.efs = efs; - built.eks = eks; - built.elasticache = elasticache; - built.elasticbeanstalk = elasticbeanstalk; - built.elasticinference = elasticinference; - built.elasticsearch = elasticsearch; - built.elasticsearchservice = elasticsearchservice; - built.elastictranscoder = elastictranscoder; - built.elb = elb; - built.elbv2 = elbv2; - built.emr = emr; - built.emrcontainers = emrcontainers; - built.es = es; - built.eventbridge = eventbridge; - built.events = events; - built.finspace = finspace; - built.finspacedata = finspacedata; - built.firehose = firehose; - built.fis = fis; - built.fms = fms; - built.forecast = forecast; - built.forecastquery = forecastquery; - built.forecastqueryservice = forecastqueryservice; - built.forecastservice = forecastservice; - built.frauddetector = frauddetector; - built.fsx = fsx; - built.gamelift = gamelift; - built.glacier = glacier; - built.globalaccelerator = globalaccelerator; - built.glue = glue; - built.gluedatabrew = gluedatabrew; - built.greengrass = greengrass; - built.greengrassv2 = greengrassv2; - built.groundstation = groundstation; - built.guardduty = guardduty; - built.health = health; - built.healthlake = healthlake; - built.honeycode = honeycode; - built.iam = iam; - built.identitystore = identitystore; - built.imagebuilder = imagebuilder; - built.inspector = inspector; - built.iot = iot; - built.iot1clickdevices = iot1clickdevices; - built.iot1clickdevicesservice = iot1clickdevicesservice; - built.iot1clickprojects = iot1clickprojects; - built.iotanalytics = iotanalytics; - built.iotdataplane = iotdataplane; - built.iotdeviceadvisor = iotdeviceadvisor; - built.iotevents = iotevents; - built.ioteventsdata = ioteventsdata; - built.iotfleethub = iotfleethub; - built.iotjobsdataplane = iotjobsdataplane; - built.iotsecuretunneling = iotsecuretunneling; - built.iotsitewise = iotsitewise; - built.iotthingsgraph = iotthingsgraph; - built.iotwireless = iotwireless; - built.kafka = kafka; - built.kafkaconnect = kafkaconnect; - built.kendra = kendra; - built.kinesis = kinesis; - built.kinesisanalytics = kinesisanalytics; - built.kinesisanalyticsv2 = kinesisanalyticsv2; - built.kinesisvideo = kinesisvideo; - built.kinesisvideoarchivedmedia = kinesisvideoarchivedmedia; - built.kinesisvideomedia = kinesisvideomedia; - built.kinesisvideosignalingchannels = kinesisvideosignalingchannels; - built.kms = kms; - built.lakeformation = lakeformation; - built.lambda = lambda; - built.lexmodelbuilding = lexmodelbuilding; - built.lexmodelbuildingservice = lexmodelbuildingservice; - built.lexmodels = lexmodels; - built.lexmodelsv2 = lexmodelsv2; - built.lexruntime = lexruntime; - built.lexruntimeservice = lexruntimeservice; - built.lexruntimev2 = lexruntimev2; - built.licensemanager = licensemanager; - built.lightsail = lightsail; - built.location = location; - built.lookoutequipment = lookoutequipment; - built.lookoutforvision = lookoutforvision; - built.lookoutmetrics = lookoutmetrics; - built.machinelearning = machinelearning; - built.macie = macie; - built.macie2 = macie2; - built.managedblockchain = managedblockchain; - built.marketplacecatalog = marketplacecatalog; - built.marketplacecommerceanalytics = marketplacecommerceanalytics; - built.marketplaceentitlement = marketplaceentitlement; - built.marketplaceentitlementservice = marketplaceentitlementservice; - built.marketplacemetering = marketplacemetering; - built.mediaconnect = mediaconnect; - built.mediaconvert = mediaconvert; - built.medialive = medialive; - built.mediapackage = mediapackage; - built.mediapackagevod = mediapackagevod; - built.mediastore = mediastore; - built.mediastoredata = mediastoredata; - built.mediatailor = mediatailor; - built.memorydb = memorydb; - built.mgn = mgn; - built.migrationhub = migrationhub; - built.migrationhubconfig = migrationhubconfig; - built.mobile = mobile; - built.mobileanalytics = mobileanalytics; - built.mq = mq; - built.mturk = mturk; - built.mwaa = mwaa; - built.neptune = neptune; - built.networkfirewall = networkfirewall; - built.networkmanager = networkmanager; - built.nimblestudio = nimblestudio; - built.opsworks = opsworks; - built.opsworkscm = opsworkscm; - built.organizations = organizations; - built.outposts = outposts; - built.personalize = personalize; - built.personalizeevents = personalizeevents; - built.personalizeruntime = personalizeruntime; - built.pi = pi; - built.pinpoint = pinpoint; - built.pinpointemail = pinpointemail; - built.pinpointsmsvoice = pinpointsmsvoice; - built.polly = polly; - built.pricing = pricing; - built.prometheus = prometheus; - built.prometheusservice = prometheusservice; - built.proton = proton; - built.qldb = qldb; - built.qldbsession = qldbsession; - built.quicksight = quicksight; - built.ram = ram; - built.rds = rds; - built.rdsdata = rdsdata; - built.rdsdataservice = rdsdataservice; - built.redshift = redshift; - built.redshiftdata = redshiftdata; - built.rekognition = rekognition; - built.resourcegroups = resourcegroups; - built.resourcegroupstagging = resourcegroupstagging; - built.resourcegroupstaggingapi = resourcegroupstaggingapi; - built.robomaker = robomaker; - built.route53 = route53; - built.route53domains = route53domains; - built.route53recoverycontrolconfig = route53recoverycontrolconfig; - built.route53recoveryreadiness = route53recoveryreadiness; - built.route53resolver = route53resolver; - built.s3 = s3; - built.s3control = s3control; - built.s3outposts = s3outposts; - built.sagemaker = sagemaker; - built.sagemakeredgemanager = sagemakeredgemanager; - built.sagemakerfeaturestoreruntime = sagemakerfeaturestoreruntime; - built.sagemakerruntime = sagemakerruntime; - built.savingsplans = savingsplans; - built.schemas = schemas; - built.sdb = sdb; - built.secretsmanager = secretsmanager; - built.securityhub = securityhub; - built.serverlessapplicationrepository = serverlessapplicationrepository; - built.serverlessapprepo = serverlessapprepo; - built.serverlessrepo = serverlessrepo; - built.servicecatalog = servicecatalog; - built.servicediscovery = servicediscovery; - built.servicequotas = servicequotas; - built.ses = ses; - built.sesv2 = sesv2; - built.sfn = sfn; - built.shield = shield; - built.signer = signer; - built.simpledb = simpledb; - built.sms = sms; - built.snowball = snowball; - built.sns = sns; - built.sqs = sqs; - built.ssm = ssm; - built.ssmcontacts = ssmcontacts; - built.ssmincidents = ssmincidents; - built.sso = sso; - built.ssoadmin = ssoadmin; - built.ssooidc = ssooidc; - built.stepfunctions = stepfunctions; - built.storagegateway = storagegateway; - built.sts = sts; - built.support = support; - built.swf = swf; - built.synthetics = synthetics; - built.textract = textract; - built.timestreamquery = timestreamquery; - built.timestreamwrite = timestreamwrite; - built.transcribe = transcribe; - built.transcribeservice = transcribeservice; - built.transcribestreaming = transcribestreaming; - built.transcribestreamingservice = transcribestreamingservice; - built.transfer = transfer; - built.translate = translate; - built.waf = waf; - built.wafregional = wafregional; - built.wafv2 = wafv2; - built.wellarchitected = wellarchitected; - built.workdocs = workdocs; - built.worklink = worklink; - built.workmail = workmail; - built.workmailmessageflow = workmailmessageflow; - built.workspaces = workspaces; - built.xray = xray; - return built; + } + public Endpoints build() { + final var o = new Endpoints(); + o.accessanalyzer = accessanalyzer; + o.account = account; + o.acm = acm; + o.acmpca = acmpca; + o.alexaforbusiness = alexaforbusiness; + o.amp = amp; + o.amplify = amplify; + o.amplifybackend = amplifybackend; + o.apigateway = apigateway; + o.apigatewayv2 = apigatewayv2; + o.appautoscaling = appautoscaling; + o.appconfig = appconfig; + o.appflow = appflow; + o.appintegrations = appintegrations; + o.appintegrationsservice = appintegrationsservice; + o.applicationautoscaling = applicationautoscaling; + o.applicationcostprofiler = applicationcostprofiler; + o.applicationdiscovery = applicationdiscovery; + o.applicationdiscoveryservice = applicationdiscoveryservice; + o.applicationinsights = applicationinsights; + o.appmesh = appmesh; + o.appregistry = appregistry; + o.apprunner = apprunner; + o.appstream = appstream; + o.appsync = appsync; + o.athena = athena; + o.auditmanager = auditmanager; + o.augmentedairuntime = augmentedairuntime; + o.autoscaling = autoscaling; + o.autoscalingplans = autoscalingplans; + o.backup = backup; + o.batch = batch; + o.braket = braket; + o.budgets = budgets; + o.chime = chime; + o.cloud9 = cloud9; + o.cloudcontrol = cloudcontrol; + o.cloudcontrolapi = cloudcontrolapi; + o.clouddirectory = clouddirectory; + o.cloudformation = cloudformation; + o.cloudfront = cloudfront; + o.cloudhsm = cloudhsm; + o.cloudhsmv2 = cloudhsmv2; + o.cloudsearch = cloudsearch; + o.cloudsearchdomain = cloudsearchdomain; + o.cloudtrail = cloudtrail; + o.cloudwatch = cloudwatch; + o.cloudwatchevents = cloudwatchevents; + o.cloudwatchlogs = cloudwatchlogs; + o.codeartifact = codeartifact; + o.codebuild = codebuild; + o.codecommit = codecommit; + o.codedeploy = codedeploy; + o.codeguruprofiler = codeguruprofiler; + o.codegurureviewer = codegurureviewer; + o.codepipeline = codepipeline; + o.codestar = codestar; + o.codestarconnections = codestarconnections; + o.codestarnotifications = codestarnotifications; + o.cognitoidentity = cognitoidentity; + o.cognitoidentityprovider = cognitoidentityprovider; + o.cognitoidp = cognitoidp; + o.cognitosync = cognitosync; + o.comprehend = comprehend; + o.comprehendmedical = comprehendmedical; + o.config = config; + o.configservice = configservice; + o.connect = connect; + o.connectcontactlens = connectcontactlens; + o.connectparticipant = connectparticipant; + o.costandusagereportservice = costandusagereportservice; + o.costexplorer = costexplorer; + o.cur = cur; + o.databasemigration = databasemigration; + o.databasemigrationservice = databasemigrationservice; + o.dataexchange = dataexchange; + o.datapipeline = datapipeline; + o.datasync = datasync; + o.dax = dax; + o.detective = detective; + o.devicefarm = devicefarm; + o.devopsguru = devopsguru; + o.directconnect = directconnect; + o.dlm = dlm; + o.dms = dms; + o.docdb = docdb; + o.ds = ds; + o.dynamodb = dynamodb; + o.dynamodbstreams = dynamodbstreams; + o.ec2 = ec2; + o.ec2instanceconnect = ec2instanceconnect; + o.ecr = ecr; + o.ecrpublic = ecrpublic; + o.ecs = ecs; + o.efs = efs; + o.eks = eks; + o.elasticache = elasticache; + o.elasticbeanstalk = elasticbeanstalk; + o.elasticinference = elasticinference; + o.elasticsearch = elasticsearch; + o.elasticsearchservice = elasticsearchservice; + o.elastictranscoder = elastictranscoder; + o.elb = elb; + o.elbv2 = elbv2; + o.emr = emr; + o.emrcontainers = emrcontainers; + o.es = es; + o.eventbridge = eventbridge; + o.events = events; + o.finspace = finspace; + o.finspacedata = finspacedata; + o.firehose = firehose; + o.fis = fis; + o.fms = fms; + o.forecast = forecast; + o.forecastquery = forecastquery; + o.forecastqueryservice = forecastqueryservice; + o.forecastservice = forecastservice; + o.frauddetector = frauddetector; + o.fsx = fsx; + o.gamelift = gamelift; + o.glacier = glacier; + o.globalaccelerator = globalaccelerator; + o.glue = glue; + o.gluedatabrew = gluedatabrew; + o.greengrass = greengrass; + o.greengrassv2 = greengrassv2; + o.groundstation = groundstation; + o.guardduty = guardduty; + o.health = health; + o.healthlake = healthlake; + o.honeycode = honeycode; + o.iam = iam; + o.identitystore = identitystore; + o.imagebuilder = imagebuilder; + o.inspector = inspector; + o.iot = iot; + o.iot1clickdevices = iot1clickdevices; + o.iot1clickdevicesservice = iot1clickdevicesservice; + o.iot1clickprojects = iot1clickprojects; + o.iotanalytics = iotanalytics; + o.iotdataplane = iotdataplane; + o.iotdeviceadvisor = iotdeviceadvisor; + o.iotevents = iotevents; + o.ioteventsdata = ioteventsdata; + o.iotfleethub = iotfleethub; + o.iotjobsdataplane = iotjobsdataplane; + o.iotsecuretunneling = iotsecuretunneling; + o.iotsitewise = iotsitewise; + o.iotthingsgraph = iotthingsgraph; + o.iotwireless = iotwireless; + o.kafka = kafka; + o.kafkaconnect = kafkaconnect; + o.kendra = kendra; + o.kinesis = kinesis; + o.kinesisanalytics = kinesisanalytics; + o.kinesisanalyticsv2 = kinesisanalyticsv2; + o.kinesisvideo = kinesisvideo; + o.kinesisvideoarchivedmedia = kinesisvideoarchivedmedia; + o.kinesisvideomedia = kinesisvideomedia; + o.kinesisvideosignalingchannels = kinesisvideosignalingchannels; + o.kms = kms; + o.lakeformation = lakeformation; + o.lambda = lambda; + o.lexmodelbuilding = lexmodelbuilding; + o.lexmodelbuildingservice = lexmodelbuildingservice; + o.lexmodels = lexmodels; + o.lexmodelsv2 = lexmodelsv2; + o.lexruntime = lexruntime; + o.lexruntimeservice = lexruntimeservice; + o.lexruntimev2 = lexruntimev2; + o.licensemanager = licensemanager; + o.lightsail = lightsail; + o.location = location; + o.lookoutequipment = lookoutequipment; + o.lookoutforvision = lookoutforvision; + o.lookoutmetrics = lookoutmetrics; + o.machinelearning = machinelearning; + o.macie = macie; + o.macie2 = macie2; + o.managedblockchain = managedblockchain; + o.marketplacecatalog = marketplacecatalog; + o.marketplacecommerceanalytics = marketplacecommerceanalytics; + o.marketplaceentitlement = marketplaceentitlement; + o.marketplaceentitlementservice = marketplaceentitlementservice; + o.marketplacemetering = marketplacemetering; + o.mediaconnect = mediaconnect; + o.mediaconvert = mediaconvert; + o.medialive = medialive; + o.mediapackage = mediapackage; + o.mediapackagevod = mediapackagevod; + o.mediastore = mediastore; + o.mediastoredata = mediastoredata; + o.mediatailor = mediatailor; + o.memorydb = memorydb; + o.mgn = mgn; + o.migrationhub = migrationhub; + o.migrationhubconfig = migrationhubconfig; + o.mobile = mobile; + o.mobileanalytics = mobileanalytics; + o.mq = mq; + o.mturk = mturk; + o.mwaa = mwaa; + o.neptune = neptune; + o.networkfirewall = networkfirewall; + o.networkmanager = networkmanager; + o.nimblestudio = nimblestudio; + o.opsworks = opsworks; + o.opsworkscm = opsworkscm; + o.organizations = organizations; + o.outposts = outposts; + o.personalize = personalize; + o.personalizeevents = personalizeevents; + o.personalizeruntime = personalizeruntime; + o.pi = pi; + o.pinpoint = pinpoint; + o.pinpointemail = pinpointemail; + o.pinpointsmsvoice = pinpointsmsvoice; + o.polly = polly; + o.pricing = pricing; + o.prometheus = prometheus; + o.prometheusservice = prometheusservice; + o.proton = proton; + o.qldb = qldb; + o.qldbsession = qldbsession; + o.quicksight = quicksight; + o.ram = ram; + o.rds = rds; + o.rdsdata = rdsdata; + o.rdsdataservice = rdsdataservice; + o.redshift = redshift; + o.redshiftdata = redshiftdata; + o.rekognition = rekognition; + o.resourcegroups = resourcegroups; + o.resourcegroupstagging = resourcegroupstagging; + o.resourcegroupstaggingapi = resourcegroupstaggingapi; + o.robomaker = robomaker; + o.route53 = route53; + o.route53domains = route53domains; + o.route53recoverycontrolconfig = route53recoverycontrolconfig; + o.route53recoveryreadiness = route53recoveryreadiness; + o.route53resolver = route53resolver; + o.s3 = s3; + o.s3control = s3control; + o.s3outposts = s3outposts; + o.sagemaker = sagemaker; + o.sagemakeredgemanager = sagemakeredgemanager; + o.sagemakerfeaturestoreruntime = sagemakerfeaturestoreruntime; + o.sagemakerruntime = sagemakerruntime; + o.savingsplans = savingsplans; + o.schemas = schemas; + o.sdb = sdb; + o.secretsmanager = secretsmanager; + o.securityhub = securityhub; + o.serverlessapplicationrepository = serverlessapplicationrepository; + o.serverlessapprepo = serverlessapprepo; + o.serverlessrepo = serverlessrepo; + o.servicecatalog = servicecatalog; + o.servicediscovery = servicediscovery; + o.servicequotas = servicequotas; + o.ses = ses; + o.sesv2 = sesv2; + o.sfn = sfn; + o.shield = shield; + o.signer = signer; + o.simpledb = simpledb; + o.sms = sms; + o.snowball = snowball; + o.sns = sns; + o.sqs = sqs; + o.ssm = ssm; + o.ssmcontacts = ssmcontacts; + o.ssmincidents = ssmincidents; + o.sso = sso; + o.ssoadmin = ssoadmin; + o.ssooidc = ssooidc; + o.stepfunctions = stepfunctions; + o.storagegateway = storagegateway; + o.sts = sts; + o.support = support; + o.swf = swf; + o.synthetics = synthetics; + o.textract = textract; + o.timestreamquery = timestreamquery; + o.timestreamwrite = timestreamwrite; + o.transcribe = transcribe; + o.transcribeservice = transcribeservice; + o.transcribestreaming = transcribestreaming; + o.transcribestreamingservice = transcribestreamingservice; + o.transfer = transfer; + o.translate = translate; + o.waf = waf; + o.wafregional = wafregional; + o.wafv2 = wafv2; + o.wellarchitected = wellarchitected; + o.workdocs = workdocs; + o.worklink = worklink; + o.workmail = workmail; + o.workmailmessageflow = workmailmessageflow; + o.workspaces = workspaces; + o.xray = xray; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/ec2_getAmi/outputs/GetAmiResult.java b/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/ec2_getAmi/outputs/GetAmiResult.java index 3135ab416e7..1b9d8de585d 100644 --- a/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/ec2_getAmi/outputs/GetAmiResult.java +++ b/pkg/codegen/testing/test/testdata/mini-awsclassic/java/src/main/java/com/pulumi/aws/ec2_getAmi/outputs/GetAmiResult.java @@ -14,13 +14,9 @@ public final class GetAmiResult { * for machine images. * */ - private final String kernelId; - - @CustomType.Constructor - private GetAmiResult(@CustomType.Parameter("kernelId") String kernelId) { - this.kernelId = kernelId; - } + private String kernelId; + private GetAmiResult() {} /** * @return The kernel associated with the image, if any. Only applicable * for machine images. @@ -37,24 +33,24 @@ public static Builder builder() { public static Builder builder(GetAmiResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String kernelId; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetAmiResult defaults) { Objects.requireNonNull(defaults); this.kernelId = defaults.kernelId; } + @CustomType.Setter public Builder kernelId(String kernelId) { this.kernelId = Objects.requireNonNull(kernelId); return this; - } public GetAmiResult build() { - return new GetAmiResult(kernelId); + } + public GetAmiResult build() { + final var o = new GetAmiResult(); + o.kernelId = kernelId; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-awsnative/java/src/main/java/com/pulumi/awsnative/config/inputs/IgnoreTags.java b/pkg/codegen/testing/test/testdata/mini-awsnative/java/src/main/java/com/pulumi/awsnative/config/inputs/IgnoreTags.java index 4d8fe4e5891..689149d8c01 100644 --- a/pkg/codegen/testing/test/testdata/mini-awsnative/java/src/main/java/com/pulumi/awsnative/config/inputs/IgnoreTags.java +++ b/pkg/codegen/testing/test/testdata/mini-awsnative/java/src/main/java/com/pulumi/awsnative/config/inputs/IgnoreTags.java @@ -15,21 +15,14 @@ public final class IgnoreTags { * @return List of exact resource tag keys to ignore across all resources handled by this provider. This configuration prevents Pulumi from returning the tag in any `tags` attributes and displaying any configuration difference for the tag value. If any resource configuration still has this tag key configured in the `tags` argument, it will display a perpetual difference until the tag is removed from the argument or `ignoreChanges` is also used. * */ - private final @Nullable List keyPrefixes; + private @Nullable List keyPrefixes; /** * @return List of resource tag key prefixes to ignore across all resources handled by this provider. This configuration prevents Pulumi from returning any tag key matching the prefixes in any `tags` attributes and displaying any configuration difference for those tag values. If any resource configuration still has a tag matching one of the prefixes configured in the `tags` argument, it will display a perpetual difference until the tag is removed from the argument or `ignoreChanges` is also used. * */ - private final @Nullable List keys; - - @CustomType.Constructor - private IgnoreTags( - @CustomType.Parameter("keyPrefixes") @Nullable List keyPrefixes, - @CustomType.Parameter("keys") @Nullable List keys) { - this.keyPrefixes = keyPrefixes; - this.keys = keys; - } + private @Nullable List keys; + private IgnoreTags() {} /** * @return List of exact resource tag keys to ignore across all resources handled by this provider. This configuration prevents Pulumi from returning the tag in any `tags` attributes and displaying any configuration difference for the tag value. If any resource configuration still has this tag key configured in the `tags` argument, it will display a perpetual difference until the tag is removed from the argument or `ignoreChanges` is also used. * @@ -52,21 +45,18 @@ public static Builder builder() { public static Builder builder(IgnoreTags defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable List keyPrefixes; private @Nullable List keys; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(IgnoreTags defaults) { Objects.requireNonNull(defaults); this.keyPrefixes = defaults.keyPrefixes; this.keys = defaults.keys; } + @CustomType.Setter public Builder keyPrefixes(@Nullable List keyPrefixes) { this.keyPrefixes = keyPrefixes; return this; @@ -74,14 +64,19 @@ public Builder keyPrefixes(@Nullable List keyPrefixes) { public Builder keyPrefixes(String... keyPrefixes) { return keyPrefixes(List.of(keyPrefixes)); } + @CustomType.Setter public Builder keys(@Nullable List keys) { this.keys = keys; return this; } public Builder keys(String... keys) { return keys(List.of(keys)); - } public IgnoreTags build() { - return new IgnoreTags(keyPrefixes, keys); + } + public IgnoreTags build() { + final var o = new IgnoreTags(); + o.keyPrefixes = keyPrefixes; + o.keys = keys; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/ActionGroupResponse.java b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/ActionGroupResponse.java index c999e5bd266..3945708300d 100644 --- a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/ActionGroupResponse.java +++ b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/ActionGroupResponse.java @@ -15,64 +15,45 @@ public final class ActionGroupResponse { * @return Action group to trigger if action rule matches * */ - private final String actionGroupId; + private String actionGroupId; /** * @return Creation time of action rule. Date-Time in ISO-8601 format. * */ - private final String createdAt; + private String createdAt; /** * @return Created by user name. * */ - private final String createdBy; + private String createdBy; /** * @return Description of action rule * */ - private final @Nullable String description; + private @Nullable String description; /** * @return Last updated time of action rule. Date-Time in ISO-8601 format. * */ - private final String lastModifiedAt; + private String lastModifiedAt; /** * @return Last modified by user name. * */ - private final String lastModifiedBy; + private String lastModifiedBy; /** * @return Indicates if the given action rule is enabled or disabled * */ - private final @Nullable String status; + private @Nullable String status; /** * @return Indicates type of action rule * Expected value is 'ActionGroup'. * */ - private final String type; - - @CustomType.Constructor - private ActionGroupResponse( - @CustomType.Parameter("actionGroupId") String actionGroupId, - @CustomType.Parameter("createdAt") String createdAt, - @CustomType.Parameter("createdBy") String createdBy, - @CustomType.Parameter("description") @Nullable String description, - @CustomType.Parameter("lastModifiedAt") String lastModifiedAt, - @CustomType.Parameter("lastModifiedBy") String lastModifiedBy, - @CustomType.Parameter("status") @Nullable String status, - @CustomType.Parameter("type") String type) { - this.actionGroupId = actionGroupId; - this.createdAt = createdAt; - this.createdBy = createdBy; - this.description = description; - this.lastModifiedAt = lastModifiedAt; - this.lastModifiedBy = lastModifiedBy; - this.status = status; - this.type = type; - } + private String type; + private ActionGroupResponse() {} /** * @return Action group to trigger if action rule matches * @@ -138,7 +119,7 @@ public static Builder builder() { public static Builder builder(ActionGroupResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String actionGroupId; private String createdAt; @@ -148,11 +129,7 @@ public static final class Builder { private String lastModifiedBy; private @Nullable String status; private String type; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ActionGroupResponse defaults) { Objects.requireNonNull(defaults); this.actionGroupId = defaults.actionGroupId; @@ -165,39 +142,57 @@ public Builder(ActionGroupResponse defaults) { this.type = defaults.type; } + @CustomType.Setter public Builder actionGroupId(String actionGroupId) { this.actionGroupId = Objects.requireNonNull(actionGroupId); return this; } + @CustomType.Setter public Builder createdAt(String createdAt) { this.createdAt = Objects.requireNonNull(createdAt); return this; } + @CustomType.Setter public Builder createdBy(String createdBy) { this.createdBy = Objects.requireNonNull(createdBy); return this; } + @CustomType.Setter public Builder description(@Nullable String description) { this.description = description; return this; } + @CustomType.Setter public Builder lastModifiedAt(String lastModifiedAt) { this.lastModifiedAt = Objects.requireNonNull(lastModifiedAt); return this; } + @CustomType.Setter public Builder lastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = Objects.requireNonNull(lastModifiedBy); return this; } + @CustomType.Setter public Builder status(@Nullable String status) { this.status = status; return this; } + @CustomType.Setter public Builder type(String type) { this.type = Objects.requireNonNull(type); return this; - } public ActionGroupResponse build() { - return new ActionGroupResponse(actionGroupId, createdAt, createdBy, description, lastModifiedAt, lastModifiedBy, status, type); + } + public ActionGroupResponse build() { + final var o = new ActionGroupResponse(); + o.actionGroupId = actionGroupId; + o.createdAt = createdAt; + o.createdBy = createdBy; + o.description = description; + o.lastModifiedAt = lastModifiedAt; + o.lastModifiedBy = lastModifiedBy; + o.status = status; + o.type = type; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/DiagnosticsResponse.java b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/DiagnosticsResponse.java index a3c4c146d8a..25e8c552380 100644 --- a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/DiagnosticsResponse.java +++ b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/DiagnosticsResponse.java @@ -8,10 +8,7 @@ @CustomType public final class DiagnosticsResponse { - @CustomType.Constructor - private DiagnosticsResponse() { - } - + private DiagnosticsResponse() {} public static Builder builder() { return new Builder(); @@ -20,18 +17,16 @@ public static Builder builder() { public static Builder builder(DiagnosticsResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { - - public Builder() { - // Empty - } - + public Builder() {} public Builder(DiagnosticsResponse defaults) { Objects.requireNonNull(defaults); } + public DiagnosticsResponse build() { - return new DiagnosticsResponse(); + final var o = new DiagnosticsResponse(); + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/GetActionRuleByNameResult.java b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/GetActionRuleByNameResult.java index 3c8c0b7cc65..635682fbdc9 100644 --- a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/GetActionRuleByNameResult.java +++ b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/GetActionRuleByNameResult.java @@ -19,49 +19,34 @@ public final class GetActionRuleByNameResult { * @return Azure resource Id * */ - private final String id; + private String id; /** * @return Resource location * */ - private final String location; + private String location; /** * @return Azure resource name * */ - private final String name; + private String name; /** * @return action rule properties * */ - private final Object properties; + private Object properties; /** * @return Resource tags * */ - private final @Nullable Map tags; + private @Nullable Map tags; /** * @return Azure resource type * */ - private final String type; - - @CustomType.Constructor - private GetActionRuleByNameResult( - @CustomType.Parameter("id") String id, - @CustomType.Parameter("location") String location, - @CustomType.Parameter("name") String name, - @CustomType.Parameter("properties") Object properties, - @CustomType.Parameter("tags") @Nullable Map tags, - @CustomType.Parameter("type") String type) { - this.id = id; - this.location = location; - this.name = name; - this.properties = properties; - this.tags = tags; - this.type = type; - } + private String type; + private GetActionRuleByNameResult() {} /** * @return Azure resource Id * @@ -112,7 +97,7 @@ public static Builder builder() { public static Builder builder(GetActionRuleByNameResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String id; private String location; @@ -120,11 +105,7 @@ public static final class Builder { private Object properties; private @Nullable Map tags; private String type; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetActionRuleByNameResult defaults) { Objects.requireNonNull(defaults); this.id = defaults.id; @@ -135,31 +116,45 @@ public Builder(GetActionRuleByNameResult defaults) { this.type = defaults.type; } + @CustomType.Setter public Builder id(String id) { this.id = Objects.requireNonNull(id); return this; } + @CustomType.Setter public Builder location(String location) { this.location = Objects.requireNonNull(location); return this; } + @CustomType.Setter public Builder name(String name) { this.name = Objects.requireNonNull(name); return this; } + @CustomType.Setter public Builder properties(Object properties) { this.properties = Objects.requireNonNull(properties); return this; } + @CustomType.Setter public Builder tags(@Nullable Map tags) { this.tags = tags; return this; } + @CustomType.Setter public Builder type(String type) { this.type = Objects.requireNonNull(type); return this; - } public GetActionRuleByNameResult build() { - return new GetActionRuleByNameResult(id, location, name, properties, tags, type); + } + public GetActionRuleByNameResult build() { + final var o = new GetActionRuleByNameResult(); + o.id = id; + o.location = location; + o.name = name; + o.properties = properties; + o.tags = tags; + o.type = type; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/SuppressionResponse.java b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/SuppressionResponse.java index ed5132d10fd..b11f65c340d 100644 --- a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/SuppressionResponse.java +++ b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/alertsmanagement/outputs/SuppressionResponse.java @@ -8,10 +8,7 @@ @CustomType public final class SuppressionResponse { - @CustomType.Constructor - private SuppressionResponse() { - } - + private SuppressionResponse() {} public static Builder builder() { return new Builder(); @@ -20,18 +17,16 @@ public static Builder builder() { public static Builder builder(SuppressionResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SuppressionResponse defaults) { Objects.requireNonNull(defaults); } + public SuppressionResponse build() { - return new SuppressionResponse(); + final var o = new SuppressionResponse(); + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/logic/outputs/ListIntegrationAccountKeyVaultKeysResult.java b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/logic/outputs/ListIntegrationAccountKeyVaultKeysResult.java index 372718c9864..e05aa635cfe 100644 --- a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/logic/outputs/ListIntegrationAccountKeyVaultKeysResult.java +++ b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/logic/outputs/ListIntegrationAccountKeyVaultKeysResult.java @@ -15,13 +15,9 @@ public final class ListIntegrationAccountKeyVaultKeysResult { * @return The skip token. * */ - private final @Nullable String skipToken; - - @CustomType.Constructor - private ListIntegrationAccountKeyVaultKeysResult(@CustomType.Parameter("skipToken") @Nullable String skipToken) { - this.skipToken = skipToken; - } + private @Nullable String skipToken; + private ListIntegrationAccountKeyVaultKeysResult() {} /** * @return The skip token. * @@ -37,24 +33,24 @@ public static Builder builder() { public static Builder builder(ListIntegrationAccountKeyVaultKeysResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String skipToken; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ListIntegrationAccountKeyVaultKeysResult defaults) { Objects.requireNonNull(defaults); this.skipToken = defaults.skipToken; } + @CustomType.Setter public Builder skipToken(@Nullable String skipToken) { this.skipToken = skipToken; return this; - } public ListIntegrationAccountKeyVaultKeysResult build() { - return new ListIntegrationAccountKeyVaultKeysResult(skipToken); + } + public ListIntegrationAccountKeyVaultKeysResult build() { + final var o = new ListIntegrationAccountKeyVaultKeysResult(); + o.skipToken = skipToken; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/GetWebAppSlotResult.java b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/GetWebAppSlotResult.java index f95e7a1a4b1..804860d8f26 100644 --- a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/GetWebAppSlotResult.java +++ b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/GetWebAppSlotResult.java @@ -15,13 +15,9 @@ public final class GetWebAppSlotResult { * @return Configuration of the app. * */ - private final @Nullable SiteConfigResponse siteConfig; - - @CustomType.Constructor - private GetWebAppSlotResult(@CustomType.Parameter("siteConfig") @Nullable SiteConfigResponse siteConfig) { - this.siteConfig = siteConfig; - } + private @Nullable SiteConfigResponse siteConfig; + private GetWebAppSlotResult() {} /** * @return Configuration of the app. * @@ -37,24 +33,24 @@ public static Builder builder() { public static Builder builder(GetWebAppSlotResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable SiteConfigResponse siteConfig; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetWebAppSlotResult defaults) { Objects.requireNonNull(defaults); this.siteConfig = defaults.siteConfig; } + @CustomType.Setter public Builder siteConfig(@Nullable SiteConfigResponse siteConfig) { this.siteConfig = siteConfig; return this; - } public GetWebAppSlotResult build() { - return new GetWebAppSlotResult(siteConfig); + } + public GetWebAppSlotResult build() { + final var o = new GetWebAppSlotResult(); + o.siteConfig = siteConfig; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/SiteConfigResponse.java b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/SiteConfigResponse.java index b61b7887b31..d2182e4fecd 100644 --- a/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/SiteConfigResponse.java +++ b/pkg/codegen/testing/test/testdata/mini-azurenative/java/src/main/java/com/pulumi/azurenative/web/outputs/SiteConfigResponse.java @@ -15,13 +15,9 @@ public final class SiteConfigResponse { * @return .NET Framework version. * */ - private final @Nullable String netFrameworkVersion; - - @CustomType.Constructor - private SiteConfigResponse(@CustomType.Parameter("netFrameworkVersion") @Nullable String netFrameworkVersion) { - this.netFrameworkVersion = netFrameworkVersion; - } + private @Nullable String netFrameworkVersion; + private SiteConfigResponse() {} /** * @return .NET Framework version. * @@ -37,24 +33,24 @@ public static Builder builder() { public static Builder builder(SiteConfigResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String netFrameworkVersion; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SiteConfigResponse defaults) { Objects.requireNonNull(defaults); this.netFrameworkVersion = defaults.netFrameworkVersion; } + @CustomType.Setter public Builder netFrameworkVersion(@Nullable String netFrameworkVersion) { this.netFrameworkVersion = netFrameworkVersion; return this; - } public SiteConfigResponse build() { - return new SiteConfigResponse(netFrameworkVersion); + } + public SiteConfigResponse build() { + final var o = new SiteConfigResponse(); + o.netFrameworkVersion = netFrameworkVersion; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java index f41c7364fa5..23f0e64d8b8 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java +++ b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java @@ -11,13 +11,9 @@ @CustomType public final class ArgFunctionResult { - private final @Nullable Resource result; - - @CustomType.Constructor - private ArgFunctionResult(@CustomType.Parameter("result") @Nullable Resource result) { - this.result = result; - } + private @Nullable Resource result; + private ArgFunctionResult() {} public Optional result() { return Optional.ofNullable(this.result); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(ArgFunctionResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Resource result; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ArgFunctionResult defaults) { Objects.requireNonNull(defaults); this.result = defaults.result; } + @CustomType.Setter public Builder result(@Nullable Resource result) { this.result = result; return this; - } public ArgFunctionResult build() { - return new ArgFunctionResult(result); + } + public ArgFunctionResult build() { + final var o = new ArgFunctionResult(); + o.result = result; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java index 17c460fc3e7..d35d40aff1f 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java +++ b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java @@ -11,13 +11,9 @@ @CustomType public final class ConfigMap { - private final @Nullable String config; - - @CustomType.Constructor - private ConfigMap(@CustomType.Parameter("config") @Nullable String config) { - this.config = config; - } + private @Nullable String config; + private ConfigMap() {} public Optional config() { return Optional.ofNullable(this.config); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(ConfigMap defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String config; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ConfigMap defaults) { Objects.requireNonNull(defaults); this.config = defaults.config; } + @CustomType.Setter public Builder config(@Nullable String config) { this.config = config; return this; - } public ConfigMap build() { - return new ConfigMap(config); + } + public ConfigMap build() { + final var o = new ConfigMap(); + o.config = config; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/Object.java b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/Object.java index 33114f681aa..bee6c3250c2 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/Object.java +++ b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/Object.java @@ -16,34 +16,21 @@ @CustomType public final class Object { - private final @Nullable String bar; - private final @Nullable List configs; - private final @Nullable Resource foo; + private @Nullable String bar; + private @Nullable List configs; + private @Nullable Resource foo; /** * @return List of lists of other objects * */ - private final @Nullable List> others; + private @Nullable List> others; /** * @return Mapping from string to list of some other object * */ - private final @Nullable Map> stillOthers; - - @CustomType.Constructor - private Object( - @CustomType.Parameter("bar") @Nullable String bar, - @CustomType.Parameter("configs") @Nullable List configs, - @CustomType.Parameter("foo") @Nullable Resource foo, - @CustomType.Parameter("others") @Nullable List> others, - @CustomType.Parameter("stillOthers") @Nullable Map> stillOthers) { - this.bar = bar; - this.configs = configs; - this.foo = foo; - this.others = others; - this.stillOthers = stillOthers; - } + private @Nullable Map> stillOthers; + private Object() {} public Optional bar() { return Optional.ofNullable(this.bar); } @@ -75,18 +62,14 @@ public static Builder builder() { public static Builder builder(Object defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String bar; private @Nullable List configs; private @Nullable Resource foo; private @Nullable List> others; private @Nullable Map> stillOthers; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Object defaults) { Objects.requireNonNull(defaults); this.bar = defaults.bar; @@ -96,10 +79,12 @@ public Builder(Object defaults) { this.stillOthers = defaults.stillOthers; } + @CustomType.Setter public Builder bar(@Nullable String bar) { this.bar = bar; return this; } + @CustomType.Setter public Builder configs(@Nullable List configs) { this.configs = configs; return this; @@ -107,19 +92,29 @@ public Builder configs(@Nullable List configs) { public Builder configs(ConfigMap... configs) { return configs(List.of(configs)); } + @CustomType.Setter public Builder foo(@Nullable Resource foo) { this.foo = foo; return this; } + @CustomType.Setter public Builder others(@Nullable List> others) { this.others = others; return this; } + @CustomType.Setter public Builder stillOthers(@Nullable Map> stillOthers) { this.stillOthers = stillOthers; return this; - } public Object build() { - return new Object(bar, configs, foo, others, stillOthers); + } + public Object build() { + final var o = new Object(); + o.bar = bar; + o.configs = configs; + o.foo = foo; + o.others = others; + o.stillOthers = stillOthers; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java index 97834d8a24a..0022092f2be 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java +++ b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java @@ -12,17 +12,10 @@ @CustomType public final class ObjectWithNodeOptionalInputs { - private final @Nullable Integer bar; - private final String foo; - - @CustomType.Constructor - private ObjectWithNodeOptionalInputs( - @CustomType.Parameter("bar") @Nullable Integer bar, - @CustomType.Parameter("foo") String foo) { - this.bar = bar; - this.foo = foo; - } + private @Nullable Integer bar; + private String foo; + private ObjectWithNodeOptionalInputs() {} public Optional bar() { return Optional.ofNullable(this.bar); } @@ -37,30 +30,32 @@ public static Builder builder() { public static Builder builder(ObjectWithNodeOptionalInputs defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Integer bar; private String foo; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ObjectWithNodeOptionalInputs defaults) { Objects.requireNonNull(defaults); this.bar = defaults.bar; this.foo = defaults.foo; } + @CustomType.Setter public Builder bar(@Nullable Integer bar) { this.bar = bar; return this; } + @CustomType.Setter public Builder foo(String foo) { this.foo = Objects.requireNonNull(foo); return this; - } public ObjectWithNodeOptionalInputs build() { - return new ObjectWithNodeOptionalInputs(bar, foo); + } + public ObjectWithNodeOptionalInputs build() { + final var o = new ObjectWithNodeOptionalInputs(); + o.bar = bar; + o.foo = foo; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java index 01bb6021c1f..60ee2d69fe3 100644 --- a/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java +++ b/pkg/codegen/testing/test/testdata/other-owned/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java @@ -11,13 +11,9 @@ @CustomType public final class SomeOtherObject { - private final @Nullable String baz; - - @CustomType.Constructor - private SomeOtherObject(@CustomType.Parameter("baz") @Nullable String baz) { - this.baz = baz; - } + private @Nullable String baz; + private SomeOtherObject() {} public Optional baz() { return Optional.ofNullable(this.baz); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(SomeOtherObject defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String baz; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SomeOtherObject defaults) { Objects.requireNonNull(defaults); this.baz = defaults.baz; } + @CustomType.Setter public Builder baz(@Nullable String baz) { this.baz = baz; return this; - } public SomeOtherObject build() { - return new SomeOtherObject(baz); + } + public SomeOtherObject build() { + final var o = new SomeOtherObject(); + o.baz = baz; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/AvailabilityInformationResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/AvailabilityInformationResponse.java index 35b7a4d353c..e08ce961391 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/AvailabilityInformationResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/AvailabilityInformationResponse.java @@ -13,28 +13,19 @@ public final class AvailabilityInformationResponse { * @return Current availability stage of the product. Availability stage * */ - private final String availabilityStage; + private String availabilityStage; /** * @return Reason why the product is disabled. * */ - private final String disabledReason; + private String disabledReason; /** * @return Message for why the product is disabled. * */ - private final String disabledReasonMessage; - - @CustomType.Constructor - private AvailabilityInformationResponse( - @CustomType.Parameter("availabilityStage") String availabilityStage, - @CustomType.Parameter("disabledReason") String disabledReason, - @CustomType.Parameter("disabledReasonMessage") String disabledReasonMessage) { - this.availabilityStage = availabilityStage; - this.disabledReason = disabledReason; - this.disabledReasonMessage = disabledReasonMessage; - } + private String disabledReasonMessage; + private AvailabilityInformationResponse() {} /** * @return Current availability stage of the product. Availability stage * @@ -64,16 +55,12 @@ public static Builder builder() { public static Builder builder(AvailabilityInformationResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String availabilityStage; private String disabledReason; private String disabledReasonMessage; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(AvailabilityInformationResponse defaults) { Objects.requireNonNull(defaults); this.availabilityStage = defaults.availabilityStage; @@ -81,19 +68,27 @@ public Builder(AvailabilityInformationResponse defaults) { this.disabledReasonMessage = defaults.disabledReasonMessage; } + @CustomType.Setter public Builder availabilityStage(String availabilityStage) { this.availabilityStage = Objects.requireNonNull(availabilityStage); return this; } + @CustomType.Setter public Builder disabledReason(String disabledReason) { this.disabledReason = Objects.requireNonNull(disabledReason); return this; } + @CustomType.Setter public Builder disabledReasonMessage(String disabledReasonMessage) { this.disabledReasonMessage = Objects.requireNonNull(disabledReasonMessage); return this; - } public AvailabilityInformationResponse build() { - return new AvailabilityInformationResponse(availabilityStage, disabledReason, disabledReasonMessage); + } + public AvailabilityInformationResponse build() { + final var o = new AvailabilityInformationResponse(); + o.availabilityStage = availabilityStage; + o.disabledReason = disabledReason; + o.disabledReasonMessage = disabledReasonMessage; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/BillingMeterDetailsResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/BillingMeterDetailsResponse.java index 1c7afd5844a..44eb7208d01 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/BillingMeterDetailsResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/BillingMeterDetailsResponse.java @@ -16,35 +16,24 @@ public final class BillingMeterDetailsResponse { * @return Frequency of recurrence * */ - private final String frequency; + private String frequency; /** * @return Represents MeterDetails * */ - private final Either meterDetails; + private Either meterDetails; /** * @return Represents Metering type (eg one-time or recurrent) * */ - private final String meteringType; + private String meteringType; /** * @return Represents Billing type name * */ - private final String name; - - @CustomType.Constructor - private BillingMeterDetailsResponse( - @CustomType.Parameter("frequency") String frequency, - @CustomType.Parameter("meterDetails") Either meterDetails, - @CustomType.Parameter("meteringType") String meteringType, - @CustomType.Parameter("name") String name) { - this.frequency = frequency; - this.meterDetails = meterDetails; - this.meteringType = meteringType; - this.name = name; - } + private String name; + private BillingMeterDetailsResponse() {} /** * @return Frequency of recurrence * @@ -81,17 +70,13 @@ public static Builder builder() { public static Builder builder(BillingMeterDetailsResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String frequency; private Either meterDetails; private String meteringType; private String name; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(BillingMeterDetailsResponse defaults) { Objects.requireNonNull(defaults); this.frequency = defaults.frequency; @@ -100,23 +85,33 @@ public Builder(BillingMeterDetailsResponse defaults) { this.name = defaults.name; } + @CustomType.Setter public Builder frequency(String frequency) { this.frequency = Objects.requireNonNull(frequency); return this; } + @CustomType.Setter public Builder meterDetails(Either meterDetails) { this.meterDetails = Objects.requireNonNull(meterDetails); return this; } + @CustomType.Setter public Builder meteringType(String meteringType) { this.meteringType = Objects.requireNonNull(meteringType); return this; } + @CustomType.Setter public Builder name(String name) { this.name = Objects.requireNonNull(name); return this; - } public BillingMeterDetailsResponse build() { - return new BillingMeterDetailsResponse(frequency, meterDetails, meteringType, name); + } + public BillingMeterDetailsResponse build() { + final var o = new BillingMeterDetailsResponse(); + o.frequency = frequency; + o.meterDetails = meterDetails; + o.meteringType = meteringType; + o.name = name; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ConfigurationResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ConfigurationResponse.java index 0f81a25327b..69736e3f449 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ConfigurationResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ConfigurationResponse.java @@ -22,70 +22,49 @@ public final class ConfigurationResponse { * @return Availability information of the product system. * */ - private final AvailabilityInformationResponse availabilityInformation; + private AvailabilityInformationResponse availabilityInformation; /** * @return Cost information for the product system. * */ - private final CostInformationResponse costInformation; + private CostInformationResponse costInformation; /** * @return Description related to the product system. * */ - private final DescriptionResponse description; + private DescriptionResponse description; /** * @return Dimensions of the configuration * */ - private final DimensionsResponse dimensions; + private DimensionsResponse dimensions; /** * @return Display Name for the product system. * */ - private final String displayName; + private String displayName; /** * @return list of filters supported for a product * */ - private final List filterableProperties; + private List filterableProperties; /** * @return Hierarchy information of a product. * */ - private final HierarchyInformationResponse hierarchyInformation; + private HierarchyInformationResponse hierarchyInformation; /** * @return Image information for the product system. * */ - private final List imageInformation; + private List imageInformation; /** * @return Specifications of the configuration * */ - private final List specifications; - - @CustomType.Constructor - private ConfigurationResponse( - @CustomType.Parameter("availabilityInformation") AvailabilityInformationResponse availabilityInformation, - @CustomType.Parameter("costInformation") CostInformationResponse costInformation, - @CustomType.Parameter("description") DescriptionResponse description, - @CustomType.Parameter("dimensions") DimensionsResponse dimensions, - @CustomType.Parameter("displayName") String displayName, - @CustomType.Parameter("filterableProperties") List filterableProperties, - @CustomType.Parameter("hierarchyInformation") HierarchyInformationResponse hierarchyInformation, - @CustomType.Parameter("imageInformation") List imageInformation, - @CustomType.Parameter("specifications") List specifications) { - this.availabilityInformation = availabilityInformation; - this.costInformation = costInformation; - this.description = description; - this.dimensions = dimensions; - this.displayName = displayName; - this.filterableProperties = filterableProperties; - this.hierarchyInformation = hierarchyInformation; - this.imageInformation = imageInformation; - this.specifications = specifications; - } + private List specifications; + private ConfigurationResponse() {} /** * @return Availability information of the product system. * @@ -157,7 +136,7 @@ public static Builder builder() { public static Builder builder(ConfigurationResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private AvailabilityInformationResponse availabilityInformation; private CostInformationResponse costInformation; @@ -168,11 +147,7 @@ public static final class Builder { private HierarchyInformationResponse hierarchyInformation; private List imageInformation; private List specifications; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ConfigurationResponse defaults) { Objects.requireNonNull(defaults); this.availabilityInformation = defaults.availabilityInformation; @@ -186,26 +161,32 @@ public Builder(ConfigurationResponse defaults) { this.specifications = defaults.specifications; } + @CustomType.Setter public Builder availabilityInformation(AvailabilityInformationResponse availabilityInformation) { this.availabilityInformation = Objects.requireNonNull(availabilityInformation); return this; } + @CustomType.Setter public Builder costInformation(CostInformationResponse costInformation) { this.costInformation = Objects.requireNonNull(costInformation); return this; } + @CustomType.Setter public Builder description(DescriptionResponse description) { this.description = Objects.requireNonNull(description); return this; } + @CustomType.Setter public Builder dimensions(DimensionsResponse dimensions) { this.dimensions = Objects.requireNonNull(dimensions); return this; } + @CustomType.Setter public Builder displayName(String displayName) { this.displayName = Objects.requireNonNull(displayName); return this; } + @CustomType.Setter public Builder filterableProperties(List filterableProperties) { this.filterableProperties = Objects.requireNonNull(filterableProperties); return this; @@ -213,10 +194,12 @@ public Builder filterableProperties(List filterableP public Builder filterableProperties(FilterablePropertyResponse... filterableProperties) { return filterableProperties(List.of(filterableProperties)); } + @CustomType.Setter public Builder hierarchyInformation(HierarchyInformationResponse hierarchyInformation) { this.hierarchyInformation = Objects.requireNonNull(hierarchyInformation); return this; } + @CustomType.Setter public Builder imageInformation(List imageInformation) { this.imageInformation = Objects.requireNonNull(imageInformation); return this; @@ -224,14 +207,26 @@ public Builder imageInformation(List imageInformation) public Builder imageInformation(ImageInformationResponse... imageInformation) { return imageInformation(List.of(imageInformation)); } + @CustomType.Setter public Builder specifications(List specifications) { this.specifications = Objects.requireNonNull(specifications); return this; } public Builder specifications(SpecificationResponse... specifications) { return specifications(List.of(specifications)); - } public ConfigurationResponse build() { - return new ConfigurationResponse(availabilityInformation, costInformation, description, dimensions, displayName, filterableProperties, hierarchyInformation, imageInformation, specifications); + } + public ConfigurationResponse build() { + final var o = new ConfigurationResponse(); + o.availabilityInformation = availabilityInformation; + o.costInformation = costInformation; + o.description = description; + o.dimensions = dimensions; + o.displayName = displayName; + o.filterableProperties = filterableProperties; + o.hierarchyInformation = hierarchyInformation; + o.imageInformation = imageInformation; + o.specifications = specifications; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/CostInformationResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/CostInformationResponse.java index 108c31e530b..fb9fa647bde 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/CostInformationResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/CostInformationResponse.java @@ -15,21 +15,14 @@ public final class CostInformationResponse { * @return Default url to display billing information * */ - private final String billingInfoUrl; + private String billingInfoUrl; /** * @return Details on the various billing aspects for the product system. * */ - private final List billingMeterDetails; - - @CustomType.Constructor - private CostInformationResponse( - @CustomType.Parameter("billingInfoUrl") String billingInfoUrl, - @CustomType.Parameter("billingMeterDetails") List billingMeterDetails) { - this.billingInfoUrl = billingInfoUrl; - this.billingMeterDetails = billingMeterDetails; - } + private List billingMeterDetails; + private CostInformationResponse() {} /** * @return Default url to display billing information * @@ -52,33 +45,35 @@ public static Builder builder() { public static Builder builder(CostInformationResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String billingInfoUrl; private List billingMeterDetails; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(CostInformationResponse defaults) { Objects.requireNonNull(defaults); this.billingInfoUrl = defaults.billingInfoUrl; this.billingMeterDetails = defaults.billingMeterDetails; } + @CustomType.Setter public Builder billingInfoUrl(String billingInfoUrl) { this.billingInfoUrl = Objects.requireNonNull(billingInfoUrl); return this; } + @CustomType.Setter public Builder billingMeterDetails(List billingMeterDetails) { this.billingMeterDetails = Objects.requireNonNull(billingMeterDetails); return this; } public Builder billingMeterDetails(BillingMeterDetailsResponse... billingMeterDetails) { return billingMeterDetails(List.of(billingMeterDetails)); - } public CostInformationResponse build() { - return new CostInformationResponse(billingInfoUrl, billingMeterDetails); + } + public CostInformationResponse build() { + final var o = new CostInformationResponse(); + o.billingInfoUrl = billingInfoUrl; + o.billingMeterDetails = billingMeterDetails; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DescriptionResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DescriptionResponse.java index 7b430ba245c..5ecc557d31f 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DescriptionResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DescriptionResponse.java @@ -15,49 +15,34 @@ public final class DescriptionResponse { * @return Attributes for the product system. * */ - private final List attributes; + private List attributes; /** * @return Type of description. * */ - private final String descriptionType; + private String descriptionType; /** * @return Keywords for the product system. * */ - private final List keywords; + private List keywords; /** * @return Links for the product system. * */ - private final List links; + private List links; /** * @return Long description of the product system. * */ - private final String longDescription; + private String longDescription; /** * @return Short description of the product system. * */ - private final String shortDescription; - - @CustomType.Constructor - private DescriptionResponse( - @CustomType.Parameter("attributes") List attributes, - @CustomType.Parameter("descriptionType") String descriptionType, - @CustomType.Parameter("keywords") List keywords, - @CustomType.Parameter("links") List links, - @CustomType.Parameter("longDescription") String longDescription, - @CustomType.Parameter("shortDescription") String shortDescription) { - this.attributes = attributes; - this.descriptionType = descriptionType; - this.keywords = keywords; - this.links = links; - this.longDescription = longDescription; - this.shortDescription = shortDescription; - } + private String shortDescription; + private DescriptionResponse() {} /** * @return Attributes for the product system. * @@ -108,7 +93,7 @@ public static Builder builder() { public static Builder builder(DescriptionResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private List attributes; private String descriptionType; @@ -116,11 +101,7 @@ public static final class Builder { private List links; private String longDescription; private String shortDescription; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(DescriptionResponse defaults) { Objects.requireNonNull(defaults); this.attributes = defaults.attributes; @@ -131,6 +112,7 @@ public Builder(DescriptionResponse defaults) { this.shortDescription = defaults.shortDescription; } + @CustomType.Setter public Builder attributes(List attributes) { this.attributes = Objects.requireNonNull(attributes); return this; @@ -138,10 +120,12 @@ public Builder attributes(List attributes) { public Builder attributes(String... attributes) { return attributes(List.of(attributes)); } + @CustomType.Setter public Builder descriptionType(String descriptionType) { this.descriptionType = Objects.requireNonNull(descriptionType); return this; } + @CustomType.Setter public Builder keywords(List keywords) { this.keywords = Objects.requireNonNull(keywords); return this; @@ -149,6 +133,7 @@ public Builder keywords(List keywords) { public Builder keywords(String... keywords) { return keywords(List.of(keywords)); } + @CustomType.Setter public Builder links(List links) { this.links = Objects.requireNonNull(links); return this; @@ -156,15 +141,25 @@ public Builder links(List links) { public Builder links(LinkResponse... links) { return links(List.of(links)); } + @CustomType.Setter public Builder longDescription(String longDescription) { this.longDescription = Objects.requireNonNull(longDescription); return this; } + @CustomType.Setter public Builder shortDescription(String shortDescription) { this.shortDescription = Objects.requireNonNull(shortDescription); return this; - } public DescriptionResponse build() { - return new DescriptionResponse(attributes, descriptionType, keywords, links, longDescription, shortDescription); + } + public DescriptionResponse build() { + final var o = new DescriptionResponse(); + o.attributes = attributes; + o.descriptionType = descriptionType; + o.keywords = keywords; + o.links = links; + o.longDescription = longDescription; + o.shortDescription = shortDescription; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DimensionsResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DimensionsResponse.java index 77c4c7c8d91..b0890e6746b 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DimensionsResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/DimensionsResponse.java @@ -14,56 +14,39 @@ public final class DimensionsResponse { * @return Depth of the device. * */ - private final Double depth; + private Double depth; /** * @return Height of the device. * */ - private final Double height; + private Double height; /** * @return Length of the device. * */ - private final Double length; + private Double length; /** * @return Unit for the dimensions of length, height and width. * */ - private final String lengthHeightUnit; + private String lengthHeightUnit; /** * @return Weight of the device. * */ - private final Double weight; + private Double weight; /** * @return Unit for the dimensions of weight. * */ - private final String weightUnit; + private String weightUnit; /** * @return Width of the device. * */ - private final Double width; - - @CustomType.Constructor - private DimensionsResponse( - @CustomType.Parameter("depth") Double depth, - @CustomType.Parameter("height") Double height, - @CustomType.Parameter("length") Double length, - @CustomType.Parameter("lengthHeightUnit") String lengthHeightUnit, - @CustomType.Parameter("weight") Double weight, - @CustomType.Parameter("weightUnit") String weightUnit, - @CustomType.Parameter("width") Double width) { - this.depth = depth; - this.height = height; - this.length = length; - this.lengthHeightUnit = lengthHeightUnit; - this.weight = weight; - this.weightUnit = weightUnit; - this.width = width; - } + private Double width; + private DimensionsResponse() {} /** * @return Depth of the device. * @@ -121,7 +104,7 @@ public static Builder builder() { public static Builder builder(DimensionsResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private Double depth; private Double height; @@ -130,11 +113,7 @@ public static final class Builder { private Double weight; private String weightUnit; private Double width; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(DimensionsResponse defaults) { Objects.requireNonNull(defaults); this.depth = defaults.depth; @@ -146,35 +125,51 @@ public Builder(DimensionsResponse defaults) { this.width = defaults.width; } + @CustomType.Setter public Builder depth(Double depth) { this.depth = Objects.requireNonNull(depth); return this; } + @CustomType.Setter public Builder height(Double height) { this.height = Objects.requireNonNull(height); return this; } + @CustomType.Setter public Builder length(Double length) { this.length = Objects.requireNonNull(length); return this; } + @CustomType.Setter public Builder lengthHeightUnit(String lengthHeightUnit) { this.lengthHeightUnit = Objects.requireNonNull(lengthHeightUnit); return this; } + @CustomType.Setter public Builder weight(Double weight) { this.weight = Objects.requireNonNull(weight); return this; } + @CustomType.Setter public Builder weightUnit(String weightUnit) { this.weightUnit = Objects.requireNonNull(weightUnit); return this; } + @CustomType.Setter public Builder width(Double width) { this.width = Objects.requireNonNull(width); return this; - } public DimensionsResponse build() { - return new DimensionsResponse(depth, height, length, lengthHeightUnit, weight, weightUnit, width); + } + public DimensionsResponse build() { + final var o = new DimensionsResponse(); + o.depth = depth; + o.height = height; + o.length = length; + o.lengthHeightUnit = lengthHeightUnit; + o.weight = weight; + o.weightUnit = weightUnit; + o.width = width; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/FilterablePropertyResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/FilterablePropertyResponse.java index 57699c53dd0..3fb4da1903d 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/FilterablePropertyResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/FilterablePropertyResponse.java @@ -14,21 +14,14 @@ public final class FilterablePropertyResponse { * @return Values to be filtered. * */ - private final List supportedValues; + private List supportedValues; /** * @return Type of product filter. * */ - private final String type; - - @CustomType.Constructor - private FilterablePropertyResponse( - @CustomType.Parameter("supportedValues") List supportedValues, - @CustomType.Parameter("type") String type) { - this.supportedValues = supportedValues; - this.type = type; - } + private String type; + private FilterablePropertyResponse() {} /** * @return Values to be filtered. * @@ -51,21 +44,18 @@ public static Builder builder() { public static Builder builder(FilterablePropertyResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private List supportedValues; private String type; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(FilterablePropertyResponse defaults) { Objects.requireNonNull(defaults); this.supportedValues = defaults.supportedValues; this.type = defaults.type; } + @CustomType.Setter public Builder supportedValues(List supportedValues) { this.supportedValues = Objects.requireNonNull(supportedValues); return this; @@ -73,11 +63,16 @@ public Builder supportedValues(List supportedValues) { public Builder supportedValues(String... supportedValues) { return supportedValues(List.of(supportedValues)); } + @CustomType.Setter public Builder type(String type) { this.type = Objects.requireNonNull(type); return this; - } public FilterablePropertyResponse build() { - return new FilterablePropertyResponse(supportedValues, type); + } + public FilterablePropertyResponse build() { + final var o = new FilterablePropertyResponse(); + o.supportedValues = supportedValues; + o.type = type; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/HierarchyInformationResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/HierarchyInformationResponse.java index 8c10d5e6863..01847788466 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/HierarchyInformationResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/HierarchyInformationResponse.java @@ -15,35 +15,24 @@ public final class HierarchyInformationResponse { * @return Represents configuration name that uniquely identifies configuration * */ - private final @Nullable String configurationName; + private @Nullable String configurationName; /** * @return Represents product family name that uniquely identifies product family * */ - private final @Nullable String productFamilyName; + private @Nullable String productFamilyName; /** * @return Represents product line name that uniquely identifies product line * */ - private final @Nullable String productLineName; + private @Nullable String productLineName; /** * @return Represents product name that uniquely identifies product * */ - private final @Nullable String productName; - - @CustomType.Constructor - private HierarchyInformationResponse( - @CustomType.Parameter("configurationName") @Nullable String configurationName, - @CustomType.Parameter("productFamilyName") @Nullable String productFamilyName, - @CustomType.Parameter("productLineName") @Nullable String productLineName, - @CustomType.Parameter("productName") @Nullable String productName) { - this.configurationName = configurationName; - this.productFamilyName = productFamilyName; - this.productLineName = productLineName; - this.productName = productName; - } + private @Nullable String productName; + private HierarchyInformationResponse() {} /** * @return Represents configuration name that uniquely identifies configuration * @@ -80,17 +69,13 @@ public static Builder builder() { public static Builder builder(HierarchyInformationResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String configurationName; private @Nullable String productFamilyName; private @Nullable String productLineName; private @Nullable String productName; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(HierarchyInformationResponse defaults) { Objects.requireNonNull(defaults); this.configurationName = defaults.configurationName; @@ -99,23 +84,33 @@ public Builder(HierarchyInformationResponse defaults) { this.productName = defaults.productName; } + @CustomType.Setter public Builder configurationName(@Nullable String configurationName) { this.configurationName = configurationName; return this; } + @CustomType.Setter public Builder productFamilyName(@Nullable String productFamilyName) { this.productFamilyName = productFamilyName; return this; } + @CustomType.Setter public Builder productLineName(@Nullable String productLineName) { this.productLineName = productLineName; return this; } + @CustomType.Setter public Builder productName(@Nullable String productName) { this.productName = productName; return this; - } public HierarchyInformationResponse build() { - return new HierarchyInformationResponse(configurationName, productFamilyName, productLineName, productName); + } + public HierarchyInformationResponse build() { + final var o = new HierarchyInformationResponse(); + o.configurationName = configurationName; + o.productFamilyName = productFamilyName; + o.productLineName = productLineName; + o.productName = productName; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ImageInformationResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ImageInformationResponse.java index d45700bb823..9551f727939 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ImageInformationResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ImageInformationResponse.java @@ -13,21 +13,14 @@ public final class ImageInformationResponse { * @return Type of the image * */ - private final String imageType; + private String imageType; /** * @return Url of the image * */ - private final String imageUrl; - - @CustomType.Constructor - private ImageInformationResponse( - @CustomType.Parameter("imageType") String imageType, - @CustomType.Parameter("imageUrl") String imageUrl) { - this.imageType = imageType; - this.imageUrl = imageUrl; - } + private String imageUrl; + private ImageInformationResponse() {} /** * @return Type of the image * @@ -50,30 +43,32 @@ public static Builder builder() { public static Builder builder(ImageInformationResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String imageType; private String imageUrl; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ImageInformationResponse defaults) { Objects.requireNonNull(defaults); this.imageType = defaults.imageType; this.imageUrl = defaults.imageUrl; } + @CustomType.Setter public Builder imageType(String imageType) { this.imageType = Objects.requireNonNull(imageType); return this; } + @CustomType.Setter public Builder imageUrl(String imageUrl) { this.imageUrl = Objects.requireNonNull(imageUrl); return this; - } public ImageInformationResponse build() { - return new ImageInformationResponse(imageType, imageUrl); + } + public ImageInformationResponse build() { + final var o = new ImageInformationResponse(); + o.imageType = imageType; + o.imageUrl = imageUrl; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/LinkResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/LinkResponse.java index e7ee61e2844..79590e4a2c7 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/LinkResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/LinkResponse.java @@ -13,21 +13,14 @@ public final class LinkResponse { * @return Type of link * */ - private final String linkType; + private String linkType; /** * @return Url of the link * */ - private final String linkUrl; - - @CustomType.Constructor - private LinkResponse( - @CustomType.Parameter("linkType") String linkType, - @CustomType.Parameter("linkUrl") String linkUrl) { - this.linkType = linkType; - this.linkUrl = linkUrl; - } + private String linkUrl; + private LinkResponse() {} /** * @return Type of link * @@ -50,30 +43,32 @@ public static Builder builder() { public static Builder builder(LinkResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String linkType; private String linkUrl; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(LinkResponse defaults) { Objects.requireNonNull(defaults); this.linkType = defaults.linkType; this.linkUrl = defaults.linkUrl; } + @CustomType.Setter public Builder linkType(String linkType) { this.linkType = Objects.requireNonNull(linkType); return this; } + @CustomType.Setter public Builder linkUrl(String linkUrl) { this.linkUrl = Objects.requireNonNull(linkUrl); return this; - } public LinkResponse build() { - return new LinkResponse(linkType, linkUrl); + } + public LinkResponse build() { + final var o = new LinkResponse(); + o.linkType = linkType; + o.linkUrl = linkUrl; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListConfigurationsResult.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListConfigurationsResult.java index 6e2702521c7..89a616bd906 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListConfigurationsResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListConfigurationsResult.java @@ -17,21 +17,14 @@ public final class ListConfigurationsResult { * @return Link for the next set of configurations. * */ - private final @Nullable String nextLink; + private @Nullable String nextLink; /** * @return List of configurations. * */ - private final List value; - - @CustomType.Constructor - private ListConfigurationsResult( - @CustomType.Parameter("nextLink") @Nullable String nextLink, - @CustomType.Parameter("value") List value) { - this.nextLink = nextLink; - this.value = value; - } + private List value; + private ListConfigurationsResult() {} /** * @return Link for the next set of configurations. * @@ -54,33 +47,35 @@ public static Builder builder() { public static Builder builder(ListConfigurationsResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String nextLink; private List value; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ListConfigurationsResult defaults) { Objects.requireNonNull(defaults); this.nextLink = defaults.nextLink; this.value = defaults.value; } + @CustomType.Setter public Builder nextLink(@Nullable String nextLink) { this.nextLink = nextLink; return this; } + @CustomType.Setter public Builder value(List value) { this.value = Objects.requireNonNull(value); return this; } public Builder value(ConfigurationResponse... value) { return value(List.of(value)); - } public ListConfigurationsResult build() { - return new ListConfigurationsResult(nextLink, value); + } + public ListConfigurationsResult build() { + final var o = new ListConfigurationsResult(); + o.nextLink = nextLink; + o.value = value; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListProductFamiliesResult.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListProductFamiliesResult.java index 26eca0148c2..0362a4bfa75 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListProductFamiliesResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ListProductFamiliesResult.java @@ -17,21 +17,14 @@ public final class ListProductFamiliesResult { * @return Link for the next set of product families. * */ - private final @Nullable String nextLink; + private @Nullable String nextLink; /** * @return List of product families. * */ - private final List value; - - @CustomType.Constructor - private ListProductFamiliesResult( - @CustomType.Parameter("nextLink") @Nullable String nextLink, - @CustomType.Parameter("value") List value) { - this.nextLink = nextLink; - this.value = value; - } + private List value; + private ListProductFamiliesResult() {} /** * @return Link for the next set of product families. * @@ -54,33 +47,35 @@ public static Builder builder() { public static Builder builder(ListProductFamiliesResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String nextLink; private List value; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ListProductFamiliesResult defaults) { Objects.requireNonNull(defaults); this.nextLink = defaults.nextLink; this.value = defaults.value; } + @CustomType.Setter public Builder nextLink(@Nullable String nextLink) { this.nextLink = nextLink; return this; } + @CustomType.Setter public Builder value(List value) { this.value = Objects.requireNonNull(value); return this; } public Builder value(ProductFamilyResponse... value) { return value(List.of(value)); - } public ListProductFamiliesResult build() { - return new ListProductFamiliesResult(nextLink, value); + } + public ListProductFamiliesResult build() { + final var o = new ListProductFamiliesResult(); + o.nextLink = nextLink; + o.value = value; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/Pav2MeterDetailsResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/Pav2MeterDetailsResponse.java index d444d0213c1..728bcaa3d56 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/Pav2MeterDetailsResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/Pav2MeterDetailsResponse.java @@ -15,35 +15,24 @@ public final class Pav2MeterDetailsResponse { * Expected value is 'Pav2'. * */ - private final String billingType; + private String billingType; /** * @return Charging type. * */ - private final String chargingType; + private String chargingType; /** * @return Validation status of requested data center and transport. * */ - private final String meterGuid; + private String meterGuid; /** * @return Billing unit applicable for Pav2 billing * */ - private final Double multiplier; - - @CustomType.Constructor - private Pav2MeterDetailsResponse( - @CustomType.Parameter("billingType") String billingType, - @CustomType.Parameter("chargingType") String chargingType, - @CustomType.Parameter("meterGuid") String meterGuid, - @CustomType.Parameter("multiplier") Double multiplier) { - this.billingType = billingType; - this.chargingType = chargingType; - this.meterGuid = meterGuid; - this.multiplier = multiplier; - } + private Double multiplier; + private Pav2MeterDetailsResponse() {} /** * @return Represents billing type. * Expected value is 'Pav2'. @@ -81,17 +70,13 @@ public static Builder builder() { public static Builder builder(Pav2MeterDetailsResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String billingType; private String chargingType; private String meterGuid; private Double multiplier; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Pav2MeterDetailsResponse defaults) { Objects.requireNonNull(defaults); this.billingType = defaults.billingType; @@ -100,23 +85,33 @@ public Builder(Pav2MeterDetailsResponse defaults) { this.multiplier = defaults.multiplier; } + @CustomType.Setter public Builder billingType(String billingType) { this.billingType = Objects.requireNonNull(billingType); return this; } + @CustomType.Setter public Builder chargingType(String chargingType) { this.chargingType = Objects.requireNonNull(chargingType); return this; } + @CustomType.Setter public Builder meterGuid(String meterGuid) { this.meterGuid = Objects.requireNonNull(meterGuid); return this; } + @CustomType.Setter public Builder multiplier(Double multiplier) { this.multiplier = Objects.requireNonNull(multiplier); return this; - } public Pav2MeterDetailsResponse build() { - return new Pav2MeterDetailsResponse(billingType, chargingType, meterGuid, multiplier); + } + public Pav2MeterDetailsResponse build() { + final var o = new Pav2MeterDetailsResponse(); + o.billingType = billingType; + o.chargingType = chargingType; + o.meterGuid = meterGuid; + o.multiplier = multiplier; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductFamilyResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductFamilyResponse.java index a902517d086..18581cddebd 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductFamilyResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductFamilyResponse.java @@ -21,63 +21,44 @@ public final class ProductFamilyResponse { * @return Availability information of the product system. * */ - private final AvailabilityInformationResponse availabilityInformation; + private AvailabilityInformationResponse availabilityInformation; /** * @return Cost information for the product system. * */ - private final CostInformationResponse costInformation; + private CostInformationResponse costInformation; /** * @return Description related to the product system. * */ - private final DescriptionResponse description; + private DescriptionResponse description; /** * @return Display Name for the product system. * */ - private final String displayName; + private String displayName; /** * @return list of filters supported for a product * */ - private final List filterableProperties; + private List filterableProperties; /** * @return Hierarchy information of a product. * */ - private final HierarchyInformationResponse hierarchyInformation; + private HierarchyInformationResponse hierarchyInformation; /** * @return Image information for the product system. * */ - private final List imageInformation; + private List imageInformation; /** * @return List of product lines supported in the product family * */ - private final List productLines; - - @CustomType.Constructor - private ProductFamilyResponse( - @CustomType.Parameter("availabilityInformation") AvailabilityInformationResponse availabilityInformation, - @CustomType.Parameter("costInformation") CostInformationResponse costInformation, - @CustomType.Parameter("description") DescriptionResponse description, - @CustomType.Parameter("displayName") String displayName, - @CustomType.Parameter("filterableProperties") List filterableProperties, - @CustomType.Parameter("hierarchyInformation") HierarchyInformationResponse hierarchyInformation, - @CustomType.Parameter("imageInformation") List imageInformation, - @CustomType.Parameter("productLines") List productLines) { - this.availabilityInformation = availabilityInformation; - this.costInformation = costInformation; - this.description = description; - this.displayName = displayName; - this.filterableProperties = filterableProperties; - this.hierarchyInformation = hierarchyInformation; - this.imageInformation = imageInformation; - this.productLines = productLines; - } + private List productLines; + private ProductFamilyResponse() {} /** * @return Availability information of the product system. * @@ -142,7 +123,7 @@ public static Builder builder() { public static Builder builder(ProductFamilyResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private AvailabilityInformationResponse availabilityInformation; private CostInformationResponse costInformation; @@ -152,11 +133,7 @@ public static final class Builder { private HierarchyInformationResponse hierarchyInformation; private List imageInformation; private List productLines; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ProductFamilyResponse defaults) { Objects.requireNonNull(defaults); this.availabilityInformation = defaults.availabilityInformation; @@ -169,22 +146,27 @@ public Builder(ProductFamilyResponse defaults) { this.productLines = defaults.productLines; } + @CustomType.Setter public Builder availabilityInformation(AvailabilityInformationResponse availabilityInformation) { this.availabilityInformation = Objects.requireNonNull(availabilityInformation); return this; } + @CustomType.Setter public Builder costInformation(CostInformationResponse costInformation) { this.costInformation = Objects.requireNonNull(costInformation); return this; } + @CustomType.Setter public Builder description(DescriptionResponse description) { this.description = Objects.requireNonNull(description); return this; } + @CustomType.Setter public Builder displayName(String displayName) { this.displayName = Objects.requireNonNull(displayName); return this; } + @CustomType.Setter public Builder filterableProperties(List filterableProperties) { this.filterableProperties = Objects.requireNonNull(filterableProperties); return this; @@ -192,10 +174,12 @@ public Builder filterableProperties(List filterableP public Builder filterableProperties(FilterablePropertyResponse... filterableProperties) { return filterableProperties(List.of(filterableProperties)); } + @CustomType.Setter public Builder hierarchyInformation(HierarchyInformationResponse hierarchyInformation) { this.hierarchyInformation = Objects.requireNonNull(hierarchyInformation); return this; } + @CustomType.Setter public Builder imageInformation(List imageInformation) { this.imageInformation = Objects.requireNonNull(imageInformation); return this; @@ -203,14 +187,25 @@ public Builder imageInformation(List imageInformation) public Builder imageInformation(ImageInformationResponse... imageInformation) { return imageInformation(List.of(imageInformation)); } + @CustomType.Setter public Builder productLines(List productLines) { this.productLines = Objects.requireNonNull(productLines); return this; } public Builder productLines(ProductLineResponse... productLines) { return productLines(List.of(productLines)); - } public ProductFamilyResponse build() { - return new ProductFamilyResponse(availabilityInformation, costInformation, description, displayName, filterableProperties, hierarchyInformation, imageInformation, productLines); + } + public ProductFamilyResponse build() { + final var o = new ProductFamilyResponse(); + o.availabilityInformation = availabilityInformation; + o.costInformation = costInformation; + o.description = description; + o.displayName = displayName; + o.filterableProperties = filterableProperties; + o.hierarchyInformation = hierarchyInformation; + o.imageInformation = imageInformation; + o.productLines = productLines; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductLineResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductLineResponse.java index d4f3610e764..43831254d75 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductLineResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductLineResponse.java @@ -21,63 +21,44 @@ public final class ProductLineResponse { * @return Availability information of the product system. * */ - private final AvailabilityInformationResponse availabilityInformation; + private AvailabilityInformationResponse availabilityInformation; /** * @return Cost information for the product system. * */ - private final CostInformationResponse costInformation; + private CostInformationResponse costInformation; /** * @return Description related to the product system. * */ - private final DescriptionResponse description; + private DescriptionResponse description; /** * @return Display Name for the product system. * */ - private final String displayName; + private String displayName; /** * @return list of filters supported for a product * */ - private final List filterableProperties; + private List filterableProperties; /** * @return Hierarchy information of a product. * */ - private final HierarchyInformationResponse hierarchyInformation; + private HierarchyInformationResponse hierarchyInformation; /** * @return Image information for the product system. * */ - private final List imageInformation; + private List imageInformation; /** * @return List of products in the product line * */ - private final List products; - - @CustomType.Constructor - private ProductLineResponse( - @CustomType.Parameter("availabilityInformation") AvailabilityInformationResponse availabilityInformation, - @CustomType.Parameter("costInformation") CostInformationResponse costInformation, - @CustomType.Parameter("description") DescriptionResponse description, - @CustomType.Parameter("displayName") String displayName, - @CustomType.Parameter("filterableProperties") List filterableProperties, - @CustomType.Parameter("hierarchyInformation") HierarchyInformationResponse hierarchyInformation, - @CustomType.Parameter("imageInformation") List imageInformation, - @CustomType.Parameter("products") List products) { - this.availabilityInformation = availabilityInformation; - this.costInformation = costInformation; - this.description = description; - this.displayName = displayName; - this.filterableProperties = filterableProperties; - this.hierarchyInformation = hierarchyInformation; - this.imageInformation = imageInformation; - this.products = products; - } + private List products; + private ProductLineResponse() {} /** * @return Availability information of the product system. * @@ -142,7 +123,7 @@ public static Builder builder() { public static Builder builder(ProductLineResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private AvailabilityInformationResponse availabilityInformation; private CostInformationResponse costInformation; @@ -152,11 +133,7 @@ public static final class Builder { private HierarchyInformationResponse hierarchyInformation; private List imageInformation; private List products; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ProductLineResponse defaults) { Objects.requireNonNull(defaults); this.availabilityInformation = defaults.availabilityInformation; @@ -169,22 +146,27 @@ public Builder(ProductLineResponse defaults) { this.products = defaults.products; } + @CustomType.Setter public Builder availabilityInformation(AvailabilityInformationResponse availabilityInformation) { this.availabilityInformation = Objects.requireNonNull(availabilityInformation); return this; } + @CustomType.Setter public Builder costInformation(CostInformationResponse costInformation) { this.costInformation = Objects.requireNonNull(costInformation); return this; } + @CustomType.Setter public Builder description(DescriptionResponse description) { this.description = Objects.requireNonNull(description); return this; } + @CustomType.Setter public Builder displayName(String displayName) { this.displayName = Objects.requireNonNull(displayName); return this; } + @CustomType.Setter public Builder filterableProperties(List filterableProperties) { this.filterableProperties = Objects.requireNonNull(filterableProperties); return this; @@ -192,10 +174,12 @@ public Builder filterableProperties(List filterableP public Builder filterableProperties(FilterablePropertyResponse... filterableProperties) { return filterableProperties(List.of(filterableProperties)); } + @CustomType.Setter public Builder hierarchyInformation(HierarchyInformationResponse hierarchyInformation) { this.hierarchyInformation = Objects.requireNonNull(hierarchyInformation); return this; } + @CustomType.Setter public Builder imageInformation(List imageInformation) { this.imageInformation = Objects.requireNonNull(imageInformation); return this; @@ -203,14 +187,25 @@ public Builder imageInformation(List imageInformation) public Builder imageInformation(ImageInformationResponse... imageInformation) { return imageInformation(List.of(imageInformation)); } + @CustomType.Setter public Builder products(List products) { this.products = Objects.requireNonNull(products); return this; } public Builder products(ProductResponse... products) { return products(List.of(products)); - } public ProductLineResponse build() { - return new ProductLineResponse(availabilityInformation, costInformation, description, displayName, filterableProperties, hierarchyInformation, imageInformation, products); + } + public ProductLineResponse build() { + final var o = new ProductLineResponse(); + o.availabilityInformation = availabilityInformation; + o.costInformation = costInformation; + o.description = description; + o.displayName = displayName; + o.filterableProperties = filterableProperties; + o.hierarchyInformation = hierarchyInformation; + o.imageInformation = imageInformation; + o.products = products; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductResponse.java index c85a26d56f9..e1937c61efc 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/ProductResponse.java @@ -21,63 +21,44 @@ public final class ProductResponse { * @return Availability information of the product system. * */ - private final AvailabilityInformationResponse availabilityInformation; + private AvailabilityInformationResponse availabilityInformation; /** * @return List of configurations for the product * */ - private final List configurations; + private List configurations; /** * @return Cost information for the product system. * */ - private final CostInformationResponse costInformation; + private CostInformationResponse costInformation; /** * @return Description related to the product system. * */ - private final DescriptionResponse description; + private DescriptionResponse description; /** * @return Display Name for the product system. * */ - private final String displayName; + private String displayName; /** * @return list of filters supported for a product * */ - private final List filterableProperties; + private List filterableProperties; /** * @return Hierarchy information of a product. * */ - private final HierarchyInformationResponse hierarchyInformation; + private HierarchyInformationResponse hierarchyInformation; /** * @return Image information for the product system. * */ - private final List imageInformation; - - @CustomType.Constructor - private ProductResponse( - @CustomType.Parameter("availabilityInformation") AvailabilityInformationResponse availabilityInformation, - @CustomType.Parameter("configurations") List configurations, - @CustomType.Parameter("costInformation") CostInformationResponse costInformation, - @CustomType.Parameter("description") DescriptionResponse description, - @CustomType.Parameter("displayName") String displayName, - @CustomType.Parameter("filterableProperties") List filterableProperties, - @CustomType.Parameter("hierarchyInformation") HierarchyInformationResponse hierarchyInformation, - @CustomType.Parameter("imageInformation") List imageInformation) { - this.availabilityInformation = availabilityInformation; - this.configurations = configurations; - this.costInformation = costInformation; - this.description = description; - this.displayName = displayName; - this.filterableProperties = filterableProperties; - this.hierarchyInformation = hierarchyInformation; - this.imageInformation = imageInformation; - } + private List imageInformation; + private ProductResponse() {} /** * @return Availability information of the product system. * @@ -142,7 +123,7 @@ public static Builder builder() { public static Builder builder(ProductResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private AvailabilityInformationResponse availabilityInformation; private List configurations; @@ -152,11 +133,7 @@ public static final class Builder { private List filterableProperties; private HierarchyInformationResponse hierarchyInformation; private List imageInformation; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ProductResponse defaults) { Objects.requireNonNull(defaults); this.availabilityInformation = defaults.availabilityInformation; @@ -169,10 +146,12 @@ public Builder(ProductResponse defaults) { this.imageInformation = defaults.imageInformation; } + @CustomType.Setter public Builder availabilityInformation(AvailabilityInformationResponse availabilityInformation) { this.availabilityInformation = Objects.requireNonNull(availabilityInformation); return this; } + @CustomType.Setter public Builder configurations(List configurations) { this.configurations = Objects.requireNonNull(configurations); return this; @@ -180,18 +159,22 @@ public Builder configurations(List configurations) { public Builder configurations(ConfigurationResponse... configurations) { return configurations(List.of(configurations)); } + @CustomType.Setter public Builder costInformation(CostInformationResponse costInformation) { this.costInformation = Objects.requireNonNull(costInformation); return this; } + @CustomType.Setter public Builder description(DescriptionResponse description) { this.description = Objects.requireNonNull(description); return this; } + @CustomType.Setter public Builder displayName(String displayName) { this.displayName = Objects.requireNonNull(displayName); return this; } + @CustomType.Setter public Builder filterableProperties(List filterableProperties) { this.filterableProperties = Objects.requireNonNull(filterableProperties); return this; @@ -199,18 +182,30 @@ public Builder filterableProperties(List filterableP public Builder filterableProperties(FilterablePropertyResponse... filterableProperties) { return filterableProperties(List.of(filterableProperties)); } + @CustomType.Setter public Builder hierarchyInformation(HierarchyInformationResponse hierarchyInformation) { this.hierarchyInformation = Objects.requireNonNull(hierarchyInformation); return this; } + @CustomType.Setter public Builder imageInformation(List imageInformation) { this.imageInformation = Objects.requireNonNull(imageInformation); return this; } public Builder imageInformation(ImageInformationResponse... imageInformation) { return imageInformation(List.of(imageInformation)); - } public ProductResponse build() { - return new ProductResponse(availabilityInformation, configurations, costInformation, description, displayName, filterableProperties, hierarchyInformation, imageInformation); + } + public ProductResponse build() { + final var o = new ProductResponse(); + o.availabilityInformation = availabilityInformation; + o.configurations = configurations; + o.costInformation = costInformation; + o.description = description; + o.displayName = displayName; + o.filterableProperties = filterableProperties; + o.hierarchyInformation = hierarchyInformation; + o.imageInformation = imageInformation; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/PurchaseMeterDetailsResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/PurchaseMeterDetailsResponse.java index 5fa132c24d7..06f369d8ecd 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/PurchaseMeterDetailsResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/PurchaseMeterDetailsResponse.java @@ -15,49 +15,34 @@ public final class PurchaseMeterDetailsResponse { * Expected value is 'Purchase'. * */ - private final String billingType; + private String billingType; /** * @return Charging type. * */ - private final String chargingType; + private String chargingType; /** * @return Billing unit applicable for Pav2 billing * */ - private final Double multiplier; + private Double multiplier; /** * @return Product Id * */ - private final String productId; + private String productId; /** * @return Sku Id * */ - private final String skuId; + private String skuId; /** * @return Term Id * */ - private final String termId; - - @CustomType.Constructor - private PurchaseMeterDetailsResponse( - @CustomType.Parameter("billingType") String billingType, - @CustomType.Parameter("chargingType") String chargingType, - @CustomType.Parameter("multiplier") Double multiplier, - @CustomType.Parameter("productId") String productId, - @CustomType.Parameter("skuId") String skuId, - @CustomType.Parameter("termId") String termId) { - this.billingType = billingType; - this.chargingType = chargingType; - this.multiplier = multiplier; - this.productId = productId; - this.skuId = skuId; - this.termId = termId; - } + private String termId; + private PurchaseMeterDetailsResponse() {} /** * @return Represents billing type. * Expected value is 'Purchase'. @@ -109,7 +94,7 @@ public static Builder builder() { public static Builder builder(PurchaseMeterDetailsResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String billingType; private String chargingType; @@ -117,11 +102,7 @@ public static final class Builder { private String productId; private String skuId; private String termId; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(PurchaseMeterDetailsResponse defaults) { Objects.requireNonNull(defaults); this.billingType = defaults.billingType; @@ -132,31 +113,45 @@ public Builder(PurchaseMeterDetailsResponse defaults) { this.termId = defaults.termId; } + @CustomType.Setter public Builder billingType(String billingType) { this.billingType = Objects.requireNonNull(billingType); return this; } + @CustomType.Setter public Builder chargingType(String chargingType) { this.chargingType = Objects.requireNonNull(chargingType); return this; } + @CustomType.Setter public Builder multiplier(Double multiplier) { this.multiplier = Objects.requireNonNull(multiplier); return this; } + @CustomType.Setter public Builder productId(String productId) { this.productId = Objects.requireNonNull(productId); return this; } + @CustomType.Setter public Builder skuId(String skuId) { this.skuId = Objects.requireNonNull(skuId); return this; } + @CustomType.Setter public Builder termId(String termId) { this.termId = Objects.requireNonNull(termId); return this; - } public PurchaseMeterDetailsResponse build() { - return new PurchaseMeterDetailsResponse(billingType, chargingType, multiplier, productId, skuId, termId); + } + public PurchaseMeterDetailsResponse build() { + final var o = new PurchaseMeterDetailsResponse(); + o.billingType = billingType; + o.chargingType = chargingType; + o.multiplier = multiplier; + o.productId = productId; + o.skuId = skuId; + o.termId = termId; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/SpecificationResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/SpecificationResponse.java index 06cd7cfbcf7..95b5f2d1521 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/SpecificationResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-edgeorder/java/src/main/java/com/pulumi/myedgeorder/outputs/SpecificationResponse.java @@ -13,21 +13,14 @@ public final class SpecificationResponse { * @return Name of the specification * */ - private final String name; + private String name; /** * @return Value of the specification * */ - private final String value; - - @CustomType.Constructor - private SpecificationResponse( - @CustomType.Parameter("name") String name, - @CustomType.Parameter("value") String value) { - this.name = name; - this.value = value; - } + private String value; + private SpecificationResponse() {} /** * @return Name of the specification * @@ -50,30 +43,32 @@ public static Builder builder() { public static Builder builder(SpecificationResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String name; private String value; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SpecificationResponse defaults) { Objects.requireNonNull(defaults); this.name = defaults.name; this.value = defaults.value; } + @CustomType.Setter public Builder name(String name) { this.name = Objects.requireNonNull(name); return this; } + @CustomType.Setter public Builder value(String value) { this.value = Objects.requireNonNull(value); return this; - } public SpecificationResponse build() { - return new SpecificationResponse(name, value); + } + public SpecificationResponse build() { + final var o = new SpecificationResponse(); + o.name = name; + o.value = value; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsFilter.java b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsFilter.java index 880fce4b858..694b94d095c 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsFilter.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsFilter.java @@ -10,17 +10,10 @@ @CustomType public final class GetAmiIdsFilter { - private final String name; - private final List values; - - @CustomType.Constructor - private GetAmiIdsFilter( - @CustomType.Parameter("name") String name, - @CustomType.Parameter("values") List values) { - this.name = name; - this.values = values; - } + private String name; + private List values; + private GetAmiIdsFilter() {} public String name() { return this.name; } @@ -35,33 +28,35 @@ public static Builder builder() { public static Builder builder(GetAmiIdsFilter defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String name; private List values; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetAmiIdsFilter defaults) { Objects.requireNonNull(defaults); this.name = defaults.name; this.values = defaults.values; } + @CustomType.Setter public Builder name(String name) { this.name = Objects.requireNonNull(name); return this; } + @CustomType.Setter public Builder values(List values) { this.values = Objects.requireNonNull(values); return this; } public Builder values(String... values) { return values(List.of(values)); - } public GetAmiIdsFilter build() { - return new GetAmiIdsFilter(name, values); + } + public GetAmiIdsFilter build() { + final var o = new GetAmiIdsFilter(); + o.name = name; + o.values = values; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsResult.java b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsResult.java index 71662ad14bd..bb2217fa132 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/GetAmiIdsResult.java @@ -14,36 +14,19 @@ @CustomType public final class GetAmiIdsResult { - private final @Nullable List executableUsers; - private final @Nullable List filters; + private @Nullable List executableUsers; + private @Nullable List filters; /** * @return The provider-assigned unique ID for this managed resource. * */ - private final String id; - private final List ids; - private final @Nullable String nameRegex; - private final List owners; - private final @Nullable Boolean sortAscending; - - @CustomType.Constructor - private GetAmiIdsResult( - @CustomType.Parameter("executableUsers") @Nullable List executableUsers, - @CustomType.Parameter("filters") @Nullable List filters, - @CustomType.Parameter("id") String id, - @CustomType.Parameter("ids") List ids, - @CustomType.Parameter("nameRegex") @Nullable String nameRegex, - @CustomType.Parameter("owners") List owners, - @CustomType.Parameter("sortAscending") @Nullable Boolean sortAscending) { - this.executableUsers = executableUsers; - this.filters = filters; - this.id = id; - this.ids = ids; - this.nameRegex = nameRegex; - this.owners = owners; - this.sortAscending = sortAscending; - } + private String id; + private List ids; + private @Nullable String nameRegex; + private List owners; + private @Nullable Boolean sortAscending; + private GetAmiIdsResult() {} public List executableUsers() { return this.executableUsers == null ? List.of() : this.executableUsers; } @@ -77,7 +60,7 @@ public static Builder builder() { public static Builder builder(GetAmiIdsResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable List executableUsers; private @Nullable List filters; @@ -86,11 +69,7 @@ public static final class Builder { private @Nullable String nameRegex; private List owners; private @Nullable Boolean sortAscending; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetAmiIdsResult defaults) { Objects.requireNonNull(defaults); this.executableUsers = defaults.executableUsers; @@ -102,6 +81,7 @@ public Builder(GetAmiIdsResult defaults) { this.sortAscending = defaults.sortAscending; } + @CustomType.Setter public Builder executableUsers(@Nullable List executableUsers) { this.executableUsers = executableUsers; return this; @@ -109,6 +89,7 @@ public Builder executableUsers(@Nullable List executableUsers) { public Builder executableUsers(String... executableUsers) { return executableUsers(List.of(executableUsers)); } + @CustomType.Setter public Builder filters(@Nullable List filters) { this.filters = filters; return this; @@ -116,10 +97,12 @@ public Builder filters(@Nullable List filters) { public Builder filters(GetAmiIdsFilter... filters) { return filters(List.of(filters)); } + @CustomType.Setter public Builder id(String id) { this.id = Objects.requireNonNull(id); return this; } + @CustomType.Setter public Builder ids(List ids) { this.ids = Objects.requireNonNull(ids); return this; @@ -127,10 +110,12 @@ public Builder ids(List ids) { public Builder ids(String... ids) { return ids(List.of(ids)); } + @CustomType.Setter public Builder nameRegex(@Nullable String nameRegex) { this.nameRegex = nameRegex; return this; } + @CustomType.Setter public Builder owners(List owners) { this.owners = Objects.requireNonNull(owners); return this; @@ -138,11 +123,21 @@ public Builder owners(List owners) { public Builder owners(String... owners) { return owners(List.of(owners)); } + @CustomType.Setter public Builder sortAscending(@Nullable Boolean sortAscending) { this.sortAscending = sortAscending; return this; - } public GetAmiIdsResult build() { - return new GetAmiIdsResult(executableUsers, filters, id, ids, nameRegex, owners, sortAscending); + } + public GetAmiIdsResult build() { + final var o = new GetAmiIdsResult(); + o.executableUsers = executableUsers; + o.filters = filters; + o.id = id; + o.ids = ids; + o.nameRegex = nameRegex; + o.owners = owners; + o.sortAscending = sortAscending; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java index c3881392aa4..2eaf6fdc4d0 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java @@ -14,13 +14,9 @@ public final class ListStorageAccountKeysResult { * @return Gets the list of storage account keys and their properties for the specified storage account. * */ - private final List keys; - - @CustomType.Constructor - private ListStorageAccountKeysResult(@CustomType.Parameter("keys") List keys) { - this.keys = keys; - } + private List keys; + private ListStorageAccountKeysResult() {} /** * @return Gets the list of storage account keys and their properties for the specified storage account. * @@ -36,27 +32,27 @@ public static Builder builder() { public static Builder builder(ListStorageAccountKeysResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private List keys; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ListStorageAccountKeysResult defaults) { Objects.requireNonNull(defaults); this.keys = defaults.keys; } + @CustomType.Setter public Builder keys(List keys) { this.keys = Objects.requireNonNull(keys); return this; } public Builder keys(StorageAccountKeyResponse... keys) { return keys(List.of(keys)); - } public ListStorageAccountKeysResult build() { - return new ListStorageAccountKeysResult(keys); + } + public ListStorageAccountKeysResult build() { + final var o = new ListStorageAccountKeysResult(); + o.keys = keys; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java index 5dcd5f74af0..2888a9b4bae 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs-tfbridge20/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java @@ -13,35 +13,24 @@ public final class StorageAccountKeyResponse { * @return Creation time of the key, in round trip date format. * */ - private final String creationTime; + private String creationTime; /** * @return Name of the key. * */ - private final String keyName; + private String keyName; /** * @return Permissions for the key -- read-only or full permissions. * */ - private final String permissions; + private String permissions; /** * @return Base 64-encoded value of the key. * */ - private final String value; - - @CustomType.Constructor - private StorageAccountKeyResponse( - @CustomType.Parameter("creationTime") String creationTime, - @CustomType.Parameter("keyName") String keyName, - @CustomType.Parameter("permissions") String permissions, - @CustomType.Parameter("value") String value) { - this.creationTime = creationTime; - this.keyName = keyName; - this.permissions = permissions; - this.value = value; - } + private String value; + private StorageAccountKeyResponse() {} /** * @return Creation time of the key, in round trip date format. * @@ -78,17 +67,13 @@ public static Builder builder() { public static Builder builder(StorageAccountKeyResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String creationTime; private String keyName; private String permissions; private String value; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(StorageAccountKeyResponse defaults) { Objects.requireNonNull(defaults); this.creationTime = defaults.creationTime; @@ -97,23 +82,33 @@ public Builder(StorageAccountKeyResponse defaults) { this.value = defaults.value; } + @CustomType.Setter public Builder creationTime(String creationTime) { this.creationTime = Objects.requireNonNull(creationTime); return this; } + @CustomType.Setter public Builder keyName(String keyName) { this.keyName = Objects.requireNonNull(keyName); return this; } + @CustomType.Setter public Builder permissions(String permissions) { this.permissions = Objects.requireNonNull(permissions); return this; } + @CustomType.Setter public Builder value(String value) { this.value = Objects.requireNonNull(value); return this; - } public StorageAccountKeyResponse build() { - return new StorageAccountKeyResponse(creationTime, keyName, permissions, value); + } + public StorageAccountKeyResponse build() { + final var o = new StorageAccountKeyResponse(); + o.creationTime = creationTime; + o.keyName = keyName; + o.permissions = permissions; + o.value = value; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithAllOptionalInputsResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithAllOptionalInputsResult.java index b5552f97717..3c2674ae76c 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithAllOptionalInputsResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithAllOptionalInputsResult.java @@ -9,13 +9,9 @@ @CustomType public final class FuncWithAllOptionalInputsResult { - private final String r; - - @CustomType.Constructor - private FuncWithAllOptionalInputsResult(@CustomType.Parameter("r") String r) { - this.r = r; - } + private String r; + private FuncWithAllOptionalInputsResult() {} public String r() { return this.r; } @@ -27,24 +23,24 @@ public static Builder builder() { public static Builder builder(FuncWithAllOptionalInputsResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String r; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(FuncWithAllOptionalInputsResult defaults) { Objects.requireNonNull(defaults); this.r = defaults.r; } + @CustomType.Setter public Builder r(String r) { this.r = Objects.requireNonNull(r); return this; - } public FuncWithAllOptionalInputsResult build() { - return new FuncWithAllOptionalInputsResult(r); + } + public FuncWithAllOptionalInputsResult build() { + final var o = new FuncWithAllOptionalInputsResult(); + o.r = r; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDefaultValueResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDefaultValueResult.java index ea52a2ec59f..998a33662c6 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDefaultValueResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDefaultValueResult.java @@ -9,13 +9,9 @@ @CustomType public final class FuncWithDefaultValueResult { - private final String r; - - @CustomType.Constructor - private FuncWithDefaultValueResult(@CustomType.Parameter("r") String r) { - this.r = r; - } + private String r; + private FuncWithDefaultValueResult() {} public String r() { return this.r; } @@ -27,24 +23,24 @@ public static Builder builder() { public static Builder builder(FuncWithDefaultValueResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String r; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(FuncWithDefaultValueResult defaults) { Objects.requireNonNull(defaults); this.r = defaults.r; } + @CustomType.Setter public Builder r(String r) { this.r = Objects.requireNonNull(r); return this; - } public FuncWithDefaultValueResult build() { - return new FuncWithDefaultValueResult(r); + } + public FuncWithDefaultValueResult build() { + final var o = new FuncWithDefaultValueResult(); + o.r = r; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDictParamResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDictParamResult.java index 6efd651f350..b7a0a70a8ce 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDictParamResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithDictParamResult.java @@ -9,13 +9,9 @@ @CustomType public final class FuncWithDictParamResult { - private final String r; - - @CustomType.Constructor - private FuncWithDictParamResult(@CustomType.Parameter("r") String r) { - this.r = r; - } + private String r; + private FuncWithDictParamResult() {} public String r() { return this.r; } @@ -27,24 +23,24 @@ public static Builder builder() { public static Builder builder(FuncWithDictParamResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String r; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(FuncWithDictParamResult defaults) { Objects.requireNonNull(defaults); this.r = defaults.r; } + @CustomType.Setter public Builder r(String r) { this.r = Objects.requireNonNull(r); return this; - } public FuncWithDictParamResult build() { - return new FuncWithDictParamResult(r); + } + public FuncWithDictParamResult build() { + final var o = new FuncWithDictParamResult(); + o.r = r; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithListParamResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithListParamResult.java index 8349a0b02f3..e1069798796 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithListParamResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/FuncWithListParamResult.java @@ -9,13 +9,9 @@ @CustomType public final class FuncWithListParamResult { - private final String r; - - @CustomType.Constructor - private FuncWithListParamResult(@CustomType.Parameter("r") String r) { - this.r = r; - } + private String r; + private FuncWithListParamResult() {} public String r() { return this.r; } @@ -27,24 +23,24 @@ public static Builder builder() { public static Builder builder(FuncWithListParamResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String r; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(FuncWithListParamResult defaults) { Objects.requireNonNull(defaults); this.r = defaults.r; } + @CustomType.Setter public Builder r(String r) { this.r = Objects.requireNonNull(r); return this; - } public FuncWithListParamResult build() { - return new FuncWithListParamResult(r); + } + public FuncWithListParamResult build() { + final var o = new FuncWithListParamResult(); + o.r = r; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetBastionShareableLinkResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetBastionShareableLinkResult.java index 5e64f7037cb..fb46574b5e6 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetBastionShareableLinkResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetBastionShareableLinkResult.java @@ -15,13 +15,9 @@ public final class GetBastionShareableLinkResult { * @return The URL to get the next set of results. * */ - private final @Nullable String nextLink; - - @CustomType.Constructor - private GetBastionShareableLinkResult(@CustomType.Parameter("nextLink") @Nullable String nextLink) { - this.nextLink = nextLink; - } + private @Nullable String nextLink; + private GetBastionShareableLinkResult() {} /** * @return The URL to get the next set of results. * @@ -37,24 +33,24 @@ public static Builder builder() { public static Builder builder(GetBastionShareableLinkResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String nextLink; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetBastionShareableLinkResult defaults) { Objects.requireNonNull(defaults); this.nextLink = defaults.nextLink; } + @CustomType.Setter public Builder nextLink(@Nullable String nextLink) { this.nextLink = nextLink; return this; - } public GetBastionShareableLinkResult build() { - return new GetBastionShareableLinkResult(nextLink); + } + public GetBastionShareableLinkResult build() { + final var o = new GetBastionShareableLinkResult(); + o.nextLink = nextLink; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetClientConfigResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetClientConfigResult.java index 09701db3462..7b704bd48f8 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetClientConfigResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetClientConfigResult.java @@ -13,35 +13,24 @@ public final class GetClientConfigResult { * @return Azure Client ID (Application Object ID). * */ - private final String clientId; + private String clientId; /** * @return Azure Object ID of the current user or service principal. * */ - private final String objectId; + private String objectId; /** * @return Azure Subscription ID * */ - private final String subscriptionId; + private String subscriptionId; /** * @return Azure Tenant ID * */ - private final String tenantId; - - @CustomType.Constructor - private GetClientConfigResult( - @CustomType.Parameter("clientId") String clientId, - @CustomType.Parameter("objectId") String objectId, - @CustomType.Parameter("subscriptionId") String subscriptionId, - @CustomType.Parameter("tenantId") String tenantId) { - this.clientId = clientId; - this.objectId = objectId; - this.subscriptionId = subscriptionId; - this.tenantId = tenantId; - } + private String tenantId; + private GetClientConfigResult() {} /** * @return Azure Client ID (Application Object ID). * @@ -78,17 +67,13 @@ public static Builder builder() { public static Builder builder(GetClientConfigResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String clientId; private String objectId; private String subscriptionId; private String tenantId; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetClientConfigResult defaults) { Objects.requireNonNull(defaults); this.clientId = defaults.clientId; @@ -97,23 +82,33 @@ public Builder(GetClientConfigResult defaults) { this.tenantId = defaults.tenantId; } + @CustomType.Setter public Builder clientId(String clientId) { this.clientId = Objects.requireNonNull(clientId); return this; } + @CustomType.Setter public Builder objectId(String objectId) { this.objectId = Objects.requireNonNull(objectId); return this; } + @CustomType.Setter public Builder subscriptionId(String subscriptionId) { this.subscriptionId = Objects.requireNonNull(subscriptionId); return this; } + @CustomType.Setter public Builder tenantId(String tenantId) { this.tenantId = Objects.requireNonNull(tenantId); return this; - } public GetClientConfigResult build() { - return new GetClientConfigResult(clientId, objectId, subscriptionId, tenantId); + } + public GetClientConfigResult build() { + final var o = new GetClientConfigResult(); + o.clientId = clientId; + o.objectId = objectId; + o.subscriptionId = subscriptionId; + o.tenantId = tenantId; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetIntegrationRuntimeObjectMetadatumResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetIntegrationRuntimeObjectMetadatumResult.java index 0959207f66b..31773ac2854 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetIntegrationRuntimeObjectMetadatumResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/GetIntegrationRuntimeObjectMetadatumResult.java @@ -21,21 +21,14 @@ public final class GetIntegrationRuntimeObjectMetadatumResult { * @return The link to the next page of results, if any remaining results exist. * */ - private final @Nullable String nextLink; + private @Nullable String nextLink; /** * @return List of SSIS object metadata. * */ - private final @Nullable List value; - - @CustomType.Constructor - private GetIntegrationRuntimeObjectMetadatumResult( - @CustomType.Parameter("nextLink") @Nullable String nextLink, - @CustomType.Parameter("value") @Nullable List value) { - this.nextLink = nextLink; - this.value = value; - } + private @Nullable List value; + private GetIntegrationRuntimeObjectMetadatumResult() {} /** * @return The link to the next page of results, if any remaining results exist. * @@ -58,33 +51,35 @@ public static Builder builder() { public static Builder builder(GetIntegrationRuntimeObjectMetadatumResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String nextLink; private @Nullable List value; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(GetIntegrationRuntimeObjectMetadatumResult defaults) { Objects.requireNonNull(defaults); this.nextLink = defaults.nextLink; this.value = defaults.value; } + @CustomType.Setter public Builder nextLink(@Nullable String nextLink) { this.nextLink = nextLink; return this; } + @CustomType.Setter public Builder value(@Nullable List value) { this.value = value; return this; } public Builder value(Object... value) { return value(List.of(value)); - } public GetIntegrationRuntimeObjectMetadatumResult build() { - return new GetIntegrationRuntimeObjectMetadatumResult(nextLink, value); + } + public GetIntegrationRuntimeObjectMetadatumResult build() { + final var o = new GetIntegrationRuntimeObjectMetadatumResult(); + o.nextLink = nextLink; + o.value = value; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java index c3881392aa4..2eaf6fdc4d0 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/ListStorageAccountKeysResult.java @@ -14,13 +14,9 @@ public final class ListStorageAccountKeysResult { * @return Gets the list of storage account keys and their properties for the specified storage account. * */ - private final List keys; - - @CustomType.Constructor - private ListStorageAccountKeysResult(@CustomType.Parameter("keys") List keys) { - this.keys = keys; - } + private List keys; + private ListStorageAccountKeysResult() {} /** * @return Gets the list of storage account keys and their properties for the specified storage account. * @@ -36,27 +32,27 @@ public static Builder builder() { public static Builder builder(ListStorageAccountKeysResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private List keys; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ListStorageAccountKeysResult defaults) { Objects.requireNonNull(defaults); this.keys = defaults.keys; } + @CustomType.Setter public Builder keys(List keys) { this.keys = Objects.requireNonNull(keys); return this; } public Builder keys(StorageAccountKeyResponse... keys) { return keys(List.of(keys)); - } public ListStorageAccountKeysResult build() { - return new ListStorageAccountKeysResult(keys); + } + public ListStorageAccountKeysResult build() { + final var o = new ListStorageAccountKeysResult(); + o.keys = keys; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentReferenceResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentReferenceResponse.java index 2b5979c4cce..98a3a181fce 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentReferenceResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentReferenceResponse.java @@ -16,35 +16,24 @@ public final class SsisEnvironmentReferenceResponse { * @return Environment folder name. * */ - private final @Nullable String environmentFolderName; + private @Nullable String environmentFolderName; /** * @return Environment name. * */ - private final @Nullable String environmentName; + private @Nullable String environmentName; /** * @return Environment reference id. * */ - private final @Nullable Double id; + private @Nullable Double id; /** * @return Reference type * */ - private final @Nullable String referenceType; - - @CustomType.Constructor - private SsisEnvironmentReferenceResponse( - @CustomType.Parameter("environmentFolderName") @Nullable String environmentFolderName, - @CustomType.Parameter("environmentName") @Nullable String environmentName, - @CustomType.Parameter("id") @Nullable Double id, - @CustomType.Parameter("referenceType") @Nullable String referenceType) { - this.environmentFolderName = environmentFolderName; - this.environmentName = environmentName; - this.id = id; - this.referenceType = referenceType; - } + private @Nullable String referenceType; + private SsisEnvironmentReferenceResponse() {} /** * @return Environment folder name. * @@ -81,17 +70,13 @@ public static Builder builder() { public static Builder builder(SsisEnvironmentReferenceResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String environmentFolderName; private @Nullable String environmentName; private @Nullable Double id; private @Nullable String referenceType; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SsisEnvironmentReferenceResponse defaults) { Objects.requireNonNull(defaults); this.environmentFolderName = defaults.environmentFolderName; @@ -100,23 +85,33 @@ public Builder(SsisEnvironmentReferenceResponse defaults) { this.referenceType = defaults.referenceType; } + @CustomType.Setter public Builder environmentFolderName(@Nullable String environmentFolderName) { this.environmentFolderName = environmentFolderName; return this; } + @CustomType.Setter public Builder environmentName(@Nullable String environmentName) { this.environmentName = environmentName; return this; } + @CustomType.Setter public Builder id(@Nullable Double id) { this.id = id; return this; } + @CustomType.Setter public Builder referenceType(@Nullable String referenceType) { this.referenceType = referenceType; return this; - } public SsisEnvironmentReferenceResponse build() { - return new SsisEnvironmentReferenceResponse(environmentFolderName, environmentName, id, referenceType); + } + public SsisEnvironmentReferenceResponse build() { + final var o = new SsisEnvironmentReferenceResponse(); + o.environmentFolderName = environmentFolderName; + o.environmentName = environmentName; + o.id = id; + o.referenceType = referenceType; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentResponse.java index 63875f6ab29..065a06f9b0e 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisEnvironmentResponse.java @@ -18,50 +18,35 @@ public final class SsisEnvironmentResponse { * @return Metadata description. * */ - private final @Nullable String description; + private @Nullable String description; /** * @return Folder id which contains environment. * */ - private final @Nullable Double folderId; + private @Nullable Double folderId; /** * @return Metadata id. * */ - private final @Nullable Double id; + private @Nullable Double id; /** * @return Metadata name. * */ - private final @Nullable String name; + private @Nullable String name; /** * @return The type of SSIS object metadata. * Expected value is 'Environment'. * */ - private final String type; + private String type; /** * @return Variable in environment * */ - private final @Nullable List variables; - - @CustomType.Constructor - private SsisEnvironmentResponse( - @CustomType.Parameter("description") @Nullable String description, - @CustomType.Parameter("folderId") @Nullable Double folderId, - @CustomType.Parameter("id") @Nullable Double id, - @CustomType.Parameter("name") @Nullable String name, - @CustomType.Parameter("type") String type, - @CustomType.Parameter("variables") @Nullable List variables) { - this.description = description; - this.folderId = folderId; - this.id = id; - this.name = name; - this.type = type; - this.variables = variables; - } + private @Nullable List variables; + private SsisEnvironmentResponse() {} /** * @return Metadata description. * @@ -113,7 +98,7 @@ public static Builder builder() { public static Builder builder(SsisEnvironmentResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String description; private @Nullable Double folderId; @@ -121,11 +106,7 @@ public static final class Builder { private @Nullable String name; private String type; private @Nullable List variables; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SsisEnvironmentResponse defaults) { Objects.requireNonNull(defaults); this.description = defaults.description; @@ -136,34 +117,48 @@ public Builder(SsisEnvironmentResponse defaults) { this.variables = defaults.variables; } + @CustomType.Setter public Builder description(@Nullable String description) { this.description = description; return this; } + @CustomType.Setter public Builder folderId(@Nullable Double folderId) { this.folderId = folderId; return this; } + @CustomType.Setter public Builder id(@Nullable Double id) { this.id = id; return this; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; } + @CustomType.Setter public Builder type(String type) { this.type = Objects.requireNonNull(type); return this; } + @CustomType.Setter public Builder variables(@Nullable List variables) { this.variables = variables; return this; } public Builder variables(SsisVariableResponse... variables) { return variables(List.of(variables)); - } public SsisEnvironmentResponse build() { - return new SsisEnvironmentResponse(description, folderId, id, name, type, variables); + } + public SsisEnvironmentResponse build() { + final var o = new SsisEnvironmentResponse(); + o.description = description; + o.folderId = folderId; + o.id = id; + o.name = name; + o.type = type; + o.variables = variables; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisFolderResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisFolderResponse.java index 18cb487dbe0..afffa6b179f 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisFolderResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisFolderResponse.java @@ -16,36 +16,25 @@ public final class SsisFolderResponse { * @return Metadata description. * */ - private final @Nullable String description; + private @Nullable String description; /** * @return Metadata id. * */ - private final @Nullable Double id; + private @Nullable Double id; /** * @return Metadata name. * */ - private final @Nullable String name; + private @Nullable String name; /** * @return The type of SSIS object metadata. * Expected value is 'Folder'. * */ - private final String type; - - @CustomType.Constructor - private SsisFolderResponse( - @CustomType.Parameter("description") @Nullable String description, - @CustomType.Parameter("id") @Nullable Double id, - @CustomType.Parameter("name") @Nullable String name, - @CustomType.Parameter("type") String type) { - this.description = description; - this.id = id; - this.name = name; - this.type = type; - } + private String type; + private SsisFolderResponse() {} /** * @return Metadata description. * @@ -83,17 +72,13 @@ public static Builder builder() { public static Builder builder(SsisFolderResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String description; private @Nullable Double id; private @Nullable String name; private String type; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SsisFolderResponse defaults) { Objects.requireNonNull(defaults); this.description = defaults.description; @@ -102,23 +87,33 @@ public Builder(SsisFolderResponse defaults) { this.type = defaults.type; } + @CustomType.Setter public Builder description(@Nullable String description) { this.description = description; return this; } + @CustomType.Setter public Builder id(@Nullable Double id) { this.id = id; return this; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; } + @CustomType.Setter public Builder type(String type) { this.type = Objects.requireNonNull(type); return this; - } public SsisFolderResponse build() { - return new SsisFolderResponse(description, id, name, type); + } + public SsisFolderResponse build() { + final var o = new SsisFolderResponse(); + o.description = description; + o.id = id; + o.name = name; + o.type = type; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisPackageResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisPackageResponse.java index b2056bce2b8..eebc639c017 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisPackageResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisPackageResponse.java @@ -18,64 +18,45 @@ public final class SsisPackageResponse { * @return Metadata description. * */ - private final @Nullable String description; + private @Nullable String description; /** * @return Folder id which contains package. * */ - private final @Nullable Double folderId; + private @Nullable Double folderId; /** * @return Metadata id. * */ - private final @Nullable Double id; + private @Nullable Double id; /** * @return Metadata name. * */ - private final @Nullable String name; + private @Nullable String name; /** * @return Parameters in package * */ - private final @Nullable List parameters; + private @Nullable List parameters; /** * @return Project id which contains package. * */ - private final @Nullable Double projectId; + private @Nullable Double projectId; /** * @return Project version which contains package. * */ - private final @Nullable Double projectVersion; + private @Nullable Double projectVersion; /** * @return The type of SSIS object metadata. * Expected value is 'Package'. * */ - private final String type; - - @CustomType.Constructor - private SsisPackageResponse( - @CustomType.Parameter("description") @Nullable String description, - @CustomType.Parameter("folderId") @Nullable Double folderId, - @CustomType.Parameter("id") @Nullable Double id, - @CustomType.Parameter("name") @Nullable String name, - @CustomType.Parameter("parameters") @Nullable List parameters, - @CustomType.Parameter("projectId") @Nullable Double projectId, - @CustomType.Parameter("projectVersion") @Nullable Double projectVersion, - @CustomType.Parameter("type") String type) { - this.description = description; - this.folderId = folderId; - this.id = id; - this.name = name; - this.parameters = parameters; - this.projectId = projectId; - this.projectVersion = projectVersion; - this.type = type; - } + private String type; + private SsisPackageResponse() {} /** * @return Metadata description. * @@ -141,7 +122,7 @@ public static Builder builder() { public static Builder builder(SsisPackageResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String description; private @Nullable Double folderId; @@ -151,11 +132,7 @@ public static final class Builder { private @Nullable Double projectId; private @Nullable Double projectVersion; private String type; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SsisPackageResponse defaults) { Objects.requireNonNull(defaults); this.description = defaults.description; @@ -168,22 +145,27 @@ public Builder(SsisPackageResponse defaults) { this.type = defaults.type; } + @CustomType.Setter public Builder description(@Nullable String description) { this.description = description; return this; } + @CustomType.Setter public Builder folderId(@Nullable Double folderId) { this.folderId = folderId; return this; } + @CustomType.Setter public Builder id(@Nullable Double id) { this.id = id; return this; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; } + @CustomType.Setter public Builder parameters(@Nullable List parameters) { this.parameters = parameters; return this; @@ -191,19 +173,32 @@ public Builder parameters(@Nullable List parameters) { public Builder parameters(SsisParameterResponse... parameters) { return parameters(List.of(parameters)); } + @CustomType.Setter public Builder projectId(@Nullable Double projectId) { this.projectId = projectId; return this; } + @CustomType.Setter public Builder projectVersion(@Nullable Double projectVersion) { this.projectVersion = projectVersion; return this; } + @CustomType.Setter public Builder type(String type) { this.type = Objects.requireNonNull(type); return this; - } public SsisPackageResponse build() { - return new SsisPackageResponse(description, folderId, id, name, parameters, projectId, projectVersion, type); + } + public SsisPackageResponse build() { + final var o = new SsisPackageResponse(); + o.description = description; + o.folderId = folderId; + o.id = id; + o.name = name; + o.parameters = parameters; + o.projectId = projectId; + o.projectVersion = projectVersion; + o.type = type; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisParameterResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisParameterResponse.java index 7ba4b300f8c..80317497096 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisParameterResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisParameterResponse.java @@ -17,91 +17,64 @@ public final class SsisParameterResponse { * @return Parameter type. * */ - private final @Nullable String dataType; + private @Nullable String dataType; /** * @return Default value of parameter. * */ - private final @Nullable String defaultValue; + private @Nullable String defaultValue; /** * @return Parameter description. * */ - private final @Nullable String description; + private @Nullable String description; /** * @return Design default value of parameter. * */ - private final @Nullable String designDefaultValue; + private @Nullable String designDefaultValue; /** * @return Parameter id. * */ - private final @Nullable Double id; + private @Nullable Double id; /** * @return Parameter name. * */ - private final @Nullable String name; + private @Nullable String name; /** * @return Whether parameter is required. * */ - private final @Nullable Boolean required; + private @Nullable Boolean required; /** * @return Whether parameter is sensitive. * */ - private final @Nullable Boolean sensitive; + private @Nullable Boolean sensitive; /** * @return Default sensitive value of parameter. * */ - private final @Nullable String sensitiveDefaultValue; + private @Nullable String sensitiveDefaultValue; /** * @return Parameter value set. * */ - private final @Nullable Boolean valueSet; + private @Nullable Boolean valueSet; /** * @return Parameter value type. * */ - private final @Nullable String valueType; + private @Nullable String valueType; /** * @return Parameter reference variable. * */ - private final @Nullable String variable; - - @CustomType.Constructor - private SsisParameterResponse( - @CustomType.Parameter("dataType") @Nullable String dataType, - @CustomType.Parameter("defaultValue") @Nullable String defaultValue, - @CustomType.Parameter("description") @Nullable String description, - @CustomType.Parameter("designDefaultValue") @Nullable String designDefaultValue, - @CustomType.Parameter("id") @Nullable Double id, - @CustomType.Parameter("name") @Nullable String name, - @CustomType.Parameter("required") @Nullable Boolean required, - @CustomType.Parameter("sensitive") @Nullable Boolean sensitive, - @CustomType.Parameter("sensitiveDefaultValue") @Nullable String sensitiveDefaultValue, - @CustomType.Parameter("valueSet") @Nullable Boolean valueSet, - @CustomType.Parameter("valueType") @Nullable String valueType, - @CustomType.Parameter("variable") @Nullable String variable) { - this.dataType = dataType; - this.defaultValue = defaultValue; - this.description = description; - this.designDefaultValue = designDefaultValue; - this.id = id; - this.name = name; - this.required = required; - this.sensitive = sensitive; - this.sensitiveDefaultValue = sensitiveDefaultValue; - this.valueSet = valueSet; - this.valueType = valueType; - this.variable = variable; - } + private @Nullable String variable; + private SsisParameterResponse() {} /** * @return Parameter type. * @@ -194,7 +167,7 @@ public static Builder builder() { public static Builder builder(SsisParameterResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String dataType; private @Nullable String defaultValue; @@ -208,11 +181,7 @@ public static final class Builder { private @Nullable Boolean valueSet; private @Nullable String valueType; private @Nullable String variable; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SsisParameterResponse defaults) { Objects.requireNonNull(defaults); this.dataType = defaults.dataType; @@ -229,55 +198,81 @@ public Builder(SsisParameterResponse defaults) { this.variable = defaults.variable; } + @CustomType.Setter public Builder dataType(@Nullable String dataType) { this.dataType = dataType; return this; } + @CustomType.Setter public Builder defaultValue(@Nullable String defaultValue) { this.defaultValue = defaultValue; return this; } + @CustomType.Setter public Builder description(@Nullable String description) { this.description = description; return this; } + @CustomType.Setter public Builder designDefaultValue(@Nullable String designDefaultValue) { this.designDefaultValue = designDefaultValue; return this; } + @CustomType.Setter public Builder id(@Nullable Double id) { this.id = id; return this; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; } + @CustomType.Setter public Builder required(@Nullable Boolean required) { this.required = required; return this; } + @CustomType.Setter public Builder sensitive(@Nullable Boolean sensitive) { this.sensitive = sensitive; return this; } + @CustomType.Setter public Builder sensitiveDefaultValue(@Nullable String sensitiveDefaultValue) { this.sensitiveDefaultValue = sensitiveDefaultValue; return this; } + @CustomType.Setter public Builder valueSet(@Nullable Boolean valueSet) { this.valueSet = valueSet; return this; } + @CustomType.Setter public Builder valueType(@Nullable String valueType) { this.valueType = valueType; return this; } + @CustomType.Setter public Builder variable(@Nullable String variable) { this.variable = variable; return this; - } public SsisParameterResponse build() { - return new SsisParameterResponse(dataType, defaultValue, description, designDefaultValue, id, name, required, sensitive, sensitiveDefaultValue, valueSet, valueType, variable); + } + public SsisParameterResponse build() { + final var o = new SsisParameterResponse(); + o.dataType = dataType; + o.defaultValue = defaultValue; + o.description = description; + o.designDefaultValue = designDefaultValue; + o.id = id; + o.name = name; + o.required = required; + o.sensitive = sensitive; + o.sensitiveDefaultValue = sensitiveDefaultValue; + o.valueSet = valueSet; + o.valueType = valueType; + o.variable = variable; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisProjectResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisProjectResponse.java index bcbdf6af610..7c128812c3f 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisProjectResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisProjectResponse.java @@ -19,64 +19,45 @@ public final class SsisProjectResponse { * @return Metadata description. * */ - private final @Nullable String description; + private @Nullable String description; /** * @return Environment reference in project * */ - private final @Nullable List environmentRefs; + private @Nullable List environmentRefs; /** * @return Folder id which contains project. * */ - private final @Nullable Double folderId; + private @Nullable Double folderId; /** * @return Metadata id. * */ - private final @Nullable Double id; + private @Nullable Double id; /** * @return Metadata name. * */ - private final @Nullable String name; + private @Nullable String name; /** * @return Parameters in project * */ - private final @Nullable List parameters; + private @Nullable List parameters; /** * @return The type of SSIS object metadata. * Expected value is 'Project'. * */ - private final String type; + private String type; /** * @return Project version. * */ - private final @Nullable Double version; - - @CustomType.Constructor - private SsisProjectResponse( - @CustomType.Parameter("description") @Nullable String description, - @CustomType.Parameter("environmentRefs") @Nullable List environmentRefs, - @CustomType.Parameter("folderId") @Nullable Double folderId, - @CustomType.Parameter("id") @Nullable Double id, - @CustomType.Parameter("name") @Nullable String name, - @CustomType.Parameter("parameters") @Nullable List parameters, - @CustomType.Parameter("type") String type, - @CustomType.Parameter("version") @Nullable Double version) { - this.description = description; - this.environmentRefs = environmentRefs; - this.folderId = folderId; - this.id = id; - this.name = name; - this.parameters = parameters; - this.type = type; - this.version = version; - } + private @Nullable Double version; + private SsisProjectResponse() {} /** * @return Metadata description. * @@ -142,7 +123,7 @@ public static Builder builder() { public static Builder builder(SsisProjectResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String description; private @Nullable List environmentRefs; @@ -152,11 +133,7 @@ public static final class Builder { private @Nullable List parameters; private String type; private @Nullable Double version; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SsisProjectResponse defaults) { Objects.requireNonNull(defaults); this.description = defaults.description; @@ -169,10 +146,12 @@ public Builder(SsisProjectResponse defaults) { this.version = defaults.version; } + @CustomType.Setter public Builder description(@Nullable String description) { this.description = description; return this; } + @CustomType.Setter public Builder environmentRefs(@Nullable List environmentRefs) { this.environmentRefs = environmentRefs; return this; @@ -180,18 +159,22 @@ public Builder environmentRefs(@Nullable List public Builder environmentRefs(SsisEnvironmentReferenceResponse... environmentRefs) { return environmentRefs(List.of(environmentRefs)); } + @CustomType.Setter public Builder folderId(@Nullable Double folderId) { this.folderId = folderId; return this; } + @CustomType.Setter public Builder id(@Nullable Double id) { this.id = id; return this; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; } + @CustomType.Setter public Builder parameters(@Nullable List parameters) { this.parameters = parameters; return this; @@ -199,15 +182,27 @@ public Builder parameters(@Nullable List parameters) { public Builder parameters(SsisParameterResponse... parameters) { return parameters(List.of(parameters)); } + @CustomType.Setter public Builder type(String type) { this.type = Objects.requireNonNull(type); return this; } + @CustomType.Setter public Builder version(@Nullable Double version) { this.version = version; return this; - } public SsisProjectResponse build() { - return new SsisProjectResponse(description, environmentRefs, folderId, id, name, parameters, type, version); + } + public SsisProjectResponse build() { + final var o = new SsisProjectResponse(); + o.description = description; + o.environmentRefs = environmentRefs; + o.folderId = folderId; + o.id = id; + o.name = name; + o.parameters = parameters; + o.type = type; + o.version = version; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisVariableResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisVariableResponse.java index 6579654e8f5..fd3d0d4fc42 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisVariableResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/SsisVariableResponse.java @@ -17,56 +17,39 @@ public final class SsisVariableResponse { * @return Variable type. * */ - private final @Nullable String dataType; + private @Nullable String dataType; /** * @return Variable description. * */ - private final @Nullable String description; + private @Nullable String description; /** * @return Variable id. * */ - private final @Nullable Double id; + private @Nullable Double id; /** * @return Variable name. * */ - private final @Nullable String name; + private @Nullable String name; /** * @return Whether variable is sensitive. * */ - private final @Nullable Boolean sensitive; + private @Nullable Boolean sensitive; /** * @return Variable sensitive value. * */ - private final @Nullable String sensitiveValue; + private @Nullable String sensitiveValue; /** * @return Variable value. * */ - private final @Nullable String value; - - @CustomType.Constructor - private SsisVariableResponse( - @CustomType.Parameter("dataType") @Nullable String dataType, - @CustomType.Parameter("description") @Nullable String description, - @CustomType.Parameter("id") @Nullable Double id, - @CustomType.Parameter("name") @Nullable String name, - @CustomType.Parameter("sensitive") @Nullable Boolean sensitive, - @CustomType.Parameter("sensitiveValue") @Nullable String sensitiveValue, - @CustomType.Parameter("value") @Nullable String value) { - this.dataType = dataType; - this.description = description; - this.id = id; - this.name = name; - this.sensitive = sensitive; - this.sensitiveValue = sensitiveValue; - this.value = value; - } + private @Nullable String value; + private SsisVariableResponse() {} /** * @return Variable type. * @@ -124,7 +107,7 @@ public static Builder builder() { public static Builder builder(SsisVariableResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String dataType; private @Nullable String description; @@ -133,11 +116,7 @@ public static final class Builder { private @Nullable Boolean sensitive; private @Nullable String sensitiveValue; private @Nullable String value; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SsisVariableResponse defaults) { Objects.requireNonNull(defaults); this.dataType = defaults.dataType; @@ -149,35 +128,51 @@ public Builder(SsisVariableResponse defaults) { this.value = defaults.value; } + @CustomType.Setter public Builder dataType(@Nullable String dataType) { this.dataType = dataType; return this; } + @CustomType.Setter public Builder description(@Nullable String description) { this.description = description; return this; } + @CustomType.Setter public Builder id(@Nullable Double id) { this.id = id; return this; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; } + @CustomType.Setter public Builder sensitive(@Nullable Boolean sensitive) { this.sensitive = sensitive; return this; } + @CustomType.Setter public Builder sensitiveValue(@Nullable String sensitiveValue) { this.sensitiveValue = sensitiveValue; return this; } + @CustomType.Setter public Builder value(@Nullable String value) { this.value = value; return this; - } public SsisVariableResponse build() { - return new SsisVariableResponse(dataType, description, id, name, sensitive, sensitiveValue, value); + } + public SsisVariableResponse build() { + final var o = new SsisVariableResponse(); + o.dataType = dataType; + o.description = description; + o.id = id; + o.name = name; + o.sensitive = sensitive; + o.sensitiveValue = sensitiveValue; + o.value = value; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java index 5dcd5f74af0..2888a9b4bae 100644 --- a/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java +++ b/pkg/codegen/testing/test/testdata/output-funcs/java/src/main/java/com/pulumi/mypkg/outputs/StorageAccountKeyResponse.java @@ -13,35 +13,24 @@ public final class StorageAccountKeyResponse { * @return Creation time of the key, in round trip date format. * */ - private final String creationTime; + private String creationTime; /** * @return Name of the key. * */ - private final String keyName; + private String keyName; /** * @return Permissions for the key -- read-only or full permissions. * */ - private final String permissions; + private String permissions; /** * @return Base 64-encoded value of the key. * */ - private final String value; - - @CustomType.Constructor - private StorageAccountKeyResponse( - @CustomType.Parameter("creationTime") String creationTime, - @CustomType.Parameter("keyName") String keyName, - @CustomType.Parameter("permissions") String permissions, - @CustomType.Parameter("value") String value) { - this.creationTime = creationTime; - this.keyName = keyName; - this.permissions = permissions; - this.value = value; - } + private String value; + private StorageAccountKeyResponse() {} /** * @return Creation time of the key, in round trip date format. * @@ -78,17 +67,13 @@ public static Builder builder() { public static Builder builder(StorageAccountKeyResponse defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private String creationTime; private String keyName; private String permissions; private String value; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(StorageAccountKeyResponse defaults) { Objects.requireNonNull(defaults); this.creationTime = defaults.creationTime; @@ -97,23 +82,33 @@ public Builder(StorageAccountKeyResponse defaults) { this.value = defaults.value; } + @CustomType.Setter public Builder creationTime(String creationTime) { this.creationTime = Objects.requireNonNull(creationTime); return this; } + @CustomType.Setter public Builder keyName(String keyName) { this.keyName = Objects.requireNonNull(keyName); return this; } + @CustomType.Setter public Builder permissions(String permissions) { this.permissions = Objects.requireNonNull(permissions); return this; } + @CustomType.Setter public Builder value(String value) { this.value = Objects.requireNonNull(value); return this; - } public StorageAccountKeyResponse build() { - return new StorageAccountKeyResponse(creationTime, keyName, permissions, value); + } + public StorageAccountKeyResponse build() { + final var o = new StorageAccountKeyResponse(); + o.creationTime = creationTime; + o.keyName = keyName; + o.permissions = permissions; + o.value = value; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Chew.java b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Chew.java index 77a0125b46a..f6ab072b041 100644 --- a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Chew.java +++ b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Chew.java @@ -11,13 +11,9 @@ @CustomType public final class Chew { - private final @Nullable Dog owner; - - @CustomType.Constructor - private Chew(@CustomType.Parameter("owner") @Nullable Dog owner) { - this.owner = owner; - } + private @Nullable Dog owner; + private Chew() {} public Optional owner() { return Optional.ofNullable(this.owner); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(Chew defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Dog owner; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Chew defaults) { Objects.requireNonNull(defaults); this.owner = defaults.owner; } + @CustomType.Setter public Builder owner(@Nullable Dog owner) { this.owner = owner; return this; - } public Chew build() { - return new Chew(owner); + } + public Chew build() { + final var o = new Chew(); + o.owner = owner; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Laser.java b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Laser.java index 453c949667b..6978dda3ac5 100644 --- a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Laser.java +++ b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Laser.java @@ -13,20 +13,11 @@ @CustomType public final class Laser { - private final @Nullable Cat animal; - private final @Nullable Boolean batteries; - private final @Nullable Double light; - - @CustomType.Constructor - private Laser( - @CustomType.Parameter("animal") @Nullable Cat animal, - @CustomType.Parameter("batteries") @Nullable Boolean batteries, - @CustomType.Parameter("light") @Nullable Double light) { - this.animal = animal; - this.batteries = batteries; - this.light = light; - } + private @Nullable Cat animal; + private @Nullable Boolean batteries; + private @Nullable Double light; + private Laser() {} public Optional animal() { return Optional.ofNullable(this.animal); } @@ -44,16 +35,12 @@ public static Builder builder() { public static Builder builder(Laser defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Cat animal; private @Nullable Boolean batteries; private @Nullable Double light; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Laser defaults) { Objects.requireNonNull(defaults); this.animal = defaults.animal; @@ -61,19 +48,27 @@ public Builder(Laser defaults) { this.light = defaults.light; } + @CustomType.Setter public Builder animal(@Nullable Cat animal) { this.animal = animal; return this; } + @CustomType.Setter public Builder batteries(@Nullable Boolean batteries) { this.batteries = batteries; return this; } + @CustomType.Setter public Builder light(@Nullable Double light) { this.light = light; return this; - } public Laser build() { - return new Laser(animal, batteries, light); + } + public Laser build() { + final var o = new Laser(); + o.animal = animal; + o.batteries = batteries; + o.light = light; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Rec.java b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Rec.java index 8e7e3384f49..80fcbefb791 100644 --- a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Rec.java +++ b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Rec.java @@ -10,13 +10,9 @@ @CustomType public final class Rec { - private final @Nullable Rec rec1; - - @CustomType.Constructor - private Rec(@CustomType.Parameter("rec1") @Nullable Rec rec1) { - this.rec1 = rec1; - } + private @Nullable Rec rec1; + private Rec() {} public Optional rec1() { return Optional.ofNullable(this.rec1); } @@ -28,24 +24,24 @@ public static Builder builder() { public static Builder builder(Rec defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Rec rec1; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Rec defaults) { Objects.requireNonNull(defaults); this.rec1 = defaults.rec1; } + @CustomType.Setter public Builder rec1(@Nullable Rec rec1) { this.rec1 = rec1; return this; - } public Rec build() { - return new Rec(rec1); + } + public Rec build() { + final var o = new Rec(); + o.rec1 = rec1; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Toy.java b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Toy.java index 129832546a4..84fa5b5e91c 100644 --- a/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Toy.java +++ b/pkg/codegen/testing/test/testdata/replace-on-change/java/src/main/java/com/pulumi/example/outputs/Toy.java @@ -12,20 +12,11 @@ @CustomType public final class Toy { - private final @Nullable Toy associated; - private final @Nullable String color; - private final @Nullable Double wear; - - @CustomType.Constructor - private Toy( - @CustomType.Parameter("associated") @Nullable Toy associated, - @CustomType.Parameter("color") @Nullable String color, - @CustomType.Parameter("wear") @Nullable Double wear) { - this.associated = associated; - this.color = color; - this.wear = wear; - } + private @Nullable Toy associated; + private @Nullable String color; + private @Nullable Double wear; + private Toy() {} public Optional associated() { return Optional.ofNullable(this.associated); } @@ -43,16 +34,12 @@ public static Builder builder() { public static Builder builder(Toy defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Toy associated; private @Nullable String color; private @Nullable Double wear; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Toy defaults) { Objects.requireNonNull(defaults); this.associated = defaults.associated; @@ -60,19 +47,27 @@ public Builder(Toy defaults) { this.wear = defaults.wear; } + @CustomType.Setter public Builder associated(@Nullable Toy associated) { this.associated = associated; return this; } + @CustomType.Setter public Builder color(@Nullable String color) { this.color = color; return this; } + @CustomType.Setter public Builder wear(@Nullable Double wear) { this.wear = wear; return this; - } public Toy build() { - return new Toy(associated, color, wear); + } + public Toy build() { + final var o = new Toy(); + o.associated = associated; + o.color = color; + o.wear = wear; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/resource-args-python-case-insensitive/java/src/main/java/com/pulumi/example/outputs/Pet.java b/pkg/codegen/testing/test/testdata/resource-args-python-case-insensitive/java/src/main/java/com/pulumi/example/outputs/Pet.java index 4913c384a70..2d133fa378b 100644 --- a/pkg/codegen/testing/test/testdata/resource-args-python-case-insensitive/java/src/main/java/com/pulumi/example/outputs/Pet.java +++ b/pkg/codegen/testing/test/testdata/resource-args-python-case-insensitive/java/src/main/java/com/pulumi/example/outputs/Pet.java @@ -11,13 +11,9 @@ @CustomType public final class Pet { - private final @Nullable String name; - - @CustomType.Constructor - private Pet(@CustomType.Parameter("name") @Nullable String name) { - this.name = name; - } + private @Nullable String name; + private Pet() {} public Optional name() { return Optional.ofNullable(this.name); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(Pet defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String name; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Pet defaults) { Objects.requireNonNull(defaults); this.name = defaults.name; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; - } public Pet build() { - return new Pet(name); + } + public Pet build() { + final var o = new Pet(); + o.name = name; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/resource-args-python/java/src/main/java/com/pulumi/example/outputs/Pet.java b/pkg/codegen/testing/test/testdata/resource-args-python/java/src/main/java/com/pulumi/example/outputs/Pet.java index 4913c384a70..2d133fa378b 100644 --- a/pkg/codegen/testing/test/testdata/resource-args-python/java/src/main/java/com/pulumi/example/outputs/Pet.java +++ b/pkg/codegen/testing/test/testdata/resource-args-python/java/src/main/java/com/pulumi/example/outputs/Pet.java @@ -11,13 +11,9 @@ @CustomType public final class Pet { - private final @Nullable String name; - - @CustomType.Constructor - private Pet(@CustomType.Parameter("name") @Nullable String name) { - this.name = name; - } + private @Nullable String name; + private Pet() {} public Optional name() { return Optional.ofNullable(this.name); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(Pet defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String name; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Pet defaults) { Objects.requireNonNull(defaults); this.name = defaults.name; } + @CustomType.Setter public Builder name(@Nullable String name) { this.name = name; return this; - } public Pet build() { - return new Pet(name); + } + public Pet build() { + final var o = new Pet(); + o.name = name; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-enum-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java b/pkg/codegen/testing/test/testdata/simple-enum-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java index 186b3ab244f..cd8858e42cd 100644 --- a/pkg/codegen/testing/test/testdata/simple-enum-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java +++ b/pkg/codegen/testing/test/testdata/simple-enum-schema/java/src/main/java/com/pulumi/plant/outputs/Container.java @@ -13,23 +13,12 @@ @CustomType public final class Container { - private final @Nullable ContainerBrightness brightness; - private final @Nullable String color; - private final @Nullable String material; - private final ContainerSize size; - - @CustomType.Constructor - private Container( - @CustomType.Parameter("brightness") @Nullable ContainerBrightness brightness, - @CustomType.Parameter("color") @Nullable String color, - @CustomType.Parameter("material") @Nullable String material, - @CustomType.Parameter("size") ContainerSize size) { - this.brightness = brightness; - this.color = color; - this.material = material; - this.size = size; - } + private @Nullable ContainerBrightness brightness; + private @Nullable String color; + private @Nullable String material; + private ContainerSize size; + private Container() {} public Optional brightness() { return Optional.ofNullable(this.brightness); } @@ -50,17 +39,13 @@ public static Builder builder() { public static Builder builder(Container defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable ContainerBrightness brightness; private @Nullable String color; private @Nullable String material; private ContainerSize size; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Container defaults) { Objects.requireNonNull(defaults); this.brightness = defaults.brightness; @@ -69,23 +54,33 @@ public Builder(Container defaults) { this.size = defaults.size; } + @CustomType.Setter public Builder brightness(@Nullable ContainerBrightness brightness) { this.brightness = brightness; return this; } + @CustomType.Setter public Builder color(@Nullable String color) { this.color = color; return this; } + @CustomType.Setter public Builder material(@Nullable String material) { this.material = material; return this; } + @CustomType.Setter public Builder size(ContainerSize size) { this.size = Objects.requireNonNull(size); return this; - } public Container build() { - return new Container(brightness, color, material, size); + } + public Container build() { + final var o = new Container(); + o.brightness = brightness; + o.color = color; + o.material = material; + o.size = size; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/java/src/main/java/com/pulumi/example/outputs/Foo.java b/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/java/src/main/java/com/pulumi/example/outputs/Foo.java index a095cf91409..1964399213b 100644 --- a/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/java/src/main/java/com/pulumi/example/outputs/Foo.java +++ b/pkg/codegen/testing/test/testdata/simple-plain-schema-with-root-package/java/src/main/java/com/pulumi/example/outputs/Foo.java @@ -13,29 +13,14 @@ @CustomType public final class Foo { - private final Boolean a; - private final @Nullable Boolean b; - private final Integer c; - private final @Nullable Integer d; - private final String e; - private final @Nullable String f; - - @CustomType.Constructor - private Foo( - @CustomType.Parameter("a") Boolean a, - @CustomType.Parameter("b") @Nullable Boolean b, - @CustomType.Parameter("c") Integer c, - @CustomType.Parameter("d") @Nullable Integer d, - @CustomType.Parameter("e") String e, - @CustomType.Parameter("f") @Nullable String f) { - this.a = a; - this.b = b; - this.c = c; - this.d = d; - this.e = e; - this.f = f; - } + private Boolean a; + private @Nullable Boolean b; + private Integer c; + private @Nullable Integer d; + private String e; + private @Nullable String f; + private Foo() {} public Boolean a() { return this.a; } @@ -62,7 +47,7 @@ public static Builder builder() { public static Builder builder(Foo defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private Boolean a; private @Nullable Boolean b; @@ -70,11 +55,7 @@ public static final class Builder { private @Nullable Integer d; private String e; private @Nullable String f; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Foo defaults) { Objects.requireNonNull(defaults); this.a = defaults.a; @@ -85,31 +66,45 @@ public Builder(Foo defaults) { this.f = defaults.f; } + @CustomType.Setter public Builder a(Boolean a) { this.a = Objects.requireNonNull(a); return this; } + @CustomType.Setter public Builder b(@Nullable Boolean b) { this.b = b; return this; } + @CustomType.Setter public Builder c(Integer c) { this.c = Objects.requireNonNull(c); return this; } + @CustomType.Setter public Builder d(@Nullable Integer d) { this.d = d; return this; } + @CustomType.Setter public Builder e(String e) { this.e = Objects.requireNonNull(e); return this; } + @CustomType.Setter public Builder f(@Nullable String f) { this.f = f; return this; - } public Foo build() { - return new Foo(a, b, c, d, e, f); + } + public Foo build() { + final var o = new Foo(); + o.a = a; + o.b = b; + o.c = c; + o.d = d; + o.e = e; + o.f = f; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-plain-schema/java/src/main/java/com/pulumi/example/outputs/Foo.java b/pkg/codegen/testing/test/testdata/simple-plain-schema/java/src/main/java/com/pulumi/example/outputs/Foo.java index a095cf91409..1964399213b 100644 --- a/pkg/codegen/testing/test/testdata/simple-plain-schema/java/src/main/java/com/pulumi/example/outputs/Foo.java +++ b/pkg/codegen/testing/test/testdata/simple-plain-schema/java/src/main/java/com/pulumi/example/outputs/Foo.java @@ -13,29 +13,14 @@ @CustomType public final class Foo { - private final Boolean a; - private final @Nullable Boolean b; - private final Integer c; - private final @Nullable Integer d; - private final String e; - private final @Nullable String f; - - @CustomType.Constructor - private Foo( - @CustomType.Parameter("a") Boolean a, - @CustomType.Parameter("b") @Nullable Boolean b, - @CustomType.Parameter("c") Integer c, - @CustomType.Parameter("d") @Nullable Integer d, - @CustomType.Parameter("e") String e, - @CustomType.Parameter("f") @Nullable String f) { - this.a = a; - this.b = b; - this.c = c; - this.d = d; - this.e = e; - this.f = f; - } + private Boolean a; + private @Nullable Boolean b; + private Integer c; + private @Nullable Integer d; + private String e; + private @Nullable String f; + private Foo() {} public Boolean a() { return this.a; } @@ -62,7 +47,7 @@ public static Builder builder() { public static Builder builder(Foo defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private Boolean a; private @Nullable Boolean b; @@ -70,11 +55,7 @@ public static final class Builder { private @Nullable Integer d; private String e; private @Nullable String f; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Foo defaults) { Objects.requireNonNull(defaults); this.a = defaults.a; @@ -85,31 +66,45 @@ public Builder(Foo defaults) { this.f = defaults.f; } + @CustomType.Setter public Builder a(Boolean a) { this.a = Objects.requireNonNull(a); return this; } + @CustomType.Setter public Builder b(@Nullable Boolean b) { this.b = b; return this; } + @CustomType.Setter public Builder c(Integer c) { this.c = Objects.requireNonNull(c); return this; } + @CustomType.Setter public Builder d(@Nullable Integer d) { this.d = d; return this; } + @CustomType.Setter public Builder e(String e) { this.e = Objects.requireNonNull(e); return this; } + @CustomType.Setter public Builder f(@Nullable String f) { this.f = f; return this; - } public Foo build() { - return new Foo(a, b, c, d, e, f); + } + public Foo build() { + final var o = new Foo(); + o.a = a; + o.b = b; + o.c = c; + o.d = d; + o.e = e; + o.f = f; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java b/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java index f41c7364fa5..23f0e64d8b8 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema-custom-pypackage-name/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java @@ -11,13 +11,9 @@ @CustomType public final class ArgFunctionResult { - private final @Nullable Resource result; - - @CustomType.Constructor - private ArgFunctionResult(@CustomType.Parameter("result") @Nullable Resource result) { - this.result = result; - } + private @Nullable Resource result; + private ArgFunctionResult() {} public Optional result() { return Optional.ofNullable(this.result); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(ArgFunctionResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Resource result; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ArgFunctionResult defaults) { Objects.requireNonNull(defaults); this.result = defaults.result; } + @CustomType.Setter public Builder result(@Nullable Resource result) { this.result = result; return this; - } public ArgFunctionResult build() { - return new ArgFunctionResult(result); + } + public ArgFunctionResult build() { + final var o = new ArgFunctionResult(); + o.result = result; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java index f41c7364fa5..23f0e64d8b8 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java @@ -11,13 +11,9 @@ @CustomType public final class ArgFunctionResult { - private final @Nullable Resource result; - - @CustomType.Constructor - private ArgFunctionResult(@CustomType.Parameter("result") @Nullable Resource result) { - this.result = result; - } + private @Nullable Resource result; + private ArgFunctionResult() {} public Optional result() { return Optional.ofNullable(this.result); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(ArgFunctionResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Resource result; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ArgFunctionResult defaults) { Objects.requireNonNull(defaults); this.result = defaults.result; } + @CustomType.Setter public Builder result(@Nullable Resource result) { this.result = result; return this; - } public ArgFunctionResult build() { - return new ArgFunctionResult(result); + } + public ArgFunctionResult build() { + final var o = new ArgFunctionResult(); + o.result = result; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java index 17c460fc3e7..d35d40aff1f 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java @@ -11,13 +11,9 @@ @CustomType public final class ConfigMap { - private final @Nullable String config; - - @CustomType.Constructor - private ConfigMap(@CustomType.Parameter("config") @Nullable String config) { - this.config = config; - } + private @Nullable String config; + private ConfigMap() {} public Optional config() { return Optional.ofNullable(this.config); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(ConfigMap defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String config; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ConfigMap defaults) { Objects.requireNonNull(defaults); this.config = defaults.config; } + @CustomType.Setter public Builder config(@Nullable String config) { this.config = config; return this; - } public ConfigMap build() { - return new ConfigMap(config); + } + public ConfigMap build() { + final var o = new ConfigMap(); + o.config = config; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/Object.java b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/Object.java index 33114f681aa..bee6c3250c2 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/Object.java +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/Object.java @@ -16,34 +16,21 @@ @CustomType public final class Object { - private final @Nullable String bar; - private final @Nullable List configs; - private final @Nullable Resource foo; + private @Nullable String bar; + private @Nullable List configs; + private @Nullable Resource foo; /** * @return List of lists of other objects * */ - private final @Nullable List> others; + private @Nullable List> others; /** * @return Mapping from string to list of some other object * */ - private final @Nullable Map> stillOthers; - - @CustomType.Constructor - private Object( - @CustomType.Parameter("bar") @Nullable String bar, - @CustomType.Parameter("configs") @Nullable List configs, - @CustomType.Parameter("foo") @Nullable Resource foo, - @CustomType.Parameter("others") @Nullable List> others, - @CustomType.Parameter("stillOthers") @Nullable Map> stillOthers) { - this.bar = bar; - this.configs = configs; - this.foo = foo; - this.others = others; - this.stillOthers = stillOthers; - } + private @Nullable Map> stillOthers; + private Object() {} public Optional bar() { return Optional.ofNullable(this.bar); } @@ -75,18 +62,14 @@ public static Builder builder() { public static Builder builder(Object defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String bar; private @Nullable List configs; private @Nullable Resource foo; private @Nullable List> others; private @Nullable Map> stillOthers; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Object defaults) { Objects.requireNonNull(defaults); this.bar = defaults.bar; @@ -96,10 +79,12 @@ public Builder(Object defaults) { this.stillOthers = defaults.stillOthers; } + @CustomType.Setter public Builder bar(@Nullable String bar) { this.bar = bar; return this; } + @CustomType.Setter public Builder configs(@Nullable List configs) { this.configs = configs; return this; @@ -107,19 +92,29 @@ public Builder configs(@Nullable List configs) { public Builder configs(ConfigMap... configs) { return configs(List.of(configs)); } + @CustomType.Setter public Builder foo(@Nullable Resource foo) { this.foo = foo; return this; } + @CustomType.Setter public Builder others(@Nullable List> others) { this.others = others; return this; } + @CustomType.Setter public Builder stillOthers(@Nullable Map> stillOthers) { this.stillOthers = stillOthers; return this; - } public Object build() { - return new Object(bar, configs, foo, others, stillOthers); + } + public Object build() { + final var o = new Object(); + o.bar = bar; + o.configs = configs; + o.foo = foo; + o.others = others; + o.stillOthers = stillOthers; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java index 97834d8a24a..0022092f2be 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java @@ -12,17 +12,10 @@ @CustomType public final class ObjectWithNodeOptionalInputs { - private final @Nullable Integer bar; - private final String foo; - - @CustomType.Constructor - private ObjectWithNodeOptionalInputs( - @CustomType.Parameter("bar") @Nullable Integer bar, - @CustomType.Parameter("foo") String foo) { - this.bar = bar; - this.foo = foo; - } + private @Nullable Integer bar; + private String foo; + private ObjectWithNodeOptionalInputs() {} public Optional bar() { return Optional.ofNullable(this.bar); } @@ -37,30 +30,32 @@ public static Builder builder() { public static Builder builder(ObjectWithNodeOptionalInputs defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Integer bar; private String foo; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ObjectWithNodeOptionalInputs defaults) { Objects.requireNonNull(defaults); this.bar = defaults.bar; this.foo = defaults.foo; } + @CustomType.Setter public Builder bar(@Nullable Integer bar) { this.bar = bar; return this; } + @CustomType.Setter public Builder foo(String foo) { this.foo = Objects.requireNonNull(foo); return this; - } public ObjectWithNodeOptionalInputs build() { - return new ObjectWithNodeOptionalInputs(bar, foo); + } + public ObjectWithNodeOptionalInputs build() { + final var o = new ObjectWithNodeOptionalInputs(); + o.bar = bar; + o.foo = foo; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java index 01bb6021c1f..60ee2d69fe3 100644 --- a/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java +++ b/pkg/codegen/testing/test/testdata/simple-resource-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java @@ -11,13 +11,9 @@ @CustomType public final class SomeOtherObject { - private final @Nullable String baz; - - @CustomType.Constructor - private SomeOtherObject(@CustomType.Parameter("baz") @Nullable String baz) { - this.baz = baz; - } + private @Nullable String baz; + private SomeOtherObject() {} public Optional baz() { return Optional.ofNullable(this.baz); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(SomeOtherObject defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String baz; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SomeOtherObject defaults) { Objects.requireNonNull(defaults); this.baz = defaults.baz; } + @CustomType.Setter public Builder baz(@Nullable String baz) { this.baz = baz; return this; - } public SomeOtherObject build() { - return new SomeOtherObject(baz); + } + public SomeOtherObject build() { + final var o = new SomeOtherObject(); + o.baz = baz; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java index f41c7364fa5..23f0e64d8b8 100644 --- a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java +++ b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ArgFunctionResult.java @@ -11,13 +11,9 @@ @CustomType public final class ArgFunctionResult { - private final @Nullable Resource result; - - @CustomType.Constructor - private ArgFunctionResult(@CustomType.Parameter("result") @Nullable Resource result) { - this.result = result; - } + private @Nullable Resource result; + private ArgFunctionResult() {} public Optional result() { return Optional.ofNullable(this.result); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(ArgFunctionResult defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Resource result; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ArgFunctionResult defaults) { Objects.requireNonNull(defaults); this.result = defaults.result; } + @CustomType.Setter public Builder result(@Nullable Resource result) { this.result = result; return this; - } public ArgFunctionResult build() { - return new ArgFunctionResult(result); + } + public ArgFunctionResult build() { + final var o = new ArgFunctionResult(); + o.result = result; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java index 17c460fc3e7..d35d40aff1f 100644 --- a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java +++ b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ConfigMap.java @@ -11,13 +11,9 @@ @CustomType public final class ConfigMap { - private final @Nullable String config; - - @CustomType.Constructor - private ConfigMap(@CustomType.Parameter("config") @Nullable String config) { - this.config = config; - } + private @Nullable String config; + private ConfigMap() {} public Optional config() { return Optional.ofNullable(this.config); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(ConfigMap defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String config; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ConfigMap defaults) { Objects.requireNonNull(defaults); this.config = defaults.config; } + @CustomType.Setter public Builder config(@Nullable String config) { this.config = config; return this; - } public ConfigMap build() { - return new ConfigMap(config); + } + public ConfigMap build() { + final var o = new ConfigMap(); + o.config = config; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/Object.java b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/Object.java index 33114f681aa..bee6c3250c2 100644 --- a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/Object.java +++ b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/Object.java @@ -16,34 +16,21 @@ @CustomType public final class Object { - private final @Nullable String bar; - private final @Nullable List configs; - private final @Nullable Resource foo; + private @Nullable String bar; + private @Nullable List configs; + private @Nullable Resource foo; /** * @return List of lists of other objects * */ - private final @Nullable List> others; + private @Nullable List> others; /** * @return Mapping from string to list of some other object * */ - private final @Nullable Map> stillOthers; - - @CustomType.Constructor - private Object( - @CustomType.Parameter("bar") @Nullable String bar, - @CustomType.Parameter("configs") @Nullable List configs, - @CustomType.Parameter("foo") @Nullable Resource foo, - @CustomType.Parameter("others") @Nullable List> others, - @CustomType.Parameter("stillOthers") @Nullable Map> stillOthers) { - this.bar = bar; - this.configs = configs; - this.foo = foo; - this.others = others; - this.stillOthers = stillOthers; - } + private @Nullable Map> stillOthers; + private Object() {} public Optional bar() { return Optional.ofNullable(this.bar); } @@ -75,18 +62,14 @@ public static Builder builder() { public static Builder builder(Object defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String bar; private @Nullable List configs; private @Nullable Resource foo; private @Nullable List> others; private @Nullable Map> stillOthers; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(Object defaults) { Objects.requireNonNull(defaults); this.bar = defaults.bar; @@ -96,10 +79,12 @@ public Builder(Object defaults) { this.stillOthers = defaults.stillOthers; } + @CustomType.Setter public Builder bar(@Nullable String bar) { this.bar = bar; return this; } + @CustomType.Setter public Builder configs(@Nullable List configs) { this.configs = configs; return this; @@ -107,19 +92,29 @@ public Builder configs(@Nullable List configs) { public Builder configs(ConfigMap... configs) { return configs(List.of(configs)); } + @CustomType.Setter public Builder foo(@Nullable Resource foo) { this.foo = foo; return this; } + @CustomType.Setter public Builder others(@Nullable List> others) { this.others = others; return this; } + @CustomType.Setter public Builder stillOthers(@Nullable Map> stillOthers) { this.stillOthers = stillOthers; return this; - } public Object build() { - return new Object(bar, configs, foo, others, stillOthers); + } + public Object build() { + final var o = new Object(); + o.bar = bar; + o.configs = configs; + o.foo = foo; + o.others = others; + o.stillOthers = stillOthers; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java index 97834d8a24a..0022092f2be 100644 --- a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java +++ b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/ObjectWithNodeOptionalInputs.java @@ -12,17 +12,10 @@ @CustomType public final class ObjectWithNodeOptionalInputs { - private final @Nullable Integer bar; - private final String foo; - - @CustomType.Constructor - private ObjectWithNodeOptionalInputs( - @CustomType.Parameter("bar") @Nullable Integer bar, - @CustomType.Parameter("foo") String foo) { - this.bar = bar; - this.foo = foo; - } + private @Nullable Integer bar; + private String foo; + private ObjectWithNodeOptionalInputs() {} public Optional bar() { return Optional.ofNullable(this.bar); } @@ -37,30 +30,32 @@ public static Builder builder() { public static Builder builder(ObjectWithNodeOptionalInputs defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable Integer bar; private String foo; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(ObjectWithNodeOptionalInputs defaults) { Objects.requireNonNull(defaults); this.bar = defaults.bar; this.foo = defaults.foo; } + @CustomType.Setter public Builder bar(@Nullable Integer bar) { this.bar = bar; return this; } + @CustomType.Setter public Builder foo(String foo) { this.foo = Objects.requireNonNull(foo); return this; - } public ObjectWithNodeOptionalInputs build() { - return new ObjectWithNodeOptionalInputs(bar, foo); + } + public ObjectWithNodeOptionalInputs build() { + final var o = new ObjectWithNodeOptionalInputs(); + o.bar = bar; + o.foo = foo; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/OutputOnlyObjectType.java b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/OutputOnlyObjectType.java index 601a7d9226f..bc550b666ee 100644 --- a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/OutputOnlyObjectType.java +++ b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/OutputOnlyObjectType.java @@ -11,13 +11,9 @@ @CustomType public final class OutputOnlyObjectType { - private final @Nullable String foo; - - @CustomType.Constructor - private OutputOnlyObjectType(@CustomType.Parameter("foo") @Nullable String foo) { - this.foo = foo; - } + private @Nullable String foo; + private OutputOnlyObjectType() {} public Optional foo() { return Optional.ofNullable(this.foo); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(OutputOnlyObjectType defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String foo; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(OutputOnlyObjectType defaults) { Objects.requireNonNull(defaults); this.foo = defaults.foo; } + @CustomType.Setter public Builder foo(@Nullable String foo) { this.foo = foo; return this; - } public OutputOnlyObjectType build() { - return new OutputOnlyObjectType(foo); + } + public OutputOnlyObjectType build() { + final var o = new OutputOnlyObjectType(); + o.foo = foo; + return o; } } } diff --git a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java index 01bb6021c1f..60ee2d69fe3 100644 --- a/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java +++ b/pkg/codegen/testing/test/testdata/simple-yaml-schema/java/src/main/java/com/pulumi/example/outputs/SomeOtherObject.java @@ -11,13 +11,9 @@ @CustomType public final class SomeOtherObject { - private final @Nullable String baz; - - @CustomType.Constructor - private SomeOtherObject(@CustomType.Parameter("baz") @Nullable String baz) { - this.baz = baz; - } + private @Nullable String baz; + private SomeOtherObject() {} public Optional baz() { return Optional.ofNullable(this.baz); } @@ -29,24 +25,24 @@ public static Builder builder() { public static Builder builder(SomeOtherObject defaults) { return new Builder(defaults); } - + @CustomType.Builder public static final class Builder { private @Nullable String baz; - - public Builder() { - // Empty - } - + public Builder() {} public Builder(SomeOtherObject defaults) { Objects.requireNonNull(defaults); this.baz = defaults.baz; } + @CustomType.Setter public Builder baz(@Nullable String baz) { this.baz = baz; return this; - } public SomeOtherObject build() { - return new SomeOtherObject(baz); + } + public SomeOtherObject build() { + final var o = new SomeOtherObject(); + o.baz = baz; + return o; } } }