@fractal_cloud/sdk 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -502,7 +502,7 @@ let ServiceDeliveryModel$1 = /* @__PURE__ */ function(ServiceDeliveryModel) {
502
502
  * if the string is valid.
503
503
  */
504
504
  const isValidPascalCaseString = (value) => {
505
- if (!/^[A-Z][a-zA-Z]*$/.test(value)) return [` Value '${value}' must be in PascalCase`];
505
+ if (!/^[A-Z][a-zA-Z0-9]*$/.test(value)) return [` Value '${value}' must be in PascalCase`];
506
506
  return [];
507
507
  };
508
508
  /**
@@ -1174,7 +1174,7 @@ const CLIENT_SECRET_HEADER$1 = "X-ClientSecret";
1174
1174
  const FRACTAL_API_URL$1 = "https://api.fractal.cloud";
1175
1175
  const deployFractal = async (credentials, fractal) => {
1176
1176
  const fractalUrl = `${FRACTAL_API_URL$1}/blueprints/${fractal.id.toString().replace(":", "/")}`;
1177
- ((await superagent.default.get(fractalUrl).set(CLIENT_ID_HEADER$1, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER$1, credentials.secret).send()).status === 200 ? superagent.default.put(fractalUrl) : superagent.default.post(fractalUrl)).set(CLIENT_ID_HEADER$1, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER$1, credentials.secret).send({
1177
+ ((await superagent.default.get(fractalUrl).ok((res) => res.status === 200 || res.status === 404).set(CLIENT_ID_HEADER$1, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER$1, credentials.secret).send()).status === 200 ? superagent.default.put(fractalUrl) : superagent.default.post(fractalUrl)).set(CLIENT_ID_HEADER$1, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER$1, credentials.secret).send({
1178
1178
  description: fractal.description,
1179
1179
  isPrivate: fractal.isPrivate,
1180
1180
  components: fractal.components.map((c) => ({
@@ -1242,7 +1242,8 @@ const DEFAULT_FRACTAL = {
1242
1242
  const isValidFractal = (fractal) => {
1243
1243
  const idErrors = addContextToErrors$4(fractal.id, isValidFractalId(fractal.id));
1244
1244
  const componentsErrors = addContextToErrors$4(fractal.id, !fractal.components || fractal.components.length === 0 ? ["[Components] Components must not be empty"] : fractal.components.reduce((acc, x) => {
1245
- acc.push(...isValidBlueprintComponent(x));
1245
+ if ("provider" in x) acc.push(`[Component: ${x.id.toString()}] Live system components cannot be added to a Fractal blueprint. Use LiveSystem.withComponent() instead.`);
1246
+ else acc.push(...isValidBlueprintComponent(x));
1246
1247
  return acc;
1247
1248
  }, []));
1248
1249
  return [...idErrors, ...componentsErrors];
@@ -1867,7 +1868,7 @@ const deployLiveSystem = async (credentials, liveSystem) => {
1867
1868
  }
1868
1869
  };
1869
1870
  const liveSystemUrl = `${FRACTAL_API_URL}/livesystems/${liveSystem.id.toString()}`;
1870
- ((await superagent.default.get(liveSystemUrl).set(CLIENT_ID_HEADER, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER, credentials.secret).send()).status === 200 ? superagent.default.put(liveSystemUrl) : superagent.default.post(`${FRACTAL_API_URL}/livesystems`)).set(CLIENT_ID_HEADER, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER, credentials.secret).send(body).catch((e) => console.error(e.message, e.response.text));
1871
+ ((await superagent.default.get(liveSystemUrl).ok((res) => res.status === 200 || res.status === 404).set(CLIENT_ID_HEADER, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER, credentials.secret).send()).status === 200 ? superagent.default.put(liveSystemUrl) : superagent.default.post(`${FRACTAL_API_URL}/livesystems`)).set(CLIENT_ID_HEADER, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER, credentials.secret).send(body).catch((e) => console.error(e.message, e.response.text));
1871
1872
  };
1872
1873
  const destroyLiveSystem = async (credentials, id) => {
1873
1874
  await superagent.default.delete(`${FRACTAL_API_URL}/livesystems/${id.toString()}`).set(CLIENT_ID_HEADER, credentials.id.serviceAccountIdValue).set(CLIENT_SECRET_HEADER, credentials.secret);
@@ -2038,6 +2039,2515 @@ let LiveSystem$1;
2038
2039
  _LiveSystem.getBuilder = getLiveSystemBuilder;
2039
2040
  })(LiveSystem$1 || (LiveSystem$1 = {}));
2040
2041
 
2042
+ //#endregion
2043
+ //#region src/fractal/component/network_and_compute/iaas/virtual_network.ts
2044
+ const VIRTUAL_NETWORK_TYPE_NAME = "VirtualNetwork";
2045
+ const CIDR_BLOCK_PARAM$1 = "cidrBlock";
2046
+ function buildId$28(id) {
2047
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2048
+ }
2049
+ function buildVersion$28(major, minor, patch) {
2050
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2051
+ }
2052
+ function buildVirtualNetworkType() {
2053
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(VIRTUAL_NETWORK_TYPE_NAME).build()).build();
2054
+ }
2055
+ function pushParam$25(params, key, value) {
2056
+ params.push(key, value);
2057
+ }
2058
+ function makeVirtualNetworkNode(vpc, subnetNodes, sgs) {
2059
+ const vpcDep = { id: vpc.id };
2060
+ const wiredSubnets = subnetNodes.map((n) => ({
2061
+ ...n.subnet,
2062
+ dependencies: [...n.subnet.dependencies, vpcDep]
2063
+ }));
2064
+ const wiredSgs = sgs.map((sg) => ({
2065
+ ...sg,
2066
+ dependencies: [vpcDep]
2067
+ }));
2068
+ const allVMs = subnetNodes.flatMap((n) => n.virtualMachines);
2069
+ const allEcsSvcs = subnetNodes.flatMap((n) => n.workloads);
2070
+ return {
2071
+ vpc,
2072
+ subnets: wiredSubnets,
2073
+ securityGroups: wiredSgs,
2074
+ virtualMachines: allVMs,
2075
+ workloads: allEcsSvcs,
2076
+ components: [
2077
+ vpc,
2078
+ ...wiredSubnets,
2079
+ ...wiredSgs,
2080
+ ...allVMs,
2081
+ ...allEcsSvcs
2082
+ ],
2083
+ withSubnets: (newSubnets) => makeVirtualNetworkNode(vpc, newSubnets, sgs),
2084
+ withSecurityGroups: (newSgs) => makeVirtualNetworkNode(vpc, subnetNodes, newSgs)
2085
+ };
2086
+ }
2087
+ let VirtualNetwork;
2088
+ (function(_VirtualNetwork) {
2089
+ const getBuilder = _VirtualNetwork.getBuilder = () => {
2090
+ const params = getParametersInstance();
2091
+ const inner = getBlueprintComponentBuilder().withType(buildVirtualNetworkType()).withParameters(params);
2092
+ const subnetBuilders = [];
2093
+ const sgBuilders = [];
2094
+ const builder = {
2095
+ withId: (id) => {
2096
+ inner.withId(buildId$28(id));
2097
+ return builder;
2098
+ },
2099
+ withVersion: (major, minor, patch) => {
2100
+ inner.withVersion(buildVersion$28(major, minor, patch));
2101
+ return builder;
2102
+ },
2103
+ withDisplayName: (displayName) => {
2104
+ inner.withDisplayName(displayName);
2105
+ return builder;
2106
+ },
2107
+ withDescription: (description) => {
2108
+ inner.withDescription(description);
2109
+ return builder;
2110
+ },
2111
+ withCidrBlock: (value) => {
2112
+ pushParam$25(params, CIDR_BLOCK_PARAM$1, value);
2113
+ return builder;
2114
+ },
2115
+ withSubnet: (subnetBuilder) => {
2116
+ subnetBuilders.push(subnetBuilder);
2117
+ return builder;
2118
+ },
2119
+ withSecurityGroup: (sgBuilder) => {
2120
+ sgBuilders.push(sgBuilder);
2121
+ return builder;
2122
+ },
2123
+ withLinks: (links) => {
2124
+ inner.withLinks(links);
2125
+ return builder;
2126
+ },
2127
+ build: () => {
2128
+ const vpc = inner.build();
2129
+ const vpcDep = { id: vpc.id };
2130
+ const subnetResults = subnetBuilders.map((b) => b.build());
2131
+ const subnets = subnetResults.map((r) => ({
2132
+ ...r.subnet,
2133
+ dependencies: [...r.subnet.dependencies, vpcDep]
2134
+ }));
2135
+ const virtualMachines = subnetResults.flatMap((r) => r.virtualMachines);
2136
+ const securityGroups = sgBuilders.map((b) => ({
2137
+ ...b.build(),
2138
+ dependencies: [vpcDep]
2139
+ }));
2140
+ return {
2141
+ vpc,
2142
+ subnets,
2143
+ securityGroups,
2144
+ virtualMachines,
2145
+ components: [
2146
+ vpc,
2147
+ ...subnets,
2148
+ ...securityGroups,
2149
+ ...virtualMachines
2150
+ ]
2151
+ };
2152
+ }
2153
+ };
2154
+ return builder;
2155
+ };
2156
+ _VirtualNetwork.create = (config) => {
2157
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
2158
+ if (config.cidrBlock) b.withCidrBlock(config.cidrBlock);
2159
+ if (config.description) b.withDescription(config.description);
2160
+ return makeVirtualNetworkNode(b.build().vpc, [], []);
2161
+ };
2162
+ })(VirtualNetwork || (VirtualNetwork = {}));
2163
+
2164
+ //#endregion
2165
+ //#region src/fractal/component/network_and_compute/iaas/subnet.ts
2166
+ const SUBNET_TYPE_NAME = "Subnet";
2167
+ const CIDR_BLOCK_PARAM = "cidrBlock";
2168
+ function buildId$27(id) {
2169
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2170
+ }
2171
+ function buildVersion$27(major, minor, patch) {
2172
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2173
+ }
2174
+ function buildSubnetType() {
2175
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(SUBNET_TYPE_NAME).build()).build();
2176
+ }
2177
+ function pushParam$24(params, key, value) {
2178
+ params.push(key, value);
2179
+ }
2180
+ function makeSubnetNode(subnet, vms, workloadNodes) {
2181
+ const subnetDep = { id: subnet.id };
2182
+ const wiredVMs = vms.map((n) => ({
2183
+ ...n.component,
2184
+ dependencies: [...n.component.dependencies, subnetDep]
2185
+ }));
2186
+ const wiredWorkloads = workloadNodes.map((w) => ({
2187
+ ...w.component,
2188
+ dependencies: [...w.component.dependencies, subnetDep]
2189
+ }));
2190
+ return {
2191
+ subnet,
2192
+ virtualMachines: wiredVMs,
2193
+ workloads: wiredWorkloads,
2194
+ components: [
2195
+ subnet,
2196
+ ...wiredVMs,
2197
+ ...wiredWorkloads
2198
+ ],
2199
+ withVirtualMachines: (newVMs) => makeSubnetNode(subnet, newVMs, workloadNodes),
2200
+ withWorkloads: (newWorkloads) => makeSubnetNode(subnet, vms, newWorkloads)
2201
+ };
2202
+ }
2203
+ let Subnet;
2204
+ (function(_Subnet) {
2205
+ const getBuilder = _Subnet.getBuilder = () => {
2206
+ const params = getParametersInstance();
2207
+ const inner = getBlueprintComponentBuilder().withType(buildSubnetType()).withParameters(params);
2208
+ const vmBuilders = [];
2209
+ const builder = {
2210
+ withId: (id) => {
2211
+ inner.withId(buildId$27(id));
2212
+ return builder;
2213
+ },
2214
+ withVersion: (major, minor, patch) => {
2215
+ inner.withVersion(buildVersion$27(major, minor, patch));
2216
+ return builder;
2217
+ },
2218
+ withDisplayName: (displayName) => {
2219
+ inner.withDisplayName(displayName);
2220
+ return builder;
2221
+ },
2222
+ withDescription: (description) => {
2223
+ inner.withDescription(description);
2224
+ return builder;
2225
+ },
2226
+ withCidrBlock: (value) => {
2227
+ pushParam$24(params, CIDR_BLOCK_PARAM, value);
2228
+ return builder;
2229
+ },
2230
+ withVirtualMachine: (vmBuilder) => {
2231
+ vmBuilders.push(vmBuilder);
2232
+ return builder;
2233
+ },
2234
+ withLinks: (links) => {
2235
+ inner.withLinks(links);
2236
+ return builder;
2237
+ },
2238
+ build: () => {
2239
+ const subnet = inner.build();
2240
+ const subnetDep = { id: subnet.id };
2241
+ const virtualMachines = vmBuilders.map((b) => ({
2242
+ ...b.build(),
2243
+ dependencies: [subnetDep]
2244
+ }));
2245
+ return {
2246
+ subnet,
2247
+ virtualMachines,
2248
+ components: [subnet, ...virtualMachines]
2249
+ };
2250
+ }
2251
+ };
2252
+ return builder;
2253
+ };
2254
+ _Subnet.create = (config) => {
2255
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
2256
+ if (config.cidrBlock) b.withCidrBlock(config.cidrBlock);
2257
+ if (config.description) b.withDescription(config.description);
2258
+ return makeSubnetNode(b.build().subnet, [], []);
2259
+ };
2260
+ })(Subnet || (Subnet = {}));
2261
+
2262
+ //#endregion
2263
+ //#region src/fractal/component/network_and_compute/iaas/security_group.ts
2264
+ const SECURITY_GROUP_TYPE_NAME = "SecurityGroup";
2265
+ const DESCRIPTION_PARAM = "description";
2266
+ const INGRESS_RULES_PARAM = "ingressRules";
2267
+ function buildId$26(id) {
2268
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2269
+ }
2270
+ function buildVersion$26(major, minor, patch) {
2271
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2272
+ }
2273
+ function buildSecurityGroupType() {
2274
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(SECURITY_GROUP_TYPE_NAME).build()).build();
2275
+ }
2276
+ function pushParam$23(params, key, value) {
2277
+ params.push(key, value);
2278
+ }
2279
+ let SecurityGroup;
2280
+ (function(_SecurityGroup) {
2281
+ const getBuilder = _SecurityGroup.getBuilder = () => {
2282
+ const params = getParametersInstance();
2283
+ const inner = getBlueprintComponentBuilder().withType(buildSecurityGroupType()).withParameters(params);
2284
+ const builder = {
2285
+ withId: (id) => {
2286
+ inner.withId(buildId$26(id));
2287
+ return builder;
2288
+ },
2289
+ withVersion: (major, minor, patch) => {
2290
+ inner.withVersion(buildVersion$26(major, minor, patch));
2291
+ return builder;
2292
+ },
2293
+ withDisplayName: (displayName) => {
2294
+ inner.withDisplayName(displayName);
2295
+ return builder;
2296
+ },
2297
+ withDescription: (description) => {
2298
+ inner.withDescription(description);
2299
+ pushParam$23(params, DESCRIPTION_PARAM, description);
2300
+ return builder;
2301
+ },
2302
+ withIngressRules: (rules) => {
2303
+ pushParam$23(params, INGRESS_RULES_PARAM, rules);
2304
+ return builder;
2305
+ },
2306
+ withLinks: (links) => {
2307
+ inner.withLinks(links);
2308
+ return builder;
2309
+ },
2310
+ build: () => inner.build()
2311
+ };
2312
+ return builder;
2313
+ };
2314
+ _SecurityGroup.create = (config) => {
2315
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withDescription(config.description);
2316
+ if (config.ingressRules && config.ingressRules.length > 0) b.withIngressRules(config.ingressRules);
2317
+ return b.build();
2318
+ };
2319
+ })(SecurityGroup || (SecurityGroup = {}));
2320
+
2321
+ //#endregion
2322
+ //#region src/fractal/component/network_and_compute/iaas/vm.ts
2323
+ const VIRTUAL_MACHINE_TYPE_NAME = "VirtualMachine";
2324
+ function buildId$25(id) {
2325
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2326
+ }
2327
+ function buildVersion$25(major, minor, patch) {
2328
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2329
+ }
2330
+ function buildVirtualMachineType() {
2331
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(VIRTUAL_MACHINE_TYPE_NAME).build()).build();
2332
+ }
2333
+ function buildLinkParams$1(link) {
2334
+ const params = getParametersInstance();
2335
+ params.push("fromPort", link.fromPort);
2336
+ if (link.toPort !== void 0) params.push("toPort", link.toPort);
2337
+ if (link.protocol) params.push("protocol", link.protocol);
2338
+ return params;
2339
+ }
2340
+ function makeVirtualMachineNode(component) {
2341
+ return {
2342
+ component,
2343
+ components: [component],
2344
+ withLinks: (links) => {
2345
+ const componentLinks = links.map((l) => getLinkBuilder().withId(l.target.component.id).withType(buildVirtualMachineType()).withParameters(buildLinkParams$1(l)).build());
2346
+ return makeVirtualMachineNode({
2347
+ ...component,
2348
+ links: [...component.links, ...componentLinks]
2349
+ });
2350
+ }
2351
+ };
2352
+ }
2353
+ let VirtualMachine;
2354
+ (function(_VirtualMachine) {
2355
+ const getBuilder = _VirtualMachine.getBuilder = () => {
2356
+ const inner = getBlueprintComponentBuilder().withType(buildVirtualMachineType()).withParameters(getParametersInstance());
2357
+ const builder = {
2358
+ withId: (id) => {
2359
+ inner.withId(buildId$25(id));
2360
+ return builder;
2361
+ },
2362
+ withVersion: (major, minor, patch) => {
2363
+ inner.withVersion(buildVersion$25(major, minor, patch));
2364
+ return builder;
2365
+ },
2366
+ withDisplayName: (displayName) => {
2367
+ inner.withDisplayName(displayName);
2368
+ return builder;
2369
+ },
2370
+ withDescription: (description) => {
2371
+ inner.withDescription(description);
2372
+ return builder;
2373
+ },
2374
+ withLinks: (links) => {
2375
+ inner.withLinks(links);
2376
+ return builder;
2377
+ },
2378
+ build: () => inner.build()
2379
+ };
2380
+ return builder;
2381
+ };
2382
+ _VirtualMachine.create = (config) => {
2383
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
2384
+ if (config.description) b.withDescription(config.description);
2385
+ return makeVirtualMachineNode(b.build());
2386
+ };
2387
+ })(VirtualMachine || (VirtualMachine = {}));
2388
+
2389
+ //#endregion
2390
+ //#region src/live_system/component/network_and_compute/iaas/vpc.ts
2391
+ const AWS_VPC_TYPE_NAME = "AwsVpc";
2392
+ const INSTANCE_TENANCY_PARAM = "instanceTenancy";
2393
+ const ENABLE_DNS_SUPPORT_PARAM = "enableDnsSupport";
2394
+ const ENABLE_DNS_HOSTNAMES_PARAM = "enableDnsHostnames";
2395
+ function buildId$24(id) {
2396
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2397
+ }
2398
+ function buildVersion$24(major, minor, patch) {
2399
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2400
+ }
2401
+ function buildAwsVpcType() {
2402
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(AWS_VPC_TYPE_NAME).build()).build();
2403
+ }
2404
+ function pushParam$22(params, key, value) {
2405
+ params.push(key, value);
2406
+ }
2407
+ let AwsVpc;
2408
+ (function(_AwsVpc) {
2409
+ const getBuilder = _AwsVpc.getBuilder = () => {
2410
+ const params = getParametersInstance();
2411
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsVpcType()).withParameters(params).withProvider("AWS");
2412
+ const builder = {
2413
+ withId: (id) => {
2414
+ inner.withId(buildId$24(id));
2415
+ return builder;
2416
+ },
2417
+ withVersion: (major, minor, patch) => {
2418
+ inner.withVersion(buildVersion$24(major, minor, patch));
2419
+ return builder;
2420
+ },
2421
+ withDisplayName: (displayName) => {
2422
+ inner.withDisplayName(displayName);
2423
+ return builder;
2424
+ },
2425
+ withDescription: (description) => {
2426
+ inner.withDescription(description);
2427
+ return builder;
2428
+ },
2429
+ withCidrBlock: (value) => {
2430
+ pushParam$22(params, CIDR_BLOCK_PARAM$1, value);
2431
+ return builder;
2432
+ },
2433
+ withInstanceTenancy: (value) => {
2434
+ pushParam$22(params, INSTANCE_TENANCY_PARAM, value);
2435
+ return builder;
2436
+ },
2437
+ withEnableDnsSupport: (value) => {
2438
+ pushParam$22(params, ENABLE_DNS_SUPPORT_PARAM, value);
2439
+ return builder;
2440
+ },
2441
+ withEnableDnsHostnames: (value) => {
2442
+ pushParam$22(params, ENABLE_DNS_HOSTNAMES_PARAM, value);
2443
+ return builder;
2444
+ },
2445
+ build: () => inner.build()
2446
+ };
2447
+ return builder;
2448
+ };
2449
+ _AwsVpc.satisfy = (blueprint) => {
2450
+ const params = getParametersInstance();
2451
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsVpcType()).withParameters(params).withProvider("AWS").withId(buildId$24(blueprint.id.toString())).withVersion(buildVersion$24(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
2452
+ if (blueprint.description) inner.withDescription(blueprint.description);
2453
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM$1);
2454
+ if (cidrBlock !== null) pushParam$22(params, CIDR_BLOCK_PARAM$1, String(cidrBlock));
2455
+ const satisfiedBuilder = {
2456
+ withInstanceTenancy: (value) => {
2457
+ pushParam$22(params, INSTANCE_TENANCY_PARAM, value);
2458
+ return satisfiedBuilder;
2459
+ },
2460
+ withEnableDnsSupport: (value) => {
2461
+ pushParam$22(params, ENABLE_DNS_SUPPORT_PARAM, value);
2462
+ return satisfiedBuilder;
2463
+ },
2464
+ withEnableDnsHostnames: (value) => {
2465
+ pushParam$22(params, ENABLE_DNS_HOSTNAMES_PARAM, value);
2466
+ return satisfiedBuilder;
2467
+ },
2468
+ build: () => inner.build()
2469
+ };
2470
+ return satisfiedBuilder;
2471
+ };
2472
+ _AwsVpc.create = (config) => {
2473
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock);
2474
+ if (config.description) b.withDescription(config.description);
2475
+ if (config.instanceTenancy) b.withInstanceTenancy(config.instanceTenancy);
2476
+ if (config.enableDnsSupport !== void 0) b.withEnableDnsSupport(config.enableDnsSupport);
2477
+ if (config.enableDnsHostnames !== void 0) b.withEnableDnsHostnames(config.enableDnsHostnames);
2478
+ return b.build();
2479
+ };
2480
+ })(AwsVpc || (AwsVpc = {}));
2481
+
2482
+ //#endregion
2483
+ //#region src/live_system/component/network_and_compute/iaas/subnet.ts
2484
+ const AWS_SUBNET_TYPE_NAME = "AwsSubnet";
2485
+ const AVAILABILITY_ZONE_PARAM = "availabilityZone";
2486
+ function buildId$23(id) {
2487
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2488
+ }
2489
+ function buildVersion$23(major, minor, patch) {
2490
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2491
+ }
2492
+ function buildAwsSubnetType() {
2493
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(AWS_SUBNET_TYPE_NAME).build()).build();
2494
+ }
2495
+ function pushParam$21(params, key, value) {
2496
+ params.push(key, value);
2497
+ }
2498
+ let AwsSubnet;
2499
+ (function(_AwsSubnet) {
2500
+ const getBuilder = _AwsSubnet.getBuilder = () => {
2501
+ const params = getParametersInstance();
2502
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsSubnetType()).withParameters(params).withProvider("AWS");
2503
+ const builder = {
2504
+ withId: (id) => {
2505
+ inner.withId(buildId$23(id));
2506
+ return builder;
2507
+ },
2508
+ withVersion: (major, minor, patch) => {
2509
+ inner.withVersion(buildVersion$23(major, minor, patch));
2510
+ return builder;
2511
+ },
2512
+ withDisplayName: (displayName) => {
2513
+ inner.withDisplayName(displayName);
2514
+ return builder;
2515
+ },
2516
+ withDescription: (description) => {
2517
+ inner.withDescription(description);
2518
+ return builder;
2519
+ },
2520
+ withCidrBlock: (value) => {
2521
+ pushParam$21(params, CIDR_BLOCK_PARAM, value);
2522
+ return builder;
2523
+ },
2524
+ withAvailabilityZone: (value) => {
2525
+ pushParam$21(params, AVAILABILITY_ZONE_PARAM, value);
2526
+ return builder;
2527
+ },
2528
+ build: () => inner.build()
2529
+ };
2530
+ return builder;
2531
+ };
2532
+ _AwsSubnet.satisfy = (blueprint) => {
2533
+ const params = getParametersInstance();
2534
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsSubnetType()).withParameters(params).withProvider("AWS").withId(buildId$23(blueprint.id.toString())).withVersion(buildVersion$23(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
2535
+ if (blueprint.description) inner.withDescription(blueprint.description);
2536
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM);
2537
+ if (cidrBlock !== null) pushParam$21(params, CIDR_BLOCK_PARAM, String(cidrBlock));
2538
+ const satisfiedBuilder = {
2539
+ withAvailabilityZone: (value) => {
2540
+ pushParam$21(params, AVAILABILITY_ZONE_PARAM, value);
2541
+ return satisfiedBuilder;
2542
+ },
2543
+ build: () => inner.build()
2544
+ };
2545
+ return satisfiedBuilder;
2546
+ };
2547
+ _AwsSubnet.create = (config) => {
2548
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock).withAvailabilityZone(config.availabilityZone);
2549
+ if (config.description) b.withDescription(config.description);
2550
+ return b.build();
2551
+ };
2552
+ })(AwsSubnet || (AwsSubnet = {}));
2553
+
2554
+ //#endregion
2555
+ //#region src/live_system/component/network_and_compute/iaas/security_group.ts
2556
+ const AWS_SG_TYPE_NAME = "AwsSecurityGroup";
2557
+ function buildId$22(id) {
2558
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2559
+ }
2560
+ function buildVersion$22(major, minor, patch) {
2561
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2562
+ }
2563
+ function buildAwsSgType() {
2564
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(AWS_SG_TYPE_NAME).build()).build();
2565
+ }
2566
+ function pushParam$20(params, key, value) {
2567
+ params.push(key, value);
2568
+ }
2569
+ let AwsSecurityGroup;
2570
+ (function(_AwsSecurityGroup) {
2571
+ const getBuilder = _AwsSecurityGroup.getBuilder = () => {
2572
+ const params = getParametersInstance();
2573
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsSgType()).withParameters(params).withProvider("AWS");
2574
+ const builder = {
2575
+ withId: (id) => {
2576
+ inner.withId(buildId$22(id));
2577
+ return builder;
2578
+ },
2579
+ withVersion: (major, minor, patch) => {
2580
+ inner.withVersion(buildVersion$22(major, minor, patch));
2581
+ return builder;
2582
+ },
2583
+ withDisplayName: (displayName) => {
2584
+ inner.withDisplayName(displayName);
2585
+ return builder;
2586
+ },
2587
+ withDescription: (description) => {
2588
+ inner.withDescription(description);
2589
+ pushParam$20(params, DESCRIPTION_PARAM, description);
2590
+ return builder;
2591
+ },
2592
+ withIngressRules: (rules) => {
2593
+ pushParam$20(params, INGRESS_RULES_PARAM, rules);
2594
+ return builder;
2595
+ },
2596
+ build: () => inner.build()
2597
+ };
2598
+ return builder;
2599
+ };
2600
+ _AwsSecurityGroup.satisfy = (blueprint) => {
2601
+ const params = getParametersInstance();
2602
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsSgType()).withParameters(params).withProvider("AWS").withId(buildId$22(blueprint.id.toString())).withVersion(buildVersion$22(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
2603
+ const description = blueprint.parameters.getOptionalFieldByName(DESCRIPTION_PARAM);
2604
+ if (description !== null) {
2605
+ inner.withDescription(String(description));
2606
+ pushParam$20(params, DESCRIPTION_PARAM, String(description));
2607
+ } else if (blueprint.description) inner.withDescription(blueprint.description);
2608
+ const ingressRules = blueprint.parameters.getOptionalFieldByName(INGRESS_RULES_PARAM);
2609
+ if (ingressRules !== null) pushParam$20(params, INGRESS_RULES_PARAM, ingressRules);
2610
+ return { build: () => inner.build() };
2611
+ };
2612
+ _AwsSecurityGroup.create = (config) => {
2613
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withDescription(config.description);
2614
+ if (config.ingressRules && config.ingressRules.length > 0) b.withIngressRules(config.ingressRules);
2615
+ return b.build();
2616
+ };
2617
+ })(AwsSecurityGroup || (AwsSecurityGroup = {}));
2618
+
2619
+ //#endregion
2620
+ //#region src/live_system/component/network_and_compute/iaas/ec2_instance.ts
2621
+ const EC2_TYPE_NAME = "EC2";
2622
+ const AMI_ID_PARAM = "amiId";
2623
+ const INSTANCE_TYPE_PARAM = "instanceType";
2624
+ const KEY_NAME_PARAM = "keyName";
2625
+ const USER_DATA_PARAM$1 = "userData";
2626
+ const IAM_INSTANCE_PROFILE_PARAM = "iamInstanceProfile";
2627
+ const ASSOCIATE_PUBLIC_IP_PARAM = "associatePublicIp";
2628
+ function buildId$21(id) {
2629
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2630
+ }
2631
+ function buildVersion$21(major, minor, patch) {
2632
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2633
+ }
2634
+ function buildEc2Type() {
2635
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(EC2_TYPE_NAME).build()).build();
2636
+ }
2637
+ function pushParam$19(params, key, value) {
2638
+ params.push(key, value);
2639
+ }
2640
+ let Ec2Instance;
2641
+ (function(_Ec2Instance) {
2642
+ const getBuilder = _Ec2Instance.getBuilder = () => {
2643
+ const params = getParametersInstance();
2644
+ const inner = getLiveSystemComponentBuilder().withType(buildEc2Type()).withParameters(params).withProvider("AWS");
2645
+ const builder = {
2646
+ withId: (id) => {
2647
+ inner.withId(buildId$21(id));
2648
+ return builder;
2649
+ },
2650
+ withVersion: (major, minor, patch) => {
2651
+ inner.withVersion(buildVersion$21(major, minor, patch));
2652
+ return builder;
2653
+ },
2654
+ withDisplayName: (displayName) => {
2655
+ inner.withDisplayName(displayName);
2656
+ return builder;
2657
+ },
2658
+ withDescription: (description) => {
2659
+ inner.withDescription(description);
2660
+ return builder;
2661
+ },
2662
+ withAmiId: (value) => {
2663
+ pushParam$19(params, AMI_ID_PARAM, value);
2664
+ return builder;
2665
+ },
2666
+ withInstanceType: (value) => {
2667
+ pushParam$19(params, INSTANCE_TYPE_PARAM, value);
2668
+ return builder;
2669
+ },
2670
+ withKeyName: (value) => {
2671
+ pushParam$19(params, KEY_NAME_PARAM, value);
2672
+ return builder;
2673
+ },
2674
+ withUserData: (value) => {
2675
+ pushParam$19(params, USER_DATA_PARAM$1, value);
2676
+ return builder;
2677
+ },
2678
+ withIamInstanceProfile: (value) => {
2679
+ pushParam$19(params, IAM_INSTANCE_PROFILE_PARAM, value);
2680
+ return builder;
2681
+ },
2682
+ withAssociatePublicIp: (value) => {
2683
+ pushParam$19(params, ASSOCIATE_PUBLIC_IP_PARAM, value);
2684
+ return builder;
2685
+ },
2686
+ build: () => inner.build()
2687
+ };
2688
+ return builder;
2689
+ };
2690
+ _Ec2Instance.satisfy = (blueprint) => {
2691
+ const params = getParametersInstance();
2692
+ const inner = getLiveSystemComponentBuilder().withType(buildEc2Type()).withParameters(params).withProvider("AWS").withId(buildId$21(blueprint.id.toString())).withVersion(buildVersion$21(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
2693
+ if (blueprint.description) inner.withDescription(blueprint.description);
2694
+ const satisfiedBuilder = {
2695
+ withAmiId: (value) => {
2696
+ pushParam$19(params, AMI_ID_PARAM, value);
2697
+ return satisfiedBuilder;
2698
+ },
2699
+ withInstanceType: (value) => {
2700
+ pushParam$19(params, INSTANCE_TYPE_PARAM, value);
2701
+ return satisfiedBuilder;
2702
+ },
2703
+ withKeyName: (value) => {
2704
+ pushParam$19(params, KEY_NAME_PARAM, value);
2705
+ return satisfiedBuilder;
2706
+ },
2707
+ withUserData: (value) => {
2708
+ pushParam$19(params, USER_DATA_PARAM$1, value);
2709
+ return satisfiedBuilder;
2710
+ },
2711
+ withIamInstanceProfile: (value) => {
2712
+ pushParam$19(params, IAM_INSTANCE_PROFILE_PARAM, value);
2713
+ return satisfiedBuilder;
2714
+ },
2715
+ withAssociatePublicIp: (value) => {
2716
+ pushParam$19(params, ASSOCIATE_PUBLIC_IP_PARAM, value);
2717
+ return satisfiedBuilder;
2718
+ },
2719
+ build: () => inner.build()
2720
+ };
2721
+ return satisfiedBuilder;
2722
+ };
2723
+ _Ec2Instance.create = (config) => {
2724
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withAmiId(config.amiId).withInstanceType(config.instanceType);
2725
+ if (config.description) b.withDescription(config.description);
2726
+ if (config.keyName) b.withKeyName(config.keyName);
2727
+ if (config.userData) b.withUserData(config.userData);
2728
+ if (config.iamInstanceProfile) b.withIamInstanceProfile(config.iamInstanceProfile);
2729
+ if (config.associatePublicIp !== void 0) b.withAssociatePublicIp(config.associatePublicIp);
2730
+ return b.build();
2731
+ };
2732
+ })(Ec2Instance || (Ec2Instance = {}));
2733
+
2734
+ //#endregion
2735
+ //#region src/live_system/component/network_and_compute/iaas/azure_vnet.ts
2736
+ const AZURE_VNET_TYPE_NAME = "AzureVnet";
2737
+ const LOCATION_PARAM$3 = "location";
2738
+ const RESOURCE_GROUP_PARAM$3 = "resourceGroup";
2739
+ function buildId$20(id) {
2740
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2741
+ }
2742
+ function buildVersion$20(major, minor, patch) {
2743
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2744
+ }
2745
+ function buildAzureVnetType() {
2746
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(AZURE_VNET_TYPE_NAME).build()).build();
2747
+ }
2748
+ function pushParam$18(params, key, value) {
2749
+ params.push(key, value);
2750
+ }
2751
+ let AzureVnet;
2752
+ (function(_AzureVnet) {
2753
+ const getBuilder = _AzureVnet.getBuilder = () => {
2754
+ const params = getParametersInstance();
2755
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureVnetType()).withParameters(params).withProvider("Azure");
2756
+ const builder = {
2757
+ withId: (id) => {
2758
+ inner.withId(buildId$20(id));
2759
+ return builder;
2760
+ },
2761
+ withVersion: (major, minor, patch) => {
2762
+ inner.withVersion(buildVersion$20(major, minor, patch));
2763
+ return builder;
2764
+ },
2765
+ withDisplayName: (displayName) => {
2766
+ inner.withDisplayName(displayName);
2767
+ return builder;
2768
+ },
2769
+ withDescription: (description) => {
2770
+ inner.withDescription(description);
2771
+ return builder;
2772
+ },
2773
+ withCidrBlock: (value) => {
2774
+ pushParam$18(params, CIDR_BLOCK_PARAM$1, value);
2775
+ return builder;
2776
+ },
2777
+ withLocation: (value) => {
2778
+ pushParam$18(params, LOCATION_PARAM$3, value);
2779
+ return builder;
2780
+ },
2781
+ withResourceGroup: (value) => {
2782
+ pushParam$18(params, RESOURCE_GROUP_PARAM$3, value);
2783
+ return builder;
2784
+ },
2785
+ build: () => inner.build()
2786
+ };
2787
+ return builder;
2788
+ };
2789
+ _AzureVnet.satisfy = (blueprint) => {
2790
+ const params = getParametersInstance();
2791
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureVnetType()).withParameters(params).withProvider("Azure").withId(buildId$20(blueprint.id.toString())).withVersion(buildVersion$20(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
2792
+ if (blueprint.description) inner.withDescription(blueprint.description);
2793
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM$1);
2794
+ if (cidrBlock !== null) pushParam$18(params, CIDR_BLOCK_PARAM$1, String(cidrBlock));
2795
+ const satisfiedBuilder = {
2796
+ withLocation: (value) => {
2797
+ pushParam$18(params, LOCATION_PARAM$3, value);
2798
+ return satisfiedBuilder;
2799
+ },
2800
+ withResourceGroup: (value) => {
2801
+ pushParam$18(params, RESOURCE_GROUP_PARAM$3, value);
2802
+ return satisfiedBuilder;
2803
+ },
2804
+ build: () => inner.build()
2805
+ };
2806
+ return satisfiedBuilder;
2807
+ };
2808
+ _AzureVnet.create = (config) => {
2809
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock).withLocation(config.location).withResourceGroup(config.resourceGroup);
2810
+ if (config.description) b.withDescription(config.description);
2811
+ return b.build();
2812
+ };
2813
+ })(AzureVnet || (AzureVnet = {}));
2814
+
2815
+ //#endregion
2816
+ //#region src/live_system/component/network_and_compute/iaas/azure_subnet.ts
2817
+ const AZURE_SUBNET_TYPE_NAME = "AzureSubnet";
2818
+ const RESOURCE_GROUP_PARAM$2 = "resourceGroup";
2819
+ function buildId$19(id) {
2820
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2821
+ }
2822
+ function buildVersion$19(major, minor, patch) {
2823
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2824
+ }
2825
+ function buildAzureSubnetType() {
2826
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(AZURE_SUBNET_TYPE_NAME).build()).build();
2827
+ }
2828
+ function pushParam$17(params, key, value) {
2829
+ params.push(key, value);
2830
+ }
2831
+ let AzureSubnet;
2832
+ (function(_AzureSubnet) {
2833
+ const getBuilder = _AzureSubnet.getBuilder = () => {
2834
+ const params = getParametersInstance();
2835
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureSubnetType()).withParameters(params).withProvider("Azure");
2836
+ const builder = {
2837
+ withId: (id) => {
2838
+ inner.withId(buildId$19(id));
2839
+ return builder;
2840
+ },
2841
+ withVersion: (major, minor, patch) => {
2842
+ inner.withVersion(buildVersion$19(major, minor, patch));
2843
+ return builder;
2844
+ },
2845
+ withDisplayName: (displayName) => {
2846
+ inner.withDisplayName(displayName);
2847
+ return builder;
2848
+ },
2849
+ withDescription: (description) => {
2850
+ inner.withDescription(description);
2851
+ return builder;
2852
+ },
2853
+ withCidrBlock: (value) => {
2854
+ pushParam$17(params, CIDR_BLOCK_PARAM, value);
2855
+ return builder;
2856
+ },
2857
+ withResourceGroup: (value) => {
2858
+ pushParam$17(params, RESOURCE_GROUP_PARAM$2, value);
2859
+ return builder;
2860
+ },
2861
+ build: () => inner.build()
2862
+ };
2863
+ return builder;
2864
+ };
2865
+ _AzureSubnet.satisfy = (blueprint) => {
2866
+ const params = getParametersInstance();
2867
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureSubnetType()).withParameters(params).withProvider("Azure").withId(buildId$19(blueprint.id.toString())).withVersion(buildVersion$19(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
2868
+ if (blueprint.description) inner.withDescription(blueprint.description);
2869
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM);
2870
+ if (cidrBlock !== null) pushParam$17(params, CIDR_BLOCK_PARAM, String(cidrBlock));
2871
+ const satisfiedBuilder = {
2872
+ withResourceGroup: (value) => {
2873
+ pushParam$17(params, RESOURCE_GROUP_PARAM$2, value);
2874
+ return satisfiedBuilder;
2875
+ },
2876
+ build: () => inner.build()
2877
+ };
2878
+ return satisfiedBuilder;
2879
+ };
2880
+ _AzureSubnet.create = (config) => {
2881
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock).withResourceGroup(config.resourceGroup);
2882
+ if (config.description) b.withDescription(config.description);
2883
+ return b.build();
2884
+ };
2885
+ })(AzureSubnet || (AzureSubnet = {}));
2886
+
2887
+ //#endregion
2888
+ //#region src/live_system/component/network_and_compute/iaas/azure_nsg.ts
2889
+ const AZURE_NSG_TYPE_NAME = "AzureNsg";
2890
+ const LOCATION_PARAM$2 = "location";
2891
+ const RESOURCE_GROUP_PARAM$1 = "resourceGroup";
2892
+ function buildId$18(id) {
2893
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2894
+ }
2895
+ function buildVersion$18(major, minor, patch) {
2896
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2897
+ }
2898
+ function buildAzureNsgType() {
2899
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(AZURE_NSG_TYPE_NAME).build()).build();
2900
+ }
2901
+ function pushParam$16(params, key, value) {
2902
+ params.push(key, value);
2903
+ }
2904
+ let AzureNsg;
2905
+ (function(_AzureNsg) {
2906
+ const getBuilder = _AzureNsg.getBuilder = () => {
2907
+ const params = getParametersInstance();
2908
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureNsgType()).withParameters(params).withProvider("Azure");
2909
+ const builder = {
2910
+ withId: (id) => {
2911
+ inner.withId(buildId$18(id));
2912
+ return builder;
2913
+ },
2914
+ withVersion: (major, minor, patch) => {
2915
+ inner.withVersion(buildVersion$18(major, minor, patch));
2916
+ return builder;
2917
+ },
2918
+ withDisplayName: (displayName) => {
2919
+ inner.withDisplayName(displayName);
2920
+ return builder;
2921
+ },
2922
+ withDescription: (description) => {
2923
+ inner.withDescription(description);
2924
+ pushParam$16(params, DESCRIPTION_PARAM, description);
2925
+ return builder;
2926
+ },
2927
+ withIngressRules: (rules) => {
2928
+ pushParam$16(params, INGRESS_RULES_PARAM, rules);
2929
+ return builder;
2930
+ },
2931
+ withLocation: (value) => {
2932
+ pushParam$16(params, LOCATION_PARAM$2, value);
2933
+ return builder;
2934
+ },
2935
+ withResourceGroup: (value) => {
2936
+ pushParam$16(params, RESOURCE_GROUP_PARAM$1, value);
2937
+ return builder;
2938
+ },
2939
+ build: () => inner.build()
2940
+ };
2941
+ return builder;
2942
+ };
2943
+ _AzureNsg.satisfy = (blueprint) => {
2944
+ const params = getParametersInstance();
2945
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureNsgType()).withParameters(params).withProvider("Azure").withId(buildId$18(blueprint.id.toString())).withVersion(buildVersion$18(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
2946
+ const description = blueprint.parameters.getOptionalFieldByName(DESCRIPTION_PARAM);
2947
+ if (description !== null) {
2948
+ inner.withDescription(String(description));
2949
+ pushParam$16(params, DESCRIPTION_PARAM, String(description));
2950
+ } else if (blueprint.description) inner.withDescription(blueprint.description);
2951
+ const ingressRules = blueprint.parameters.getOptionalFieldByName(INGRESS_RULES_PARAM);
2952
+ if (ingressRules !== null) pushParam$16(params, INGRESS_RULES_PARAM, ingressRules);
2953
+ const satisfiedBuilder = {
2954
+ withLocation: (value) => {
2955
+ pushParam$16(params, LOCATION_PARAM$2, value);
2956
+ return satisfiedBuilder;
2957
+ },
2958
+ withResourceGroup: (value) => {
2959
+ pushParam$16(params, RESOURCE_GROUP_PARAM$1, value);
2960
+ return satisfiedBuilder;
2961
+ },
2962
+ build: () => inner.build()
2963
+ };
2964
+ return satisfiedBuilder;
2965
+ };
2966
+ _AzureNsg.create = (config) => {
2967
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withLocation(config.location).withResourceGroup(config.resourceGroup);
2968
+ if (config.description) b.withDescription(config.description);
2969
+ if (config.ingressRules && config.ingressRules.length > 0) b.withIngressRules(config.ingressRules);
2970
+ return b.build();
2971
+ };
2972
+ })(AzureNsg || (AzureNsg = {}));
2973
+
2974
+ //#endregion
2975
+ //#region src/live_system/component/network_and_compute/iaas/azure_vm.ts
2976
+ const AZURE_VM_TYPE_NAME = "AzureVm";
2977
+ const VM_SIZE_PARAM = "vmSize";
2978
+ const LOCATION_PARAM$1 = "location";
2979
+ const RESOURCE_GROUP_PARAM = "resourceGroup";
2980
+ const ADMIN_USERNAME_PARAM = "adminUsername";
2981
+ const IMAGE_PUBLISHER_PARAM = "imagePublisher";
2982
+ const IMAGE_OFFER_PARAM = "imageOffer";
2983
+ const IMAGE_SKU_PARAM = "imageSku";
2984
+ const SSH_PUBLIC_KEY_PARAM$1 = "sshPublicKey";
2985
+ const OS_DISK_SIZE_GB_PARAM = "osDiskSizeGb";
2986
+ function buildId$17(id) {
2987
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
2988
+ }
2989
+ function buildVersion$17(major, minor, patch) {
2990
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
2991
+ }
2992
+ function buildAzureVmType() {
2993
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(AZURE_VM_TYPE_NAME).build()).build();
2994
+ }
2995
+ function pushParam$15(params, key, value) {
2996
+ params.push(key, value);
2997
+ }
2998
+ let AzureVm;
2999
+ (function(_AzureVm) {
3000
+ const getBuilder = _AzureVm.getBuilder = () => {
3001
+ const params = getParametersInstance();
3002
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureVmType()).withParameters(params).withProvider("Azure");
3003
+ const builder = {
3004
+ withId: (id) => {
3005
+ inner.withId(buildId$17(id));
3006
+ return builder;
3007
+ },
3008
+ withVersion: (major, minor, patch) => {
3009
+ inner.withVersion(buildVersion$17(major, minor, patch));
3010
+ return builder;
3011
+ },
3012
+ withDisplayName: (displayName) => {
3013
+ inner.withDisplayName(displayName);
3014
+ return builder;
3015
+ },
3016
+ withDescription: (description) => {
3017
+ inner.withDescription(description);
3018
+ return builder;
3019
+ },
3020
+ withVmSize: (value) => {
3021
+ pushParam$15(params, VM_SIZE_PARAM, value);
3022
+ return builder;
3023
+ },
3024
+ withLocation: (value) => {
3025
+ pushParam$15(params, LOCATION_PARAM$1, value);
3026
+ return builder;
3027
+ },
3028
+ withResourceGroup: (value) => {
3029
+ pushParam$15(params, RESOURCE_GROUP_PARAM, value);
3030
+ return builder;
3031
+ },
3032
+ withAdminUsername: (value) => {
3033
+ pushParam$15(params, ADMIN_USERNAME_PARAM, value);
3034
+ return builder;
3035
+ },
3036
+ withImagePublisher: (value) => {
3037
+ pushParam$15(params, IMAGE_PUBLISHER_PARAM, value);
3038
+ return builder;
3039
+ },
3040
+ withImageOffer: (value) => {
3041
+ pushParam$15(params, IMAGE_OFFER_PARAM, value);
3042
+ return builder;
3043
+ },
3044
+ withImageSku: (value) => {
3045
+ pushParam$15(params, IMAGE_SKU_PARAM, value);
3046
+ return builder;
3047
+ },
3048
+ withSshPublicKey: (value) => {
3049
+ pushParam$15(params, SSH_PUBLIC_KEY_PARAM$1, value);
3050
+ return builder;
3051
+ },
3052
+ withOsDiskSizeGb: (value) => {
3053
+ pushParam$15(params, OS_DISK_SIZE_GB_PARAM, value);
3054
+ return builder;
3055
+ },
3056
+ build: () => inner.build()
3057
+ };
3058
+ return builder;
3059
+ };
3060
+ _AzureVm.satisfy = (blueprint) => {
3061
+ const params = getParametersInstance();
3062
+ const inner = getLiveSystemComponentBuilder().withType(buildAzureVmType()).withParameters(params).withProvider("Azure").withId(buildId$17(blueprint.id.toString())).withVersion(buildVersion$17(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3063
+ if (blueprint.description) inner.withDescription(blueprint.description);
3064
+ const satisfiedBuilder = {
3065
+ withVmSize: (value) => {
3066
+ pushParam$15(params, VM_SIZE_PARAM, value);
3067
+ return satisfiedBuilder;
3068
+ },
3069
+ withLocation: (value) => {
3070
+ pushParam$15(params, LOCATION_PARAM$1, value);
3071
+ return satisfiedBuilder;
3072
+ },
3073
+ withResourceGroup: (value) => {
3074
+ pushParam$15(params, RESOURCE_GROUP_PARAM, value);
3075
+ return satisfiedBuilder;
3076
+ },
3077
+ withAdminUsername: (value) => {
3078
+ pushParam$15(params, ADMIN_USERNAME_PARAM, value);
3079
+ return satisfiedBuilder;
3080
+ },
3081
+ withImagePublisher: (value) => {
3082
+ pushParam$15(params, IMAGE_PUBLISHER_PARAM, value);
3083
+ return satisfiedBuilder;
3084
+ },
3085
+ withImageOffer: (value) => {
3086
+ pushParam$15(params, IMAGE_OFFER_PARAM, value);
3087
+ return satisfiedBuilder;
3088
+ },
3089
+ withImageSku: (value) => {
3090
+ pushParam$15(params, IMAGE_SKU_PARAM, value);
3091
+ return satisfiedBuilder;
3092
+ },
3093
+ withSshPublicKey: (value) => {
3094
+ pushParam$15(params, SSH_PUBLIC_KEY_PARAM$1, value);
3095
+ return satisfiedBuilder;
3096
+ },
3097
+ withOsDiskSizeGb: (value) => {
3098
+ pushParam$15(params, OS_DISK_SIZE_GB_PARAM, value);
3099
+ return satisfiedBuilder;
3100
+ },
3101
+ build: () => inner.build()
3102
+ };
3103
+ return satisfiedBuilder;
3104
+ };
3105
+ _AzureVm.create = (config) => {
3106
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withVmSize(config.vmSize).withLocation(config.location).withResourceGroup(config.resourceGroup).withAdminUsername(config.adminUsername).withImagePublisher(config.imagePublisher).withImageOffer(config.imageOffer).withImageSku(config.imageSku);
3107
+ if (config.description) b.withDescription(config.description);
3108
+ if (config.sshPublicKey) b.withSshPublicKey(config.sshPublicKey);
3109
+ if (config.osDiskSizeGb !== void 0) b.withOsDiskSizeGb(config.osDiskSizeGb);
3110
+ return b.build();
3111
+ };
3112
+ })(AzureVm || (AzureVm = {}));
3113
+
3114
+ //#endregion
3115
+ //#region src/live_system/component/network_and_compute/iaas/gcp_vpc.ts
3116
+ const GCP_VPC_TYPE_NAME = "GcpVpc";
3117
+ const AUTO_CREATE_SUBNETWORKS_PARAM = "autoCreateSubnetworks";
3118
+ const ROUTING_MODE_PARAM = "routingMode";
3119
+ function buildId$16(id) {
3120
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3121
+ }
3122
+ function buildVersion$16(major, minor, patch) {
3123
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3124
+ }
3125
+ function buildGcpVpcType() {
3126
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(GCP_VPC_TYPE_NAME).build()).build();
3127
+ }
3128
+ function pushParam$14(params, key, value) {
3129
+ params.push(key, value);
3130
+ }
3131
+ let GcpVpc;
3132
+ (function(_GcpVpc) {
3133
+ const getBuilder = _GcpVpc.getBuilder = () => {
3134
+ const params = getParametersInstance();
3135
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpVpcType()).withParameters(params).withProvider("GCP");
3136
+ const builder = {
3137
+ withId: (id) => {
3138
+ inner.withId(buildId$16(id));
3139
+ return builder;
3140
+ },
3141
+ withVersion: (major, minor, patch) => {
3142
+ inner.withVersion(buildVersion$16(major, minor, patch));
3143
+ return builder;
3144
+ },
3145
+ withDisplayName: (displayName) => {
3146
+ inner.withDisplayName(displayName);
3147
+ return builder;
3148
+ },
3149
+ withDescription: (description) => {
3150
+ inner.withDescription(description);
3151
+ return builder;
3152
+ },
3153
+ withCidrBlock: (value) => {
3154
+ pushParam$14(params, CIDR_BLOCK_PARAM$1, value);
3155
+ return builder;
3156
+ },
3157
+ withAutoCreateSubnetworks: (value) => {
3158
+ pushParam$14(params, AUTO_CREATE_SUBNETWORKS_PARAM, value);
3159
+ return builder;
3160
+ },
3161
+ withRoutingMode: (value) => {
3162
+ pushParam$14(params, ROUTING_MODE_PARAM, value);
3163
+ return builder;
3164
+ },
3165
+ build: () => inner.build()
3166
+ };
3167
+ return builder;
3168
+ };
3169
+ _GcpVpc.satisfy = (blueprint) => {
3170
+ const params = getParametersInstance();
3171
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpVpcType()).withParameters(params).withProvider("GCP").withId(buildId$16(blueprint.id.toString())).withVersion(buildVersion$16(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3172
+ if (blueprint.description) inner.withDescription(blueprint.description);
3173
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM$1);
3174
+ if (cidrBlock !== null) pushParam$14(params, CIDR_BLOCK_PARAM$1, String(cidrBlock));
3175
+ const satisfiedBuilder = {
3176
+ withAutoCreateSubnetworks: (value) => {
3177
+ pushParam$14(params, AUTO_CREATE_SUBNETWORKS_PARAM, value);
3178
+ return satisfiedBuilder;
3179
+ },
3180
+ withRoutingMode: (value) => {
3181
+ pushParam$14(params, ROUTING_MODE_PARAM, value);
3182
+ return satisfiedBuilder;
3183
+ },
3184
+ build: () => inner.build()
3185
+ };
3186
+ return satisfiedBuilder;
3187
+ };
3188
+ _GcpVpc.create = (config) => {
3189
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock);
3190
+ if (config.description) b.withDescription(config.description);
3191
+ if (config.autoCreateSubnetworks !== void 0) b.withAutoCreateSubnetworks(config.autoCreateSubnetworks);
3192
+ if (config.routingMode) b.withRoutingMode(config.routingMode);
3193
+ return b.build();
3194
+ };
3195
+ })(GcpVpc || (GcpVpc = {}));
3196
+
3197
+ //#endregion
3198
+ //#region src/live_system/component/network_and_compute/iaas/gcp_subnet.ts
3199
+ const GCP_SUBNET_TYPE_NAME = "GcpSubnet";
3200
+ const REGION_PARAM = "region";
3201
+ const PRIVATE_IP_GOOGLE_ACCESS_PARAM = "privateIpGoogleAccess";
3202
+ function buildId$15(id) {
3203
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3204
+ }
3205
+ function buildVersion$15(major, minor, patch) {
3206
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3207
+ }
3208
+ function buildGcpSubnetType() {
3209
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(GCP_SUBNET_TYPE_NAME).build()).build();
3210
+ }
3211
+ function pushParam$13(params, key, value) {
3212
+ params.push(key, value);
3213
+ }
3214
+ let GcpSubnet;
3215
+ (function(_GcpSubnet) {
3216
+ const getBuilder = _GcpSubnet.getBuilder = () => {
3217
+ const params = getParametersInstance();
3218
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpSubnetType()).withParameters(params).withProvider("GCP");
3219
+ const builder = {
3220
+ withId: (id) => {
3221
+ inner.withId(buildId$15(id));
3222
+ return builder;
3223
+ },
3224
+ withVersion: (major, minor, patch) => {
3225
+ inner.withVersion(buildVersion$15(major, minor, patch));
3226
+ return builder;
3227
+ },
3228
+ withDisplayName: (displayName) => {
3229
+ inner.withDisplayName(displayName);
3230
+ return builder;
3231
+ },
3232
+ withDescription: (description) => {
3233
+ inner.withDescription(description);
3234
+ return builder;
3235
+ },
3236
+ withCidrBlock: (value) => {
3237
+ pushParam$13(params, CIDR_BLOCK_PARAM, value);
3238
+ return builder;
3239
+ },
3240
+ withRegion: (value) => {
3241
+ pushParam$13(params, REGION_PARAM, value);
3242
+ return builder;
3243
+ },
3244
+ withPrivateIpGoogleAccess: (value) => {
3245
+ pushParam$13(params, PRIVATE_IP_GOOGLE_ACCESS_PARAM, value);
3246
+ return builder;
3247
+ },
3248
+ build: () => inner.build()
3249
+ };
3250
+ return builder;
3251
+ };
3252
+ _GcpSubnet.satisfy = (blueprint) => {
3253
+ const params = getParametersInstance();
3254
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpSubnetType()).withParameters(params).withProvider("GCP").withId(buildId$15(blueprint.id.toString())).withVersion(buildVersion$15(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3255
+ if (blueprint.description) inner.withDescription(blueprint.description);
3256
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM);
3257
+ if (cidrBlock !== null) pushParam$13(params, CIDR_BLOCK_PARAM, String(cidrBlock));
3258
+ const satisfiedBuilder = {
3259
+ withRegion: (value) => {
3260
+ pushParam$13(params, REGION_PARAM, value);
3261
+ return satisfiedBuilder;
3262
+ },
3263
+ withPrivateIpGoogleAccess: (value) => {
3264
+ pushParam$13(params, PRIVATE_IP_GOOGLE_ACCESS_PARAM, value);
3265
+ return satisfiedBuilder;
3266
+ },
3267
+ build: () => inner.build()
3268
+ };
3269
+ return satisfiedBuilder;
3270
+ };
3271
+ _GcpSubnet.create = (config) => {
3272
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock).withRegion(config.region);
3273
+ if (config.description) b.withDescription(config.description);
3274
+ if (config.privateIpGoogleAccess !== void 0) b.withPrivateIpGoogleAccess(config.privateIpGoogleAccess);
3275
+ return b.build();
3276
+ };
3277
+ })(GcpSubnet || (GcpSubnet = {}));
3278
+
3279
+ //#endregion
3280
+ //#region src/live_system/component/network_and_compute/iaas/gcp_firewall.ts
3281
+ const GCP_FIREWALL_TYPE_NAME = "GcpFirewall";
3282
+ function buildId$14(id) {
3283
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3284
+ }
3285
+ function buildVersion$14(major, minor, patch) {
3286
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3287
+ }
3288
+ function buildGcpFirewallType() {
3289
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(GCP_FIREWALL_TYPE_NAME).build()).build();
3290
+ }
3291
+ function pushParam$12(params, key, value) {
3292
+ params.push(key, value);
3293
+ }
3294
+ let GcpFirewall;
3295
+ (function(_GcpFirewall) {
3296
+ const getBuilder = _GcpFirewall.getBuilder = () => {
3297
+ const params = getParametersInstance();
3298
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpFirewallType()).withParameters(params).withProvider("GCP");
3299
+ const builder = {
3300
+ withId: (id) => {
3301
+ inner.withId(buildId$14(id));
3302
+ return builder;
3303
+ },
3304
+ withVersion: (major, minor, patch) => {
3305
+ inner.withVersion(buildVersion$14(major, minor, patch));
3306
+ return builder;
3307
+ },
3308
+ withDisplayName: (displayName) => {
3309
+ inner.withDisplayName(displayName);
3310
+ return builder;
3311
+ },
3312
+ withDescription: (description) => {
3313
+ inner.withDescription(description);
3314
+ pushParam$12(params, DESCRIPTION_PARAM, description);
3315
+ return builder;
3316
+ },
3317
+ withIngressRules: (rules) => {
3318
+ pushParam$12(params, INGRESS_RULES_PARAM, rules);
3319
+ return builder;
3320
+ },
3321
+ build: () => inner.build()
3322
+ };
3323
+ return builder;
3324
+ };
3325
+ _GcpFirewall.satisfy = (blueprint) => {
3326
+ const params = getParametersInstance();
3327
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpFirewallType()).withParameters(params).withProvider("GCP").withId(buildId$14(blueprint.id.toString())).withVersion(buildVersion$14(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3328
+ const description = blueprint.parameters.getOptionalFieldByName(DESCRIPTION_PARAM);
3329
+ if (description !== null) {
3330
+ inner.withDescription(String(description));
3331
+ pushParam$12(params, DESCRIPTION_PARAM, String(description));
3332
+ } else if (blueprint.description) inner.withDescription(blueprint.description);
3333
+ const ingressRules = blueprint.parameters.getOptionalFieldByName(INGRESS_RULES_PARAM);
3334
+ if (ingressRules !== null) pushParam$12(params, INGRESS_RULES_PARAM, ingressRules);
3335
+ return { build: () => inner.build() };
3336
+ };
3337
+ _GcpFirewall.create = (config) => {
3338
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
3339
+ if (config.description) b.withDescription(config.description);
3340
+ if (config.ingressRules && config.ingressRules.length > 0) b.withIngressRules(config.ingressRules);
3341
+ return b.build();
3342
+ };
3343
+ })(GcpFirewall || (GcpFirewall = {}));
3344
+
3345
+ //#endregion
3346
+ //#region src/live_system/component/network_and_compute/iaas/gcp_vm.ts
3347
+ const GCP_VM_TYPE_NAME = "GcpVm";
3348
+ const MACHINE_TYPE_PARAM = "machineType";
3349
+ const ZONE_PARAM = "zone";
3350
+ const IMAGE_PROJECT_PARAM = "imageProject";
3351
+ const IMAGE_FAMILY_PARAM = "imageFamily";
3352
+ const SERVICE_ACCOUNT_EMAIL_PARAM = "serviceAccountEmail";
3353
+ function buildId$13(id) {
3354
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3355
+ }
3356
+ function buildVersion$13(major, minor, patch) {
3357
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3358
+ }
3359
+ function buildGcpVmType() {
3360
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(GCP_VM_TYPE_NAME).build()).build();
3361
+ }
3362
+ function pushParam$11(params, key, value) {
3363
+ params.push(key, value);
3364
+ }
3365
+ let GcpVm;
3366
+ (function(_GcpVm) {
3367
+ const getBuilder = _GcpVm.getBuilder = () => {
3368
+ const params = getParametersInstance();
3369
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpVmType()).withParameters(params).withProvider("GCP");
3370
+ const builder = {
3371
+ withId: (id) => {
3372
+ inner.withId(buildId$13(id));
3373
+ return builder;
3374
+ },
3375
+ withVersion: (major, minor, patch) => {
3376
+ inner.withVersion(buildVersion$13(major, minor, patch));
3377
+ return builder;
3378
+ },
3379
+ withDisplayName: (displayName) => {
3380
+ inner.withDisplayName(displayName);
3381
+ return builder;
3382
+ },
3383
+ withDescription: (description) => {
3384
+ inner.withDescription(description);
3385
+ return builder;
3386
+ },
3387
+ withMachineType: (value) => {
3388
+ pushParam$11(params, MACHINE_TYPE_PARAM, value);
3389
+ return builder;
3390
+ },
3391
+ withZone: (value) => {
3392
+ pushParam$11(params, ZONE_PARAM, value);
3393
+ return builder;
3394
+ },
3395
+ withImageProject: (value) => {
3396
+ pushParam$11(params, IMAGE_PROJECT_PARAM, value);
3397
+ return builder;
3398
+ },
3399
+ withImageFamily: (value) => {
3400
+ pushParam$11(params, IMAGE_FAMILY_PARAM, value);
3401
+ return builder;
3402
+ },
3403
+ withServiceAccountEmail: (value) => {
3404
+ pushParam$11(params, SERVICE_ACCOUNT_EMAIL_PARAM, value);
3405
+ return builder;
3406
+ },
3407
+ build: () => inner.build()
3408
+ };
3409
+ return builder;
3410
+ };
3411
+ _GcpVm.satisfy = (blueprint) => {
3412
+ const params = getParametersInstance();
3413
+ const inner = getLiveSystemComponentBuilder().withType(buildGcpVmType()).withParameters(params).withProvider("GCP").withId(buildId$13(blueprint.id.toString())).withVersion(buildVersion$13(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3414
+ if (blueprint.description) inner.withDescription(blueprint.description);
3415
+ const satisfiedBuilder = {
3416
+ withMachineType: (value) => {
3417
+ pushParam$11(params, MACHINE_TYPE_PARAM, value);
3418
+ return satisfiedBuilder;
3419
+ },
3420
+ withZone: (value) => {
3421
+ pushParam$11(params, ZONE_PARAM, value);
3422
+ return satisfiedBuilder;
3423
+ },
3424
+ withImageProject: (value) => {
3425
+ pushParam$11(params, IMAGE_PROJECT_PARAM, value);
3426
+ return satisfiedBuilder;
3427
+ },
3428
+ withImageFamily: (value) => {
3429
+ pushParam$11(params, IMAGE_FAMILY_PARAM, value);
3430
+ return satisfiedBuilder;
3431
+ },
3432
+ withServiceAccountEmail: (value) => {
3433
+ pushParam$11(params, SERVICE_ACCOUNT_EMAIL_PARAM, value);
3434
+ return satisfiedBuilder;
3435
+ },
3436
+ build: () => inner.build()
3437
+ };
3438
+ return satisfiedBuilder;
3439
+ };
3440
+ _GcpVm.create = (config) => {
3441
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withMachineType(config.machineType).withZone(config.zone).withImageProject(config.imageProject);
3442
+ if (config.description) b.withDescription(config.description);
3443
+ if (config.imageFamily) b.withImageFamily(config.imageFamily);
3444
+ if (config.serviceAccountEmail) b.withServiceAccountEmail(config.serviceAccountEmail);
3445
+ return b.build();
3446
+ };
3447
+ })(GcpVm || (GcpVm = {}));
3448
+
3449
+ //#endregion
3450
+ //#region src/live_system/component/network_and_compute/iaas/oci_vcn.ts
3451
+ const OCI_VCN_TYPE_NAME = "OciVcn";
3452
+ const COMPARTMENT_ID_PARAM$3 = "compartmentId";
3453
+ function buildId$12(id) {
3454
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3455
+ }
3456
+ function buildVersion$12(major, minor, patch) {
3457
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3458
+ }
3459
+ function buildOciVcnType() {
3460
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(OCI_VCN_TYPE_NAME).build()).build();
3461
+ }
3462
+ function pushParam$10(params, key, value) {
3463
+ params.push(key, value);
3464
+ }
3465
+ let OciVcn;
3466
+ (function(_OciVcn) {
3467
+ const getBuilder = _OciVcn.getBuilder = () => {
3468
+ const params = getParametersInstance();
3469
+ const inner = getLiveSystemComponentBuilder().withType(buildOciVcnType()).withParameters(params).withProvider("OCI");
3470
+ const builder = {
3471
+ withId: (id) => {
3472
+ inner.withId(buildId$12(id));
3473
+ return builder;
3474
+ },
3475
+ withVersion: (major, minor, patch) => {
3476
+ inner.withVersion(buildVersion$12(major, minor, patch));
3477
+ return builder;
3478
+ },
3479
+ withDisplayName: (displayName) => {
3480
+ inner.withDisplayName(displayName);
3481
+ return builder;
3482
+ },
3483
+ withDescription: (description) => {
3484
+ inner.withDescription(description);
3485
+ return builder;
3486
+ },
3487
+ withCidrBlock: (value) => {
3488
+ pushParam$10(params, CIDR_BLOCK_PARAM$1, value);
3489
+ return builder;
3490
+ },
3491
+ withCompartmentId: (value) => {
3492
+ pushParam$10(params, COMPARTMENT_ID_PARAM$3, value);
3493
+ return builder;
3494
+ },
3495
+ build: () => inner.build()
3496
+ };
3497
+ return builder;
3498
+ };
3499
+ _OciVcn.satisfy = (blueprint) => {
3500
+ const params = getParametersInstance();
3501
+ const inner = getLiveSystemComponentBuilder().withType(buildOciVcnType()).withParameters(params).withProvider("OCI").withId(buildId$12(blueprint.id.toString())).withVersion(buildVersion$12(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3502
+ if (blueprint.description) inner.withDescription(blueprint.description);
3503
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM$1);
3504
+ if (cidrBlock !== null) pushParam$10(params, CIDR_BLOCK_PARAM$1, String(cidrBlock));
3505
+ const satisfiedBuilder = {
3506
+ withCompartmentId: (value) => {
3507
+ pushParam$10(params, COMPARTMENT_ID_PARAM$3, value);
3508
+ return satisfiedBuilder;
3509
+ },
3510
+ build: () => inner.build()
3511
+ };
3512
+ return satisfiedBuilder;
3513
+ };
3514
+ _OciVcn.create = (config) => {
3515
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock).withCompartmentId(config.compartmentId);
3516
+ if (config.description) b.withDescription(config.description);
3517
+ return b.build();
3518
+ };
3519
+ })(OciVcn || (OciVcn = {}));
3520
+
3521
+ //#endregion
3522
+ //#region src/live_system/component/network_and_compute/iaas/oci_subnet.ts
3523
+ const OCI_SUBNET_TYPE_NAME = "OciSubnet";
3524
+ const COMPARTMENT_ID_PARAM$2 = "compartmentId";
3525
+ const AVAILABILITY_DOMAIN_PARAM$1 = "availabilityDomain";
3526
+ const PROHIBIT_PUBLIC_IP_PARAM = "prohibitPublicIpOnVnic";
3527
+ function buildId$11(id) {
3528
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3529
+ }
3530
+ function buildVersion$11(major, minor, patch) {
3531
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3532
+ }
3533
+ function buildOciSubnetType() {
3534
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(OCI_SUBNET_TYPE_NAME).build()).build();
3535
+ }
3536
+ function pushParam$9(params, key, value) {
3537
+ params.push(key, value);
3538
+ }
3539
+ let OciSubnet;
3540
+ (function(_OciSubnet) {
3541
+ const getBuilder = _OciSubnet.getBuilder = () => {
3542
+ const params = getParametersInstance();
3543
+ const inner = getLiveSystemComponentBuilder().withType(buildOciSubnetType()).withParameters(params).withProvider("OCI");
3544
+ const builder = {
3545
+ withId: (id) => {
3546
+ inner.withId(buildId$11(id));
3547
+ return builder;
3548
+ },
3549
+ withVersion: (major, minor, patch) => {
3550
+ inner.withVersion(buildVersion$11(major, minor, patch));
3551
+ return builder;
3552
+ },
3553
+ withDisplayName: (displayName) => {
3554
+ inner.withDisplayName(displayName);
3555
+ return builder;
3556
+ },
3557
+ withDescription: (description) => {
3558
+ inner.withDescription(description);
3559
+ return builder;
3560
+ },
3561
+ withCidrBlock: (value) => {
3562
+ pushParam$9(params, CIDR_BLOCK_PARAM, value);
3563
+ return builder;
3564
+ },
3565
+ withCompartmentId: (value) => {
3566
+ pushParam$9(params, COMPARTMENT_ID_PARAM$2, value);
3567
+ return builder;
3568
+ },
3569
+ withAvailabilityDomain: (value) => {
3570
+ pushParam$9(params, AVAILABILITY_DOMAIN_PARAM$1, value);
3571
+ return builder;
3572
+ },
3573
+ withProhibitPublicIpOnVnic: (value) => {
3574
+ pushParam$9(params, PROHIBIT_PUBLIC_IP_PARAM, value);
3575
+ return builder;
3576
+ },
3577
+ build: () => inner.build()
3578
+ };
3579
+ return builder;
3580
+ };
3581
+ _OciSubnet.satisfy = (blueprint) => {
3582
+ const params = getParametersInstance();
3583
+ const inner = getLiveSystemComponentBuilder().withType(buildOciSubnetType()).withParameters(params).withProvider("OCI").withId(buildId$11(blueprint.id.toString())).withVersion(buildVersion$11(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3584
+ if (blueprint.description) inner.withDescription(blueprint.description);
3585
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM);
3586
+ if (cidrBlock !== null) pushParam$9(params, CIDR_BLOCK_PARAM, String(cidrBlock));
3587
+ const satisfiedBuilder = {
3588
+ withCompartmentId: (value) => {
3589
+ pushParam$9(params, COMPARTMENT_ID_PARAM$2, value);
3590
+ return satisfiedBuilder;
3591
+ },
3592
+ withAvailabilityDomain: (value) => {
3593
+ pushParam$9(params, AVAILABILITY_DOMAIN_PARAM$1, value);
3594
+ return satisfiedBuilder;
3595
+ },
3596
+ withProhibitPublicIpOnVnic: (value) => {
3597
+ pushParam$9(params, PROHIBIT_PUBLIC_IP_PARAM, value);
3598
+ return satisfiedBuilder;
3599
+ },
3600
+ build: () => inner.build()
3601
+ };
3602
+ return satisfiedBuilder;
3603
+ };
3604
+ _OciSubnet.create = (config) => {
3605
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock).withCompartmentId(config.compartmentId);
3606
+ if (config.description) b.withDescription(config.description);
3607
+ if (config.availabilityDomain) b.withAvailabilityDomain(config.availabilityDomain);
3608
+ if (config.prohibitPublicIpOnVnic !== void 0) b.withProhibitPublicIpOnVnic(config.prohibitPublicIpOnVnic);
3609
+ return b.build();
3610
+ };
3611
+ })(OciSubnet || (OciSubnet = {}));
3612
+
3613
+ //#endregion
3614
+ //#region src/live_system/component/network_and_compute/iaas/oci_security_list.ts
3615
+ const OCI_SECURITY_LIST_TYPE_NAME = "OciSecurityList";
3616
+ const COMPARTMENT_ID_PARAM$1 = "compartmentId";
3617
+ function buildId$10(id) {
3618
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3619
+ }
3620
+ function buildVersion$10(major, minor, patch) {
3621
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3622
+ }
3623
+ function buildOciSecurityListType() {
3624
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(OCI_SECURITY_LIST_TYPE_NAME).build()).build();
3625
+ }
3626
+ function pushParam$8(params, key, value) {
3627
+ params.push(key, value);
3628
+ }
3629
+ let OciSecurityList;
3630
+ (function(_OciSecurityList) {
3631
+ const getBuilder = _OciSecurityList.getBuilder = () => {
3632
+ const params = getParametersInstance();
3633
+ const inner = getLiveSystemComponentBuilder().withType(buildOciSecurityListType()).withParameters(params).withProvider("OCI");
3634
+ const builder = {
3635
+ withId: (id) => {
3636
+ inner.withId(buildId$10(id));
3637
+ return builder;
3638
+ },
3639
+ withVersion: (major, minor, patch) => {
3640
+ inner.withVersion(buildVersion$10(major, minor, patch));
3641
+ return builder;
3642
+ },
3643
+ withDisplayName: (displayName) => {
3644
+ inner.withDisplayName(displayName);
3645
+ return builder;
3646
+ },
3647
+ withDescription: (description) => {
3648
+ inner.withDescription(description);
3649
+ pushParam$8(params, DESCRIPTION_PARAM, description);
3650
+ return builder;
3651
+ },
3652
+ withIngressRules: (rules) => {
3653
+ pushParam$8(params, INGRESS_RULES_PARAM, rules);
3654
+ return builder;
3655
+ },
3656
+ withCompartmentId: (value) => {
3657
+ pushParam$8(params, COMPARTMENT_ID_PARAM$1, value);
3658
+ return builder;
3659
+ },
3660
+ build: () => inner.build()
3661
+ };
3662
+ return builder;
3663
+ };
3664
+ _OciSecurityList.satisfy = (blueprint) => {
3665
+ const params = getParametersInstance();
3666
+ const inner = getLiveSystemComponentBuilder().withType(buildOciSecurityListType()).withParameters(params).withProvider("OCI").withId(buildId$10(blueprint.id.toString())).withVersion(buildVersion$10(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3667
+ const description = blueprint.parameters.getOptionalFieldByName(DESCRIPTION_PARAM);
3668
+ if (description !== null) {
3669
+ inner.withDescription(String(description));
3670
+ pushParam$8(params, DESCRIPTION_PARAM, String(description));
3671
+ } else if (blueprint.description) inner.withDescription(blueprint.description);
3672
+ const ingressRules = blueprint.parameters.getOptionalFieldByName(INGRESS_RULES_PARAM);
3673
+ if (ingressRules !== null) pushParam$8(params, INGRESS_RULES_PARAM, ingressRules);
3674
+ const satisfiedBuilder = {
3675
+ withCompartmentId: (value) => {
3676
+ pushParam$8(params, COMPARTMENT_ID_PARAM$1, value);
3677
+ return satisfiedBuilder;
3678
+ },
3679
+ build: () => inner.build()
3680
+ };
3681
+ return satisfiedBuilder;
3682
+ };
3683
+ _OciSecurityList.create = (config) => {
3684
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCompartmentId(config.compartmentId);
3685
+ if (config.description) b.withDescription(config.description);
3686
+ if (config.ingressRules && config.ingressRules.length > 0) b.withIngressRules(config.ingressRules);
3687
+ return b.build();
3688
+ };
3689
+ })(OciSecurityList || (OciSecurityList = {}));
3690
+
3691
+ //#endregion
3692
+ //#region src/live_system/component/network_and_compute/iaas/oci_instance.ts
3693
+ const OCI_INSTANCE_TYPE_NAME = "OciInstance";
3694
+ const COMPARTMENT_ID_PARAM = "compartmentId";
3695
+ const AVAILABILITY_DOMAIN_PARAM = "availabilityDomain";
3696
+ const SHAPE_PARAM = "shape";
3697
+ const IMAGE_ID_PARAM = "imageId";
3698
+ const OCPUS_PARAM = "ocpus";
3699
+ const MEMORY_IN_GBS_PARAM = "memoryInGbs";
3700
+ const SSH_PUBLIC_KEY_PARAM = "sshPublicKey";
3701
+ function buildId$9(id) {
3702
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3703
+ }
3704
+ function buildVersion$9(major, minor, patch) {
3705
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3706
+ }
3707
+ function buildOciInstanceType() {
3708
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(OCI_INSTANCE_TYPE_NAME).build()).build();
3709
+ }
3710
+ function pushParam$7(params, key, value) {
3711
+ params.push(key, value);
3712
+ }
3713
+ let OciInstance;
3714
+ (function(_OciInstance) {
3715
+ const getBuilder = _OciInstance.getBuilder = () => {
3716
+ const params = getParametersInstance();
3717
+ const inner = getLiveSystemComponentBuilder().withType(buildOciInstanceType()).withParameters(params).withProvider("OCI");
3718
+ const builder = {
3719
+ withId: (id) => {
3720
+ inner.withId(buildId$9(id));
3721
+ return builder;
3722
+ },
3723
+ withVersion: (major, minor, patch) => {
3724
+ inner.withVersion(buildVersion$9(major, minor, patch));
3725
+ return builder;
3726
+ },
3727
+ withDisplayName: (displayName) => {
3728
+ inner.withDisplayName(displayName);
3729
+ return builder;
3730
+ },
3731
+ withDescription: (description) => {
3732
+ inner.withDescription(description);
3733
+ return builder;
3734
+ },
3735
+ withCompartmentId: (value) => {
3736
+ pushParam$7(params, COMPARTMENT_ID_PARAM, value);
3737
+ return builder;
3738
+ },
3739
+ withAvailabilityDomain: (value) => {
3740
+ pushParam$7(params, AVAILABILITY_DOMAIN_PARAM, value);
3741
+ return builder;
3742
+ },
3743
+ withShape: (value) => {
3744
+ pushParam$7(params, SHAPE_PARAM, value);
3745
+ return builder;
3746
+ },
3747
+ withImageId: (value) => {
3748
+ pushParam$7(params, IMAGE_ID_PARAM, value);
3749
+ return builder;
3750
+ },
3751
+ withOcpus: (value) => {
3752
+ pushParam$7(params, OCPUS_PARAM, value);
3753
+ return builder;
3754
+ },
3755
+ withMemoryInGbs: (value) => {
3756
+ pushParam$7(params, MEMORY_IN_GBS_PARAM, value);
3757
+ return builder;
3758
+ },
3759
+ withSshPublicKey: (value) => {
3760
+ pushParam$7(params, SSH_PUBLIC_KEY_PARAM, value);
3761
+ return builder;
3762
+ },
3763
+ build: () => inner.build()
3764
+ };
3765
+ return builder;
3766
+ };
3767
+ _OciInstance.satisfy = (blueprint) => {
3768
+ const params = getParametersInstance();
3769
+ const inner = getLiveSystemComponentBuilder().withType(buildOciInstanceType()).withParameters(params).withProvider("OCI").withId(buildId$9(blueprint.id.toString())).withVersion(buildVersion$9(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3770
+ if (blueprint.description) inner.withDescription(blueprint.description);
3771
+ const satisfiedBuilder = {
3772
+ withCompartmentId: (value) => {
3773
+ pushParam$7(params, COMPARTMENT_ID_PARAM, value);
3774
+ return satisfiedBuilder;
3775
+ },
3776
+ withAvailabilityDomain: (value) => {
3777
+ pushParam$7(params, AVAILABILITY_DOMAIN_PARAM, value);
3778
+ return satisfiedBuilder;
3779
+ },
3780
+ withShape: (value) => {
3781
+ pushParam$7(params, SHAPE_PARAM, value);
3782
+ return satisfiedBuilder;
3783
+ },
3784
+ withImageId: (value) => {
3785
+ pushParam$7(params, IMAGE_ID_PARAM, value);
3786
+ return satisfiedBuilder;
3787
+ },
3788
+ withOcpus: (value) => {
3789
+ pushParam$7(params, OCPUS_PARAM, value);
3790
+ return satisfiedBuilder;
3791
+ },
3792
+ withMemoryInGbs: (value) => {
3793
+ pushParam$7(params, MEMORY_IN_GBS_PARAM, value);
3794
+ return satisfiedBuilder;
3795
+ },
3796
+ withSshPublicKey: (value) => {
3797
+ pushParam$7(params, SSH_PUBLIC_KEY_PARAM, value);
3798
+ return satisfiedBuilder;
3799
+ },
3800
+ build: () => inner.build()
3801
+ };
3802
+ return satisfiedBuilder;
3803
+ };
3804
+ _OciInstance.create = (config) => {
3805
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCompartmentId(config.compartmentId).withAvailabilityDomain(config.availabilityDomain).withShape(config.shape).withImageId(config.imageId);
3806
+ if (config.description) b.withDescription(config.description);
3807
+ if (config.ocpus !== void 0) b.withOcpus(config.ocpus);
3808
+ if (config.memoryInGbs !== void 0) b.withMemoryInGbs(config.memoryInGbs);
3809
+ if (config.sshPublicKey) b.withSshPublicKey(config.sshPublicKey);
3810
+ return b.build();
3811
+ };
3812
+ })(OciInstance || (OciInstance = {}));
3813
+
3814
+ //#endregion
3815
+ //#region src/live_system/component/network_and_compute/iaas/hetzner_network.ts
3816
+ const HETZNER_NETWORK_TYPE_NAME = "HetznerNetwork";
3817
+ function buildId$8(id) {
3818
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3819
+ }
3820
+ function buildVersion$8(major, minor, patch) {
3821
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3822
+ }
3823
+ function buildHetznerNetworkType() {
3824
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(HETZNER_NETWORK_TYPE_NAME).build()).build();
3825
+ }
3826
+ function pushParam$6(params, key, value) {
3827
+ params.push(key, value);
3828
+ }
3829
+ let HetznerNetwork;
3830
+ (function(_HetznerNetwork) {
3831
+ const getBuilder = _HetznerNetwork.getBuilder = () => {
3832
+ const params = getParametersInstance();
3833
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerNetworkType()).withParameters(params).withProvider("Hetzner");
3834
+ const builder = {
3835
+ withId: (id) => {
3836
+ inner.withId(buildId$8(id));
3837
+ return builder;
3838
+ },
3839
+ withVersion: (major, minor, patch) => {
3840
+ inner.withVersion(buildVersion$8(major, minor, patch));
3841
+ return builder;
3842
+ },
3843
+ withDisplayName: (displayName) => {
3844
+ inner.withDisplayName(displayName);
3845
+ return builder;
3846
+ },
3847
+ withDescription: (description) => {
3848
+ inner.withDescription(description);
3849
+ return builder;
3850
+ },
3851
+ withCidrBlock: (value) => {
3852
+ pushParam$6(params, CIDR_BLOCK_PARAM$1, value);
3853
+ return builder;
3854
+ },
3855
+ build: () => inner.build()
3856
+ };
3857
+ return builder;
3858
+ };
3859
+ _HetznerNetwork.satisfy = (blueprint) => {
3860
+ const params = getParametersInstance();
3861
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerNetworkType()).withParameters(params).withProvider("Hetzner").withId(buildId$8(blueprint.id.toString())).withVersion(buildVersion$8(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3862
+ if (blueprint.description) inner.withDescription(blueprint.description);
3863
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM$1);
3864
+ if (cidrBlock !== null) pushParam$6(params, CIDR_BLOCK_PARAM$1, String(cidrBlock));
3865
+ return { build: () => inner.build() };
3866
+ };
3867
+ _HetznerNetwork.create = (config) => {
3868
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock);
3869
+ if (config.description) b.withDescription(config.description);
3870
+ return b.build();
3871
+ };
3872
+ })(HetznerNetwork || (HetznerNetwork = {}));
3873
+
3874
+ //#endregion
3875
+ //#region src/live_system/component/network_and_compute/iaas/hetzner_subnet.ts
3876
+ const HETZNER_SUBNET_TYPE_NAME = "HetznerSubnet";
3877
+ const NETWORK_ZONE_PARAM = "networkZone";
3878
+ const TYPE_PARAM = "type";
3879
+ function buildId$7(id) {
3880
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3881
+ }
3882
+ function buildVersion$7(major, minor, patch) {
3883
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3884
+ }
3885
+ function buildHetznerSubnetType() {
3886
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(HETZNER_SUBNET_TYPE_NAME).build()).build();
3887
+ }
3888
+ function pushParam$5(params, key, value) {
3889
+ params.push(key, value);
3890
+ }
3891
+ let HetznerSubnet;
3892
+ (function(_HetznerSubnet) {
3893
+ const getBuilder = _HetznerSubnet.getBuilder = () => {
3894
+ const params = getParametersInstance();
3895
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerSubnetType()).withParameters(params).withProvider("Hetzner");
3896
+ const builder = {
3897
+ withId: (id) => {
3898
+ inner.withId(buildId$7(id));
3899
+ return builder;
3900
+ },
3901
+ withVersion: (major, minor, patch) => {
3902
+ inner.withVersion(buildVersion$7(major, minor, patch));
3903
+ return builder;
3904
+ },
3905
+ withDisplayName: (displayName) => {
3906
+ inner.withDisplayName(displayName);
3907
+ return builder;
3908
+ },
3909
+ withDescription: (description) => {
3910
+ inner.withDescription(description);
3911
+ return builder;
3912
+ },
3913
+ withCidrBlock: (value) => {
3914
+ pushParam$5(params, CIDR_BLOCK_PARAM, value);
3915
+ return builder;
3916
+ },
3917
+ withNetworkZone: (value) => {
3918
+ pushParam$5(params, NETWORK_ZONE_PARAM, value);
3919
+ return builder;
3920
+ },
3921
+ withType: (value) => {
3922
+ pushParam$5(params, TYPE_PARAM, value);
3923
+ return builder;
3924
+ },
3925
+ build: () => inner.build()
3926
+ };
3927
+ return builder;
3928
+ };
3929
+ _HetznerSubnet.satisfy = (blueprint) => {
3930
+ const params = getParametersInstance();
3931
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerSubnetType()).withParameters(params).withProvider("Hetzner").withId(buildId$7(blueprint.id.toString())).withVersion(buildVersion$7(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
3932
+ if (blueprint.description) inner.withDescription(blueprint.description);
3933
+ const cidrBlock = blueprint.parameters.getOptionalFieldByName(CIDR_BLOCK_PARAM);
3934
+ if (cidrBlock !== null) pushParam$5(params, CIDR_BLOCK_PARAM, String(cidrBlock));
3935
+ const satisfiedBuilder = {
3936
+ withNetworkZone: (value) => {
3937
+ pushParam$5(params, NETWORK_ZONE_PARAM, value);
3938
+ return satisfiedBuilder;
3939
+ },
3940
+ withType: (value) => {
3941
+ pushParam$5(params, TYPE_PARAM, value);
3942
+ return satisfiedBuilder;
3943
+ },
3944
+ build: () => inner.build()
3945
+ };
3946
+ return satisfiedBuilder;
3947
+ };
3948
+ _HetznerSubnet.create = (config) => {
3949
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withCidrBlock(config.cidrBlock).withNetworkZone(config.networkZone);
3950
+ if (config.description) b.withDescription(config.description);
3951
+ if (config.type) b.withType(config.type);
3952
+ return b.build();
3953
+ };
3954
+ })(HetznerSubnet || (HetznerSubnet = {}));
3955
+
3956
+ //#endregion
3957
+ //#region src/live_system/component/network_and_compute/iaas/hetzner_firewall.ts
3958
+ const HETZNER_FIREWALL_TYPE_NAME = "HetznerFirewall";
3959
+ function buildId$6(id) {
3960
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
3961
+ }
3962
+ function buildVersion$6(major, minor, patch) {
3963
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
3964
+ }
3965
+ function buildHetznerFirewallType() {
3966
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(HETZNER_FIREWALL_TYPE_NAME).build()).build();
3967
+ }
3968
+ function pushParam$4(params, key, value) {
3969
+ params.push(key, value);
3970
+ }
3971
+ let HetznerFirewall;
3972
+ (function(_HetznerFirewall) {
3973
+ const getBuilder = _HetznerFirewall.getBuilder = () => {
3974
+ const params = getParametersInstance();
3975
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerFirewallType()).withParameters(params).withProvider("Hetzner");
3976
+ const builder = {
3977
+ withId: (id) => {
3978
+ inner.withId(buildId$6(id));
3979
+ return builder;
3980
+ },
3981
+ withVersion: (major, minor, patch) => {
3982
+ inner.withVersion(buildVersion$6(major, minor, patch));
3983
+ return builder;
3984
+ },
3985
+ withDisplayName: (displayName) => {
3986
+ inner.withDisplayName(displayName);
3987
+ return builder;
3988
+ },
3989
+ withDescription: (description) => {
3990
+ inner.withDescription(description);
3991
+ pushParam$4(params, DESCRIPTION_PARAM, description);
3992
+ return builder;
3993
+ },
3994
+ withIngressRules: (rules) => {
3995
+ pushParam$4(params, INGRESS_RULES_PARAM, rules);
3996
+ return builder;
3997
+ },
3998
+ build: () => inner.build()
3999
+ };
4000
+ return builder;
4001
+ };
4002
+ _HetznerFirewall.satisfy = (blueprint) => {
4003
+ const params = getParametersInstance();
4004
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerFirewallType()).withParameters(params).withProvider("Hetzner").withId(buildId$6(blueprint.id.toString())).withVersion(buildVersion$6(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
4005
+ const description = blueprint.parameters.getOptionalFieldByName(DESCRIPTION_PARAM);
4006
+ if (description !== null) {
4007
+ inner.withDescription(String(description));
4008
+ pushParam$4(params, DESCRIPTION_PARAM, String(description));
4009
+ } else if (blueprint.description) inner.withDescription(blueprint.description);
4010
+ const ingressRules = blueprint.parameters.getOptionalFieldByName(INGRESS_RULES_PARAM);
4011
+ if (ingressRules !== null) pushParam$4(params, INGRESS_RULES_PARAM, ingressRules);
4012
+ return { build: () => inner.build() };
4013
+ };
4014
+ _HetznerFirewall.create = (config) => {
4015
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
4016
+ if (config.description) b.withDescription(config.description);
4017
+ if (config.ingressRules && config.ingressRules.length > 0) b.withIngressRules(config.ingressRules);
4018
+ return b.build();
4019
+ };
4020
+ })(HetznerFirewall || (HetznerFirewall = {}));
4021
+
4022
+ //#endregion
4023
+ //#region src/live_system/component/network_and_compute/iaas/hetzner_server.ts
4024
+ const HETZNER_SERVER_TYPE_NAME = "HetznerServer";
4025
+ const SERVER_TYPE_PARAM = "serverType";
4026
+ const LOCATION_PARAM = "location";
4027
+ const IMAGE_PARAM = "image";
4028
+ const SSH_KEYS_PARAM = "sshKeys";
4029
+ const USER_DATA_PARAM = "userData";
4030
+ function buildId$5(id) {
4031
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
4032
+ }
4033
+ function buildVersion$5(major, minor, patch) {
4034
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
4035
+ }
4036
+ function buildHetznerServerType() {
4037
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.IaaS).withName(PascalCaseString$1.getBuilder().withValue(HETZNER_SERVER_TYPE_NAME).build()).build();
4038
+ }
4039
+ function pushParam$3(params, key, value) {
4040
+ params.push(key, value);
4041
+ }
4042
+ let HetznerServer;
4043
+ (function(_HetznerServer) {
4044
+ const getBuilder = _HetznerServer.getBuilder = () => {
4045
+ const params = getParametersInstance();
4046
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerServerType()).withParameters(params).withProvider("Hetzner");
4047
+ const builder = {
4048
+ withId: (id) => {
4049
+ inner.withId(buildId$5(id));
4050
+ return builder;
4051
+ },
4052
+ withVersion: (major, minor, patch) => {
4053
+ inner.withVersion(buildVersion$5(major, minor, patch));
4054
+ return builder;
4055
+ },
4056
+ withDisplayName: (displayName) => {
4057
+ inner.withDisplayName(displayName);
4058
+ return builder;
4059
+ },
4060
+ withDescription: (description) => {
4061
+ inner.withDescription(description);
4062
+ return builder;
4063
+ },
4064
+ withServerType: (value) => {
4065
+ pushParam$3(params, SERVER_TYPE_PARAM, value);
4066
+ return builder;
4067
+ },
4068
+ withLocation: (value) => {
4069
+ pushParam$3(params, LOCATION_PARAM, value);
4070
+ return builder;
4071
+ },
4072
+ withImage: (value) => {
4073
+ pushParam$3(params, IMAGE_PARAM, value);
4074
+ return builder;
4075
+ },
4076
+ withSshKeys: (value) => {
4077
+ pushParam$3(params, SSH_KEYS_PARAM, value);
4078
+ return builder;
4079
+ },
4080
+ withUserData: (value) => {
4081
+ pushParam$3(params, USER_DATA_PARAM, value);
4082
+ return builder;
4083
+ },
4084
+ build: () => inner.build()
4085
+ };
4086
+ return builder;
4087
+ };
4088
+ _HetznerServer.satisfy = (blueprint) => {
4089
+ const params = getParametersInstance();
4090
+ const inner = getLiveSystemComponentBuilder().withType(buildHetznerServerType()).withParameters(params).withProvider("Hetzner").withId(buildId$5(blueprint.id.toString())).withVersion(buildVersion$5(blueprint.version.major, blueprint.version.minor, blueprint.version.patch)).withDisplayName(blueprint.displayName).withDependencies(blueprint.dependencies).withLinks(blueprint.links);
4091
+ if (blueprint.description) inner.withDescription(blueprint.description);
4092
+ const satisfiedBuilder = {
4093
+ withServerType: (value) => {
4094
+ pushParam$3(params, SERVER_TYPE_PARAM, value);
4095
+ return satisfiedBuilder;
4096
+ },
4097
+ withLocation: (value) => {
4098
+ pushParam$3(params, LOCATION_PARAM, value);
4099
+ return satisfiedBuilder;
4100
+ },
4101
+ withImage: (value) => {
4102
+ pushParam$3(params, IMAGE_PARAM, value);
4103
+ return satisfiedBuilder;
4104
+ },
4105
+ withSshKeys: (value) => {
4106
+ pushParam$3(params, SSH_KEYS_PARAM, value);
4107
+ return satisfiedBuilder;
4108
+ },
4109
+ withUserData: (value) => {
4110
+ pushParam$3(params, USER_DATA_PARAM, value);
4111
+ return satisfiedBuilder;
4112
+ },
4113
+ build: () => inner.build()
4114
+ };
4115
+ return satisfiedBuilder;
4116
+ };
4117
+ _HetznerServer.create = (config) => {
4118
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withServerType(config.serverType).withLocation(config.location).withImage(config.image);
4119
+ if (config.description) b.withDescription(config.description);
4120
+ if (config.sshKeys && config.sshKeys.length > 0) b.withSshKeys(config.sshKeys);
4121
+ if (config.userData) b.withUserData(config.userData);
4122
+ return b.build();
4123
+ };
4124
+ })(HetznerServer || (HetznerServer = {}));
4125
+
4126
+ //#endregion
4127
+ //#region src/fractal/component/network_and_compute/paas/container_platform.ts
4128
+ const CONTAINER_PLATFORM_TYPE_NAME = "ContainerPlatform";
4129
+ function buildId$4(id) {
4130
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
4131
+ }
4132
+ function buildVersion$4(major, minor, patch) {
4133
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
4134
+ }
4135
+ function buildContainerPlatformType() {
4136
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.PaaS).withName(PascalCaseString$1.getBuilder().withValue(CONTAINER_PLATFORM_TYPE_NAME).build()).build();
4137
+ }
4138
+ function makeContainerPlatformNode(platform, workloadNodes) {
4139
+ const platformDep = { id: platform.id };
4140
+ return {
4141
+ platform,
4142
+ workloads: workloadNodes.map((w) => ({
4143
+ ...w,
4144
+ component: {
4145
+ ...w.component,
4146
+ dependencies: [...w.component.dependencies, platformDep]
4147
+ }
4148
+ })),
4149
+ withWorkloads: (newWorkloads) => makeContainerPlatformNode(platform, newWorkloads)
4150
+ };
4151
+ }
4152
+ let ContainerPlatform;
4153
+ (function(_ContainerPlatform) {
4154
+ const getBuilder = _ContainerPlatform.getBuilder = () => {
4155
+ const params = getParametersInstance();
4156
+ const inner = getBlueprintComponentBuilder().withType(buildContainerPlatformType()).withParameters(params);
4157
+ const builder = {
4158
+ withId: (id) => {
4159
+ inner.withId(buildId$4(id));
4160
+ return builder;
4161
+ },
4162
+ withVersion: (major, minor, patch) => {
4163
+ inner.withVersion(buildVersion$4(major, minor, patch));
4164
+ return builder;
4165
+ },
4166
+ withDisplayName: (displayName) => {
4167
+ inner.withDisplayName(displayName);
4168
+ return builder;
4169
+ },
4170
+ withDescription: (description) => {
4171
+ inner.withDescription(description);
4172
+ return builder;
4173
+ },
4174
+ build: () => inner.build()
4175
+ };
4176
+ return builder;
4177
+ };
4178
+ _ContainerPlatform.create = (config) => {
4179
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
4180
+ if (config.description) b.withDescription(config.description);
4181
+ return makeContainerPlatformNode(b.build(), []);
4182
+ };
4183
+ })(ContainerPlatform || (ContainerPlatform = {}));
4184
+
4185
+ //#endregion
4186
+ //#region src/fractal/component/custom_workloads/caas/workload.ts
4187
+ const WORKLOAD_TYPE_NAME = "Workload";
4188
+ const CONTAINER_IMAGE_PARAM = "containerImage";
4189
+ const CONTAINER_PORT_PARAM = "containerPort";
4190
+ const CONTAINER_NAME_PARAM = "containerName";
4191
+ const CPU_PARAM = "cpu";
4192
+ const MEMORY_PARAM = "memory";
4193
+ const DESIRED_COUNT_PARAM = "desiredCount";
4194
+ function buildId$3(id) {
4195
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
4196
+ }
4197
+ function buildVersion$3(major, minor, patch) {
4198
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
4199
+ }
4200
+ function buildWorkloadType() {
4201
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.CustomWorkloads).withServiceDeliveryModel(ServiceDeliveryModel$1.CaaS).withName(PascalCaseString$1.getBuilder().withValue(WORKLOAD_TYPE_NAME).build()).build();
4202
+ }
4203
+ function pushParam$2(params, key, value) {
4204
+ params.push(key, value);
4205
+ }
4206
+ function buildLinkParams(fromPort, toPort, protocol) {
4207
+ const p = getParametersInstance();
4208
+ p.push("fromPort", fromPort);
4209
+ if (toPort !== void 0) p.push("toPort", toPort);
4210
+ if (protocol) p.push("protocol", protocol);
4211
+ return p;
4212
+ }
4213
+ function makeWorkloadNode(component) {
4214
+ return {
4215
+ component,
4216
+ components: [component],
4217
+ withLinks: (links) => {
4218
+ const portLinks = links.map((l) => getLinkBuilder().withId(l.target.component.id).withType(buildWorkloadType()).withParameters(buildLinkParams(l.fromPort, l.toPort, l.protocol)).build());
4219
+ return makeWorkloadNode({
4220
+ ...component,
4221
+ links: [...component.links, ...portLinks]
4222
+ });
4223
+ },
4224
+ withSecurityGroups: (sgs) => {
4225
+ const sgLinks = sgs.map((sg) => getLinkBuilder().withId(sg.id).withType(sg.type).withParameters(getParametersInstance()).build());
4226
+ return makeWorkloadNode({
4227
+ ...component,
4228
+ links: [...component.links, ...sgLinks]
4229
+ });
4230
+ }
4231
+ };
4232
+ }
4233
+ let Workload;
4234
+ (function(_Workload) {
4235
+ const getBuilder = _Workload.getBuilder = () => {
4236
+ const params = getParametersInstance();
4237
+ const inner = getBlueprintComponentBuilder().withType(buildWorkloadType()).withParameters(params);
4238
+ const builder = {
4239
+ withId: (id) => {
4240
+ inner.withId(buildId$3(id));
4241
+ return builder;
4242
+ },
4243
+ withVersion: (major, minor, patch) => {
4244
+ inner.withVersion(buildVersion$3(major, minor, patch));
4245
+ return builder;
4246
+ },
4247
+ withDisplayName: (displayName) => {
4248
+ inner.withDisplayName(displayName);
4249
+ return builder;
4250
+ },
4251
+ withDescription: (description) => {
4252
+ inner.withDescription(description);
4253
+ return builder;
4254
+ },
4255
+ withContainerImage: (image) => {
4256
+ pushParam$2(params, CONTAINER_IMAGE_PARAM, image);
4257
+ return builder;
4258
+ },
4259
+ withContainerPort: (port) => {
4260
+ pushParam$2(params, CONTAINER_PORT_PARAM, port);
4261
+ return builder;
4262
+ },
4263
+ withContainerName: (name) => {
4264
+ pushParam$2(params, CONTAINER_NAME_PARAM, name);
4265
+ return builder;
4266
+ },
4267
+ withCpu: (cpu) => {
4268
+ pushParam$2(params, CPU_PARAM, cpu);
4269
+ return builder;
4270
+ },
4271
+ withMemory: (memory) => {
4272
+ pushParam$2(params, MEMORY_PARAM, memory);
4273
+ return builder;
4274
+ },
4275
+ withDesiredCount: (count) => {
4276
+ pushParam$2(params, DESIRED_COUNT_PARAM, count);
4277
+ return builder;
4278
+ },
4279
+ build: () => inner.build()
4280
+ };
4281
+ return builder;
4282
+ };
4283
+ _Workload.create = (config) => {
4284
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withContainerImage(config.containerImage);
4285
+ if (config.description) b.withDescription(config.description);
4286
+ if (config.containerPort !== void 0) b.withContainerPort(config.containerPort);
4287
+ if (config.containerName) b.withContainerName(config.containerName);
4288
+ if (config.cpu) b.withCpu(config.cpu);
4289
+ if (config.memory) b.withMemory(config.memory);
4290
+ if (config.desiredCount !== void 0) b.withDesiredCount(config.desiredCount);
4291
+ return makeWorkloadNode(b.build());
4292
+ };
4293
+ })(Workload || (Workload = {}));
4294
+
4295
+ //#endregion
4296
+ //#region src/live_system/component/network_and_compute/paas/ecs_cluster.ts
4297
+ const ECS_CLUSTER_TYPE_NAME = "ECS";
4298
+ function buildId$2(id) {
4299
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
4300
+ }
4301
+ function buildVersion$2(major, minor, patch) {
4302
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
4303
+ }
4304
+ function buildAwsEcsClusterType() {
4305
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.PaaS).withName(PascalCaseString$1.getBuilder().withValue(ECS_CLUSTER_TYPE_NAME).build()).build();
4306
+ }
4307
+ let AwsEcsCluster;
4308
+ (function(_AwsEcsCluster) {
4309
+ const getBuilder = _AwsEcsCluster.getBuilder = () => {
4310
+ const params = getParametersInstance();
4311
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsEcsClusterType()).withParameters(params).withProvider("AWS");
4312
+ const builder = {
4313
+ withId: (id) => {
4314
+ inner.withId(buildId$2(id));
4315
+ return builder;
4316
+ },
4317
+ withVersion: (major, minor, patch) => {
4318
+ inner.withVersion(buildVersion$2(major, minor, patch));
4319
+ return builder;
4320
+ },
4321
+ withDisplayName: (displayName) => {
4322
+ inner.withDisplayName(displayName);
4323
+ return builder;
4324
+ },
4325
+ withDescription: (description) => {
4326
+ inner.withDescription(description);
4327
+ return builder;
4328
+ },
4329
+ build: () => inner.build()
4330
+ };
4331
+ return builder;
4332
+ };
4333
+ _AwsEcsCluster.satisfy = (platform) => {
4334
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsEcsClusterType()).withParameters(getParametersInstance()).withProvider("AWS").withId(buildId$2(platform.id.toString())).withVersion(buildVersion$2(platform.version.major, platform.version.minor, platform.version.patch)).withDisplayName(platform.displayName);
4335
+ if (platform.description) inner.withDescription(platform.description);
4336
+ return { build: () => inner.build() };
4337
+ };
4338
+ _AwsEcsCluster.create = (config) => {
4339
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
4340
+ if (config.description) b.withDescription(config.description);
4341
+ return b.build();
4342
+ };
4343
+ })(AwsEcsCluster || (AwsEcsCluster = {}));
4344
+
4345
+ //#endregion
4346
+ //#region src/live_system/component/network_and_compute/paas/ecs_task_definition.ts
4347
+ const ECS_TASK_DEF_TYPE_NAME = "ECSTaskDefinition";
4348
+ const NETWORK_MODE_PARAM = "networkMode";
4349
+ const EXECUTION_ROLE_ARN_PARAM = "executionRoleArn";
4350
+ const TASK_ROLE_ARN_PARAM = "taskRoleArn";
4351
+ function buildId$1(id) {
4352
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
4353
+ }
4354
+ function buildVersion$1(major, minor, patch) {
4355
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
4356
+ }
4357
+ function buildAwsEcsTaskDefType() {
4358
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.PaaS).withName(PascalCaseString$1.getBuilder().withValue(ECS_TASK_DEF_TYPE_NAME).build()).build();
4359
+ }
4360
+ function pushParam$1(params, key, value) {
4361
+ params.push(key, value);
4362
+ }
4363
+ let AwsEcsTaskDefinition;
4364
+ (function(_AwsEcsTaskDefinition) {
4365
+ const getBuilder = _AwsEcsTaskDefinition.getBuilder = () => {
4366
+ const params = getParametersInstance();
4367
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsEcsTaskDefType()).withParameters(params).withProvider("AWS");
4368
+ const builder = {
4369
+ withId: (id) => {
4370
+ inner.withId(buildId$1(id));
4371
+ return builder;
4372
+ },
4373
+ withVersion: (major, minor, patch) => {
4374
+ inner.withVersion(buildVersion$1(major, minor, patch));
4375
+ return builder;
4376
+ },
4377
+ withDisplayName: (displayName) => {
4378
+ inner.withDisplayName(displayName);
4379
+ return builder;
4380
+ },
4381
+ withDescription: (description) => {
4382
+ inner.withDescription(description);
4383
+ return builder;
4384
+ },
4385
+ withContainerImage: (image) => {
4386
+ pushParam$1(params, CONTAINER_IMAGE_PARAM, image);
4387
+ return builder;
4388
+ },
4389
+ withContainerPort: (port) => {
4390
+ pushParam$1(params, CONTAINER_PORT_PARAM, port);
4391
+ return builder;
4392
+ },
4393
+ withContainerName: (name) => {
4394
+ pushParam$1(params, CONTAINER_NAME_PARAM, name);
4395
+ return builder;
4396
+ },
4397
+ withCpu: (cpu) => {
4398
+ pushParam$1(params, CPU_PARAM, cpu);
4399
+ return builder;
4400
+ },
4401
+ withMemory: (memory) => {
4402
+ pushParam$1(params, MEMORY_PARAM, memory);
4403
+ return builder;
4404
+ },
4405
+ withNetworkMode: (mode) => {
4406
+ pushParam$1(params, NETWORK_MODE_PARAM, mode);
4407
+ return builder;
4408
+ },
4409
+ withExecutionRoleArn: (arn) => {
4410
+ pushParam$1(params, EXECUTION_ROLE_ARN_PARAM, arn);
4411
+ return builder;
4412
+ },
4413
+ withTaskRoleArn: (arn) => {
4414
+ pushParam$1(params, TASK_ROLE_ARN_PARAM, arn);
4415
+ return builder;
4416
+ },
4417
+ build: () => inner.build()
4418
+ };
4419
+ return builder;
4420
+ };
4421
+ _AwsEcsTaskDefinition.satisfy = (workload) => {
4422
+ const params = getParametersInstance();
4423
+ const taskId = `${workload.id.toString()}-task`;
4424
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsEcsTaskDefType()).withParameters(params).withProvider("AWS").withId(buildId$1(taskId)).withVersion(buildVersion$1(workload.version.major, workload.version.minor, workload.version.patch)).withDisplayName(workload.displayName);
4425
+ if (workload.description) inner.withDescription(workload.description);
4426
+ for (const key of [
4427
+ CONTAINER_IMAGE_PARAM,
4428
+ CONTAINER_PORT_PARAM,
4429
+ CONTAINER_NAME_PARAM,
4430
+ CPU_PARAM,
4431
+ MEMORY_PARAM
4432
+ ]) {
4433
+ const v = workload.parameters.getOptionalFieldByName(key);
4434
+ if (v !== null) pushParam$1(params, key, v);
4435
+ }
4436
+ const satisfiedBuilder = {
4437
+ withNetworkMode: (mode) => {
4438
+ pushParam$1(params, NETWORK_MODE_PARAM, mode);
4439
+ return satisfiedBuilder;
4440
+ },
4441
+ withExecutionRoleArn: (arn) => {
4442
+ pushParam$1(params, EXECUTION_ROLE_ARN_PARAM, arn);
4443
+ return satisfiedBuilder;
4444
+ },
4445
+ withTaskRoleArn: (arn) => {
4446
+ pushParam$1(params, TASK_ROLE_ARN_PARAM, arn);
4447
+ return satisfiedBuilder;
4448
+ },
4449
+ build: () => inner.build()
4450
+ };
4451
+ return satisfiedBuilder;
4452
+ };
4453
+ _AwsEcsTaskDefinition.create = (config) => {
4454
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName).withContainerImage(config.containerImage);
4455
+ if (config.description) b.withDescription(config.description);
4456
+ if (config.containerPort !== void 0) b.withContainerPort(config.containerPort);
4457
+ if (config.containerName) b.withContainerName(config.containerName);
4458
+ if (config.cpu) b.withCpu(config.cpu);
4459
+ if (config.memory) b.withMemory(config.memory);
4460
+ if (config.networkMode) b.withNetworkMode(config.networkMode);
4461
+ if (config.executionRoleArn) b.withExecutionRoleArn(config.executionRoleArn);
4462
+ if (config.taskRoleArn) b.withTaskRoleArn(config.taskRoleArn);
4463
+ return b.build();
4464
+ };
4465
+ })(AwsEcsTaskDefinition || (AwsEcsTaskDefinition = {}));
4466
+
4467
+ //#endregion
4468
+ //#region src/live_system/component/network_and_compute/paas/ecs_service.ts
4469
+ const ECS_SERVICE_TYPE_NAME = "ECSService";
4470
+ const LAUNCH_TYPE_PARAM = "launchType";
4471
+ const ASSIGN_PUBLIC_IP_PARAM = "assignPublicIp";
4472
+ function buildId(id) {
4473
+ return getComponentIdBuilder().withValue(KebabCaseString$1.getBuilder().withValue(id).build()).build();
4474
+ }
4475
+ function buildVersion(major, minor, patch) {
4476
+ return getVersionBuilder().withMajor(major).withMinor(minor).withPatch(patch).build();
4477
+ }
4478
+ function buildAwsEcsServiceType() {
4479
+ return getBlueprintComponentTypeBuilder().withInfrastructureDomain(InfrastructureDomain$1.NetworkAndCompute).withServiceDeliveryModel(ServiceDeliveryModel$1.PaaS).withName(PascalCaseString$1.getBuilder().withValue(ECS_SERVICE_TYPE_NAME).build()).build();
4480
+ }
4481
+ function pushParam(params, key, value) {
4482
+ params.push(key, value);
4483
+ }
4484
+ let AwsEcsService;
4485
+ (function(_AwsEcsService) {
4486
+ const getBuilder = _AwsEcsService.getBuilder = () => {
4487
+ const params = getParametersInstance();
4488
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsEcsServiceType()).withParameters(params).withProvider("AWS");
4489
+ const builder = {
4490
+ withId: (id) => {
4491
+ inner.withId(buildId(id));
4492
+ return builder;
4493
+ },
4494
+ withVersion: (major, minor, patch) => {
4495
+ inner.withVersion(buildVersion(major, minor, patch));
4496
+ return builder;
4497
+ },
4498
+ withDisplayName: (displayName) => {
4499
+ inner.withDisplayName(displayName);
4500
+ return builder;
4501
+ },
4502
+ withDescription: (description) => {
4503
+ inner.withDescription(description);
4504
+ return builder;
4505
+ },
4506
+ withDesiredCount: (count) => {
4507
+ pushParam(params, DESIRED_COUNT_PARAM, count);
4508
+ return builder;
4509
+ },
4510
+ withLaunchType: (type) => {
4511
+ pushParam(params, LAUNCH_TYPE_PARAM, type);
4512
+ return builder;
4513
+ },
4514
+ withAssignPublicIp: (assign) => {
4515
+ pushParam(params, ASSIGN_PUBLIC_IP_PARAM, assign);
4516
+ return builder;
4517
+ },
4518
+ build: () => inner.build()
4519
+ };
4520
+ return builder;
4521
+ };
4522
+ _AwsEcsService.satisfy = (workload) => {
4523
+ const params = getParametersInstance();
4524
+ const inner = getLiveSystemComponentBuilder().withType(buildAwsEcsServiceType()).withParameters(params).withProvider("AWS").withId(buildId(workload.id.toString())).withVersion(buildVersion(workload.version.major, workload.version.minor, workload.version.patch)).withDisplayName(workload.displayName).withDependencies(workload.dependencies).withLinks(workload.links);
4525
+ if (workload.description) inner.withDescription(workload.description);
4526
+ const desiredCount = workload.parameters.getOptionalFieldByName(DESIRED_COUNT_PARAM);
4527
+ if (desiredCount !== null) pushParam(params, DESIRED_COUNT_PARAM, desiredCount);
4528
+ const satisfiedBuilder = {
4529
+ withLaunchType: (type) => {
4530
+ pushParam(params, LAUNCH_TYPE_PARAM, type);
4531
+ return satisfiedBuilder;
4532
+ },
4533
+ withAssignPublicIp: (assign) => {
4534
+ pushParam(params, ASSIGN_PUBLIC_IP_PARAM, assign);
4535
+ return satisfiedBuilder;
4536
+ },
4537
+ build: () => inner.build()
4538
+ };
4539
+ return satisfiedBuilder;
4540
+ };
4541
+ _AwsEcsService.create = (config) => {
4542
+ const b = getBuilder().withId(config.id).withVersion(config.version.major, config.version.minor, config.version.patch).withDisplayName(config.displayName);
4543
+ if (config.description) b.withDescription(config.description);
4544
+ if (config.desiredCount !== void 0) b.withDesiredCount(config.desiredCount);
4545
+ if (config.launchType) b.withLaunchType(config.launchType);
4546
+ if (config.assignPublicIp !== void 0) b.withAssignPublicIp(config.assignPublicIp);
4547
+ return b.build();
4548
+ };
4549
+ })(AwsEcsService || (AwsEcsService = {}));
4550
+
2041
4551
  //#endregion
2042
4552
  //#region src/index.ts
2043
4553
  const BoundedContext = BoundedContext$1;
@@ -2055,16 +4565,190 @@ const Environment = Environment$1;
2055
4565
  const LiveSystem = LiveSystem$1;
2056
4566
 
2057
4567
  //#endregion
4568
+ Object.defineProperty(exports, 'AwsEcsCluster', {
4569
+ enumerable: true,
4570
+ get: function () {
4571
+ return AwsEcsCluster;
4572
+ }
4573
+ });
4574
+ Object.defineProperty(exports, 'AwsEcsService', {
4575
+ enumerable: true,
4576
+ get: function () {
4577
+ return AwsEcsService;
4578
+ }
4579
+ });
4580
+ Object.defineProperty(exports, 'AwsEcsTaskDefinition', {
4581
+ enumerable: true,
4582
+ get: function () {
4583
+ return AwsEcsTaskDefinition;
4584
+ }
4585
+ });
4586
+ Object.defineProperty(exports, 'AwsSecurityGroup', {
4587
+ enumerable: true,
4588
+ get: function () {
4589
+ return AwsSecurityGroup;
4590
+ }
4591
+ });
4592
+ Object.defineProperty(exports, 'AwsSubnet', {
4593
+ enumerable: true,
4594
+ get: function () {
4595
+ return AwsSubnet;
4596
+ }
4597
+ });
4598
+ Object.defineProperty(exports, 'AwsVpc', {
4599
+ enumerable: true,
4600
+ get: function () {
4601
+ return AwsVpc;
4602
+ }
4603
+ });
4604
+ Object.defineProperty(exports, 'AzureNsg', {
4605
+ enumerable: true,
4606
+ get: function () {
4607
+ return AzureNsg;
4608
+ }
4609
+ });
4610
+ Object.defineProperty(exports, 'AzureSubnet', {
4611
+ enumerable: true,
4612
+ get: function () {
4613
+ return AzureSubnet;
4614
+ }
4615
+ });
4616
+ Object.defineProperty(exports, 'AzureVm', {
4617
+ enumerable: true,
4618
+ get: function () {
4619
+ return AzureVm;
4620
+ }
4621
+ });
4622
+ Object.defineProperty(exports, 'AzureVnet', {
4623
+ enumerable: true,
4624
+ get: function () {
4625
+ return AzureVnet;
4626
+ }
4627
+ });
2058
4628
  exports.BoundedContext = BoundedContext;
4629
+ Object.defineProperty(exports, 'ContainerPlatform', {
4630
+ enumerable: true,
4631
+ get: function () {
4632
+ return ContainerPlatform;
4633
+ }
4634
+ });
4635
+ Object.defineProperty(exports, 'Ec2Instance', {
4636
+ enumerable: true,
4637
+ get: function () {
4638
+ return Ec2Instance;
4639
+ }
4640
+ });
2059
4641
  exports.Environment = Environment;
2060
4642
  exports.Fractal = Fractal;
4643
+ Object.defineProperty(exports, 'GcpFirewall', {
4644
+ enumerable: true,
4645
+ get: function () {
4646
+ return GcpFirewall;
4647
+ }
4648
+ });
4649
+ Object.defineProperty(exports, 'GcpSubnet', {
4650
+ enumerable: true,
4651
+ get: function () {
4652
+ return GcpSubnet;
4653
+ }
4654
+ });
4655
+ Object.defineProperty(exports, 'GcpVm', {
4656
+ enumerable: true,
4657
+ get: function () {
4658
+ return GcpVm;
4659
+ }
4660
+ });
4661
+ Object.defineProperty(exports, 'GcpVpc', {
4662
+ enumerable: true,
4663
+ get: function () {
4664
+ return GcpVpc;
4665
+ }
4666
+ });
4667
+ Object.defineProperty(exports, 'HetznerFirewall', {
4668
+ enumerable: true,
4669
+ get: function () {
4670
+ return HetznerFirewall;
4671
+ }
4672
+ });
4673
+ Object.defineProperty(exports, 'HetznerNetwork', {
4674
+ enumerable: true,
4675
+ get: function () {
4676
+ return HetznerNetwork;
4677
+ }
4678
+ });
4679
+ Object.defineProperty(exports, 'HetznerServer', {
4680
+ enumerable: true,
4681
+ get: function () {
4682
+ return HetznerServer;
4683
+ }
4684
+ });
4685
+ Object.defineProperty(exports, 'HetznerSubnet', {
4686
+ enumerable: true,
4687
+ get: function () {
4688
+ return HetznerSubnet;
4689
+ }
4690
+ });
2061
4691
  exports.InfrastructureDomain = InfrastructureDomain;
2062
4692
  exports.KebabCaseString = KebabCaseString;
2063
4693
  exports.LiveSystem = LiveSystem;
4694
+ Object.defineProperty(exports, 'OciInstance', {
4695
+ enumerable: true,
4696
+ get: function () {
4697
+ return OciInstance;
4698
+ }
4699
+ });
4700
+ Object.defineProperty(exports, 'OciSecurityList', {
4701
+ enumerable: true,
4702
+ get: function () {
4703
+ return OciSecurityList;
4704
+ }
4705
+ });
4706
+ Object.defineProperty(exports, 'OciSubnet', {
4707
+ enumerable: true,
4708
+ get: function () {
4709
+ return OciSubnet;
4710
+ }
4711
+ });
4712
+ Object.defineProperty(exports, 'OciVcn', {
4713
+ enumerable: true,
4714
+ get: function () {
4715
+ return OciVcn;
4716
+ }
4717
+ });
2064
4718
  exports.OwnerId = OwnerId;
2065
4719
  exports.OwnerType = OwnerType;
2066
4720
  exports.PascalCaseString = PascalCaseString;
4721
+ Object.defineProperty(exports, 'SecurityGroup', {
4722
+ enumerable: true,
4723
+ get: function () {
4724
+ return SecurityGroup;
4725
+ }
4726
+ });
2067
4727
  exports.ServiceAccountCredentials = ServiceAccountCredentials;
2068
4728
  exports.ServiceAccountId = ServiceAccountId;
2069
4729
  exports.ServiceDeliveryModel = ServiceDeliveryModel;
2070
- exports.Version = Version;
4730
+ Object.defineProperty(exports, 'Subnet', {
4731
+ enumerable: true,
4732
+ get: function () {
4733
+ return Subnet;
4734
+ }
4735
+ });
4736
+ exports.Version = Version;
4737
+ Object.defineProperty(exports, 'VirtualMachine', {
4738
+ enumerable: true,
4739
+ get: function () {
4740
+ return VirtualMachine;
4741
+ }
4742
+ });
4743
+ Object.defineProperty(exports, 'VirtualNetwork', {
4744
+ enumerable: true,
4745
+ get: function () {
4746
+ return VirtualNetwork;
4747
+ }
4748
+ });
4749
+ Object.defineProperty(exports, 'Workload', {
4750
+ enumerable: true,
4751
+ get: function () {
4752
+ return Workload;
4753
+ }
4754
+ });