diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_application.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_application.rs index 2319dd7dc..b3b2f086e 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_application.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_application.rs @@ -38,6 +38,5 @@ impl get_access_application::Guest for Component { name: hashmap.remove("name").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_identity_provider.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_identity_provider.rs index 154f6c012..74b222b6d 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_identity_provider.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_access_identity_provider.rs @@ -35,6 +35,5 @@ impl get_access_identity_provider::Guest for Component { type_: hashmap.remove("type").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_account_roles.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_account_roles.rs index 11ec0e540..4692abbbe 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_account_roles.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_account_roles.rs @@ -29,6 +29,5 @@ impl get_account_roles::Guest for Component { id: hashmap.remove("id").unwrap(), roles: hashmap.remove("roles").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_accounts.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_accounts.rs index 0250399e5..9dfa2bd57 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_accounts.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_accounts.rs @@ -29,6 +29,5 @@ impl get_accounts::Guest for Component { id: hashmap.remove("id").unwrap(), name: hashmap.remove("name").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_api_token_permission_groups.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_api_token_permission_groups.rs index 8def89fba..772edcccd 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_api_token_permission_groups.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_api_token_permission_groups.rs @@ -33,6 +33,5 @@ impl get_api_token_permission_groups::Guest for Component { user: hashmap.remove("user").unwrap(), zone: hashmap.remove("zone").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_dcv_delegation.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_dcv_delegation.rs index d84a088fa..fdf3fdf39 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_dcv_delegation.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_dcv_delegation.rs @@ -29,6 +29,5 @@ impl get_dcv_delegation::Guest for Component { id: hashmap.remove("id").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_device_posture_rules.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_device_posture_rules.rs index d1e851c21..094142365 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_device_posture_rules.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_device_posture_rules.rs @@ -35,6 +35,5 @@ impl get_device_posture_rules::Guest for Component { rules: hashmap.remove("rules").unwrap(), type_: hashmap.remove("type").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_devices.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_devices.rs index 0d88d5ed4..dcfa94cc6 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_devices.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_devices.rs @@ -29,6 +29,5 @@ impl get_devices::Guest for Component { devices: hashmap.remove("devices").unwrap(), id: hashmap.remove("id").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_dlp_datasets.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_dlp_datasets.rs index ed9a1d963..095c6f921 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_dlp_datasets.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_dlp_datasets.rs @@ -29,6 +29,5 @@ impl get_dlp_datasets::Guest for Component { datasets: hashmap.remove("datasets").unwrap(), id: hashmap.remove("id").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_app_types.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_app_types.rs index d141af604..a515897d3 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_app_types.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_app_types.rs @@ -29,6 +29,5 @@ impl get_gateway_app_types::Guest for Component { app_types: hashmap.remove("appTypes").unwrap(), id: hashmap.remove("id").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_categories.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_categories.rs index 9e3fef48f..92e29940b 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_categories.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_gateway_categories.rs @@ -29,6 +29,5 @@ impl get_gateway_categories::Guest for Component { categories: hashmap.remove("categories").unwrap(), id: hashmap.remove("id").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_infrastructure_access_targets.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_infrastructure_access_targets.rs index 510b7cde9..2e19ae068 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_infrastructure_access_targets.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_infrastructure_access_targets.rs @@ -50,6 +50,5 @@ impl get_infrastructure_access_targets::Guest for Component { targets: hashmap.remove("targets").unwrap(), virtual_network_id: hashmap.remove("virtualNetworkId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_ip_ranges.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_ip_ranges.rs index 7b8a91f08..b06ca33ce 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_ip_ranges.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_ip_ranges.rs @@ -33,6 +33,5 @@ impl get_ip_ranges::Guest for Component { ipv4_cidr_blocks: hashmap.remove("ipv4CidrBlocks").unwrap(), ipv6_cidr_blocks: hashmap.remove("ipv6CidrBlocks").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_list.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_list.rs index 126cb23ef..159549e57 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_list.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_list.rs @@ -36,6 +36,5 @@ impl get_list::Guest for Component { name: hashmap.remove("name").unwrap(), numitems: hashmap.remove("numitems").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_lists.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_lists.rs index c5b334faa..a0ac04078 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_lists.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_lists.rs @@ -29,6 +29,5 @@ impl get_lists::Guest for Component { id: hashmap.remove("id").unwrap(), lists: hashmap.remove("lists").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_load_balancer_pools.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_load_balancer_pools.rs index c1160558b..b6fef1efb 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_load_balancer_pools.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_load_balancer_pools.rs @@ -33,6 +33,5 @@ impl get_load_balancer_pools::Guest for Component { id: hashmap.remove("id").unwrap(), pools: hashmap.remove("pools").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_certificate.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_certificate.rs index c08c13404..ae30db70a 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_certificate.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_certificate.rs @@ -35,6 +35,5 @@ impl get_origin_ca_certificate::Guest for Component { request_type: hashmap.remove("requestType").unwrap(), revoked_at: hashmap.remove("revokedAt").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_root_certificate.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_root_certificate.rs index a975e3e0e..9382f1c48 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_root_certificate.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_origin_ca_root_certificate.rs @@ -29,6 +29,5 @@ impl get_origin_ca_root_certificate::Guest for Component { cert_pem: hashmap.remove("certPem").unwrap(), id: hashmap.remove("id").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_record.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_record.rs index 5bb56ce5f..d391462cb 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_record.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_record.rs @@ -47,6 +47,5 @@ impl get_record::Guest for Component { value: hashmap.remove("value").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_rulesets.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_rulesets.rs index b55c2443e..4849b0eda 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_rulesets.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_rulesets.rs @@ -38,6 +38,5 @@ impl get_rulesets::Guest for Component { rulesets: hashmap.remove("rulesets").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel.rs index 906629c78..0bed13299 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel.rs @@ -39,6 +39,5 @@ impl get_tunnel::Guest for Component { status: hashmap.remove("status").unwrap(), tunnel_type: hashmap.remove("tunnelType").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel_virtual_network.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel_virtual_network.rs index 7ad8530cf..76d6aa4ba 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel_virtual_network.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_tunnel_virtual_network.rs @@ -34,6 +34,5 @@ impl get_tunnel_virtual_network::Guest for Component { is_default: hashmap.remove("isDefault").unwrap(), name: hashmap.remove("name").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_user.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_user.rs index 16142fbfc..524d8a20c 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_user.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_user.rs @@ -27,6 +27,5 @@ impl get_user::Guest for Component { id: hashmap.remove("id").unwrap(), username: hashmap.remove("username").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_application.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_application.rs index f5ad05dae..60aede2de 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_application.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_application.rs @@ -38,6 +38,5 @@ impl get_zero_trust_access_application::Guest for Component { name: hashmap.remove("name").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_identity_provider.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_identity_provider.rs index 0bc45cda3..8ab424f6e 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_identity_provider.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_access_identity_provider.rs @@ -35,6 +35,5 @@ impl get_zero_trust_access_identity_provider::Guest for Component { type_: hashmap.remove("type").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_infrastructure_access_targets.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_infrastructure_access_targets.rs index ea55a7403..627b6fb59 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_infrastructure_access_targets.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_infrastructure_access_targets.rs @@ -50,6 +50,5 @@ impl get_zero_trust_infrastructure_access_targets::Guest for Component { targets: hashmap.remove("targets").unwrap(), virtual_network_id: hashmap.remove("virtualNetworkId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_cloudflared.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_cloudflared.rs index de6851ccd..6c3203407 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_cloudflared.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_cloudflared.rs @@ -39,6 +39,5 @@ impl get_zero_trust_tunnel_cloudflared::Guest for Component { status: hashmap.remove("status").unwrap(), tunnel_type: hashmap.remove("tunnelType").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_virtual_network.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_virtual_network.rs index 7e4a44325..b1cf59ab6 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_virtual_network.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zero_trust_tunnel_virtual_network.rs @@ -34,6 +34,5 @@ impl get_zero_trust_tunnel_virtual_network::Guest for Component { is_default: hashmap.remove("isDefault").unwrap(), name: hashmap.remove("name").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone.rs index fac609b7b..a094ffc4e 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone.rs @@ -43,6 +43,5 @@ impl get_zone::Guest for Component { vanity_name_servers: hashmap.remove("vanityNameServers").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_cache_reserve.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_cache_reserve.rs index e9b84c84e..6e2f3d851 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_cache_reserve.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_cache_reserve.rs @@ -29,6 +29,5 @@ impl get_zone_cache_reserve::Guest for Component { id: hashmap.remove("id").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_dnssec.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_dnssec.rs index d16f14804..e02c6bd10 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_dnssec.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zone_dnssec.rs @@ -47,6 +47,5 @@ impl get_zone_dnssec::Guest for Component { status: hashmap.remove("status").unwrap(), zone_id: hashmap.remove("zoneId").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zones.rs b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zones.rs index f4ae424cd..c4f8346f4 100644 --- a/providers/pulumi_wasm_provider_cloudflare/src/function/get_zones.rs +++ b/providers/pulumi_wasm_provider_cloudflare/src/function/get_zones.rs @@ -29,6 +29,5 @@ impl get_zones::Guest for Component { id: hashmap.remove("id").unwrap(), zones: hashmap.remove("zones").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_application.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_application.rs index d1773e35f..ab29ef6ff 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_application.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_application.rs @@ -1,7 +1,7 @@ //! Use this data source to lookup a single [Access Application](https://developers.cloudflare.com/cloudflare-one/applications/) //! - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetAccessApplicationArgs { /// The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_identity_provider.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_identity_provider.rs index c6964985d..c9b75410d 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_identity_provider.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_access_identity_provider.rs @@ -28,7 +28,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetAccessIdentityProviderArgs { /// The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_account_roles.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_account_roles.rs index f7c7cf6bd..bce1d7cc5 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_account_roles.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_account_roles.rs @@ -3,7 +3,7 @@ //! ## Example Usage //! - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetAccountRolesArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_accounts.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_accounts.rs index 459bfb85a..cf080fcab 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_accounts.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_accounts.rs @@ -13,7 +13,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetAccountsArgs { /// The account name to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dcv_delegation.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dcv_delegation.rs index bb3977aea..44480e222 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dcv_delegation.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dcv_delegation.rs @@ -1,6 +1,6 @@ //! Use this data source to retrieve the DCV Delegation unique identifier for a zone. - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetDcvDelegationArgs { /// The zone identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_device_posture_rules.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_device_posture_rules.rs index 61e13e19b..a12b0f577 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_device_posture_rules.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_device_posture_rules.rs @@ -17,7 +17,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetDevicePostureRulesArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_devices.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_devices.rs index 808ba14fe..aa7f50669 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_devices.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_devices.rs @@ -15,7 +15,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetDevicesArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dlp_datasets.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dlp_datasets.rs index e1d914b6f..147756dbb 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dlp_datasets.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_dlp_datasets.rs @@ -15,7 +15,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetDlpDatasetsArgs { /// The account ID to fetch DLP Datasets from. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_app_types.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_app_types.rs index 97222e40c..989be4515 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_app_types.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_app_types.rs @@ -15,7 +15,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetGatewayAppTypesArgs { /// The account ID to fetch Gateway App Types from. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_categories.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_categories.rs index 73a73e1c0..de2ebe370 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_categories.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_gateway_categories.rs @@ -15,7 +15,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetGatewayCategoriesArgs { /// The account ID to fetch Gateway Categories from. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_infrastructure_access_targets.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_infrastructure_access_targets.rs index d49c4358a..48ff4f26d 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_infrastructure_access_targets.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_infrastructure_access_targets.rs @@ -17,7 +17,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetInfrastructureAccessTargetsArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_list.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_list.rs index 6c2f3aea2..d733a6b1c 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_list.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_list.rs @@ -16,7 +16,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetListArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_lists.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_lists.rs index 5b9f8b49d..98af19244 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_lists.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_lists.rs @@ -15,7 +15,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetListsArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_load_balancer_pools.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_load_balancer_pools.rs index 61f44bb37..c39e4d755 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_load_balancer_pools.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_load_balancer_pools.rs @@ -20,7 +20,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetLoadBalancerPoolsArgs { /// The account identifier to target for the datasource lookups. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_certificate.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_certificate.rs index 0ad28f749..7b740d2b9 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_certificate.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_certificate.rs @@ -13,7 +13,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetOriginCaCertificateArgs { /// The Origin CA Certificate unique identifier. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_root_certificate.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_root_certificate.rs index 1ba6afa76..c59461737 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_root_certificate.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_origin_ca_root_certificate.rs @@ -15,7 +15,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetOriginCaRootCertificateArgs { /// The name of the algorithm used when creating an Origin CA certificate. Available values: `rsa`, `ecc`. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_record.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_record.rs index 81ab22aa8..bb3839354 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_record.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_record.rs @@ -16,7 +16,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetRecordArgs { /// Content to filter record results on. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_rulesets.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_rulesets.rs index 5e6187b2b..54ed918bb 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_rulesets.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_rulesets.rs @@ -16,7 +16,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetRulesetsArgs { /// The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel.rs index a7362716d..1a4addeb3 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel.rs @@ -16,7 +16,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetTunnelArgs { /// The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.** diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel_virtual_network.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel_virtual_network.rs index ebad9b10b..09b590f70 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel_virtual_network.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_tunnel_virtual_network.rs @@ -16,7 +16,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetTunnelVirtualNetworkArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_application.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_application.rs index a6ec38894..1e0a60c71 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_application.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_application.rs @@ -1,6 +1,6 @@ //! Use this data source to lookup a single [Access Application](https://developers.cloudflare.com/cloudflare-one/applications/) - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZeroTrustAccessApplicationArgs { /// The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_identity_provider.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_identity_provider.rs index d4db88204..6f846d394 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_identity_provider.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_access_identity_provider.rs @@ -1,6 +1,6 @@ //! Use this data source to lookup a single [Access Identity Provider](https://developers.cloudflare.com/cloudflare-one/identity/idp-integration) by name. - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZeroTrustAccessIdentityProviderArgs { /// The account identifier to target for the resource. Must provide only one of `zone_id`, `account_id`. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_infrastructure_access_targets.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_infrastructure_access_targets.rs index 1aa0aa791..a8d15cb5d 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_infrastructure_access_targets.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_infrastructure_access_targets.rs @@ -17,7 +17,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZeroTrustInfrastructureAccessTargetsArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_cloudflared.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_cloudflared.rs index c849a24ed..8a37644aa 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_cloudflared.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_cloudflared.rs @@ -1,6 +1,6 @@ //! Use this datasource to lookup a tunnel in an account. - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZeroTrustTunnelCloudflaredArgs { /// The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.** diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_virtual_network.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_virtual_network.rs index 3e555516e..92a375732 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_virtual_network.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zero_trust_tunnel_virtual_network.rs @@ -1,6 +1,6 @@ //! Use this datasource to lookup a tunnel virtual network in an account. - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZeroTrustTunnelVirtualNetworkArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone.rs index 57f02dc32..702031382 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone.rs @@ -29,7 +29,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZoneArgs { /// The account identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_cache_reserve.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_cache_reserve.rs index 56438bf4e..2837d1a2c 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_cache_reserve.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_cache_reserve.rs @@ -16,7 +16,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZoneCacheReserveArgs { /// The zone identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_dnssec.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_dnssec.rs index a522bc6ef..6a20d6127 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_dnssec.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zone_dnssec.rs @@ -15,7 +15,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZoneDnssecArgs { /// The zone identifier to target for the resource. diff --git a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zones.rs b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zones.rs index c0e93a2e2..56a102c70 100644 --- a/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zones.rs +++ b/providers/pulumi_wasm_provider_cloudflare_rust/src/function/get_zones.rs @@ -1,7 +1,7 @@ //! Use this data source to look up Zone results for use in other resources. //! - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetZonesArgs { /// One or more values used to look up zone records. If more than one value is given all values must match in order to be included. diff --git a/providers/pulumi_wasm_provider_docker/src/function/get_logs.rs b/providers/pulumi_wasm_provider_docker/src/function/get_logs.rs index 5179707b7..b083a1ea9 100644 --- a/providers/pulumi_wasm_provider_docker/src/function/get_logs.rs +++ b/providers/pulumi_wasm_provider_docker/src/function/get_logs.rs @@ -59,6 +59,5 @@ impl get_logs::Guest for Component { timestamps: hashmap.remove("timestamps").unwrap(), until: hashmap.remove("until").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_docker/src/function/get_network.rs b/providers/pulumi_wasm_provider_docker/src/function/get_network.rs index 091be6527..5560623ce 100644 --- a/providers/pulumi_wasm_provider_docker/src/function/get_network.rs +++ b/providers/pulumi_wasm_provider_docker/src/function/get_network.rs @@ -37,6 +37,5 @@ impl get_network::Guest for Component { options: hashmap.remove("options").unwrap(), scope: hashmap.remove("scope").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_docker/src/function/get_plugin.rs b/providers/pulumi_wasm_provider_docker/src/function/get_plugin.rs index 6c6eb71d4..cc3f86bf9 100644 --- a/providers/pulumi_wasm_provider_docker/src/function/get_plugin.rs +++ b/providers/pulumi_wasm_provider_docker/src/function/get_plugin.rs @@ -38,6 +38,5 @@ impl get_plugin::Guest for Component { name: hashmap.remove("name").unwrap(), plugin_reference: hashmap.remove("pluginReference").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_docker/src/function/get_registry_image.rs b/providers/pulumi_wasm_provider_docker/src/function/get_registry_image.rs index 694512846..c2f908690 100644 --- a/providers/pulumi_wasm_provider_docker/src/function/get_registry_image.rs +++ b/providers/pulumi_wasm_provider_docker/src/function/get_registry_image.rs @@ -32,6 +32,5 @@ impl get_registry_image::Guest for Component { name: hashmap.remove("name").unwrap(), sha256_digest: hashmap.remove("sha256Digest").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_docker/src/function/get_remote_image.rs b/providers/pulumi_wasm_provider_docker/src/function/get_remote_image.rs index 23f8e6054..cc3ee766c 100644 --- a/providers/pulumi_wasm_provider_docker/src/function/get_remote_image.rs +++ b/providers/pulumi_wasm_provider_docker/src/function/get_remote_image.rs @@ -29,6 +29,5 @@ impl get_remote_image::Guest for Component { name: hashmap.remove("name").unwrap(), repo_digest: hashmap.remove("repoDigest").unwrap(), } - } } diff --git a/providers/pulumi_wasm_provider_docker_rust/src/function/get_logs.rs b/providers/pulumi_wasm_provider_docker_rust/src/function/get_logs.rs index d2944fd01..e169e5b0e 100644 --- a/providers/pulumi_wasm_provider_docker_rust/src/function/get_logs.rs +++ b/providers/pulumi_wasm_provider_docker_rust/src/function/get_logs.rs @@ -1,6 +1,6 @@ //! `docker.getLogs` provides logs from specific container - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetLogsArgs { #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] diff --git a/providers/pulumi_wasm_provider_docker_rust/src/function/get_network.rs b/providers/pulumi_wasm_provider_docker_rust/src/function/get_network.rs index a4e1a7f80..a3347f981 100644 --- a/providers/pulumi_wasm_provider_docker_rust/src/function/get_network.rs +++ b/providers/pulumi_wasm_provider_docker_rust/src/function/get_network.rs @@ -13,7 +13,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetNetworkArgs { /// The name of the Docker network. diff --git a/providers/pulumi_wasm_provider_docker_rust/src/function/get_plugin.rs b/providers/pulumi_wasm_provider_docker_rust/src/function/get_plugin.rs index 9ddcccb13..93d62b6a6 100644 --- a/providers/pulumi_wasm_provider_docker_rust/src/function/get_plugin.rs +++ b/providers/pulumi_wasm_provider_docker_rust/src/function/get_plugin.rs @@ -18,7 +18,7 @@ //! id: "e9a9db917b3bfd6706b5d3a66d4bceb9f" //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetPluginArgs { /// The alias of the Docker plugin. If the tag is omitted, `:latest` is complemented to the attribute value. diff --git a/providers/pulumi_wasm_provider_docker_rust/src/function/get_registry_image.rs b/providers/pulumi_wasm_provider_docker_rust/src/function/get_registry_image.rs index f2970e94c..541ffaa41 100644 --- a/providers/pulumi_wasm_provider_docker_rust/src/function/get_registry_image.rs +++ b/providers/pulumi_wasm_provider_docker_rust/src/function/get_registry_image.rs @@ -20,7 +20,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetRegistryImageArgs { /// If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false` diff --git a/providers/pulumi_wasm_provider_docker_rust/src/function/get_remote_image.rs b/providers/pulumi_wasm_provider_docker_rust/src/function/get_remote_image.rs index 81384e6b0..30b1ff30c 100644 --- a/providers/pulumi_wasm_provider_docker_rust/src/function/get_remote_image.rs +++ b/providers/pulumi_wasm_provider_docker_rust/src/function/get_remote_image.rs @@ -30,7 +30,7 @@ //! } //! ``` - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct GetRemoteImageArgs { /// The name of the Docker image, including any tags or SHA256 repo digests. diff --git a/providers/pulumi_wasm_provider_typesystem_rust/wit/world.wit b/providers/pulumi_wasm_provider_typesystem_rust/wit/world.wit index 84b72a57b..8180d219a 100644 --- a/providers/pulumi_wasm_provider_typesystem_rust/wit/world.wit +++ b/providers/pulumi_wasm_provider_typesystem_rust/wit/world.wit @@ -23,13 +23,11 @@ interface typesystem-server { required-union: borrow, } - record res { - } invoke: func( name: string, args: args - ) -> res; + ); } diff --git a/pulumi_wasm_generator_lib/src/output/provider/function_code.rs.handlebars b/pulumi_wasm_generator_lib/src/output/provider/function_code.rs.handlebars index 4ed7103ff..22fc89aca 100644 --- a/pulumi_wasm_generator_lib/src/output/provider/function_code.rs.handlebars +++ b/pulumi_wasm_generator_lib/src/output/provider/function_code.rs.handlebars @@ -8,7 +8,7 @@ impl {{interface.name}}::Guest for Component { {{#if interface.input_properties}} args: {{interface.name}}::Args {{/if}} - ) -> {{interface.name}}::Res { + ){{#if interface.output_properties}} -> {{interface.name}}::Res{{/if}} { pulumi_wasm_common::setup_logger(); let request = ResourceInvokeRequest { token: "{{interface.type}}".into(), @@ -26,6 +26,7 @@ impl {{interface.name}}::Guest for Component { let o = invoke(&request); + {{#if interface.output_properties}} let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); {{interface.name}}::Res { @@ -33,6 +34,6 @@ impl {{interface.name}}::Guest for Component { {{arg_name}}: hashmap.remove("{{name}}").unwrap(), {{/each}} } - + {{/if}} } } diff --git a/pulumi_wasm_generator_lib/src/output/rust/function_code.rs.handlebars b/pulumi_wasm_generator_lib/src/output/rust/function_code.rs.handlebars index 6642fa7a6..99038c522 100644 --- a/pulumi_wasm_generator_lib/src/output/rust/function_code.rs.handlebars +++ b/pulumi_wasm_generator_lib/src/output/rust/function_code.rs.handlebars @@ -3,7 +3,7 @@ {{/each}} {{#if interface.input_properties}} - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct {{interface.struct_name}}Args { {{#each interface.input_properties}} diff --git a/pulumi_wasm_generator_lib/src/output/wit/wit.handlebars b/pulumi_wasm_generator_lib/src/output/wit/wit.handlebars index 71e0b5968..f577bd84b 100644 --- a/pulumi_wasm_generator_lib/src/output/wit/wit.handlebars +++ b/pulumi_wasm_generator_lib/src/output/wit/wit.handlebars @@ -32,18 +32,20 @@ interface {{name}} { } {{/if}} + {{#if results}} record res { {{#each results}} {{name}}: output, {{/each}} } + {{/if}} invoke: func( name: string, {{#if arguments}} args: args {{/if}} - ) -> res; + ){{#if results}} -> res{{/if}}; } {{/each}} @@ -61,17 +63,19 @@ interface {{name}} { } {{/if}} + {{#if results}} record res { {{#each results}} {{name}}: output, {{/each}} } + {{/if}} invoke: func( {{#if arguments}} args: args {{/if}} - ) -> res; + ){{#if results}} -> res{{/if}}; } {{/each}} \ No newline at end of file diff --git a/pulumi_wasm_generator_lib/tests/output/functions-secrets/lib/src/function/func_with_secrets.rs b/pulumi_wasm_generator_lib/tests/output/functions-secrets/lib/src/function/func_with_secrets.rs index 5ec22b14b..32100a952 100644 --- a/pulumi_wasm_generator_lib/tests/output/functions-secrets/lib/src/function/func_with_secrets.rs +++ b/pulumi_wasm_generator_lib/tests/output/functions-secrets/lib/src/function/func_with_secrets.rs @@ -1,5 +1,5 @@ - #[derive(bon::Builder, Clone)] +#[derive(bon::Builder, Clone)] #[builder(finish_fn = build_struct)] pub struct FuncWithSecretsArgs { #[builder(into)] diff --git a/pulumi_wasm_generator_lib/tests/output/functions-secrets/provider/src/function/func_with_secrets.rs b/pulumi_wasm_generator_lib/tests/output/functions-secrets/provider/src/function/func_with_secrets.rs index 1f6a84d11..5d2abb828 100644 --- a/pulumi_wasm_generator_lib/tests/output/functions-secrets/provider/src/function/func_with_secrets.rs +++ b/pulumi_wasm_generator_lib/tests/output/functions-secrets/provider/src/function/func_with_secrets.rs @@ -32,6 +32,5 @@ impl func_with_secrets::Guest for Component { id: hashmap.remove("id").unwrap(), plaintext: hashmap.remove("plaintext").unwrap(), } - } } diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/Cargo.toml b/pulumi_wasm_generator_lib/tests/output/output-funcs/Cargo.toml new file mode 100644 index 000000000..10895020d --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "main" +version = "0.0.1" +edition = "2021" + +[workspace] +members = [ + "provider", + "lib" +] + +[workspace.dependencies] +wit-bindgen-rt = "0.33.0" +wit-bindgen = "0.33.0" +automod = "1.0.14" +pulumi_wasm_common = { path = "../../../../pulumi_wasm_common" } +pulumi_wasm_rust = { path = "../../../../pulumi_wasm_rust" } +pulumi_wasm_wit = { path = "../../../../pulumi_wasm_wit" } +pulumi_wasm_provider_common = { path = "../../../../pulumi_wasm_provider_common" } +serde = "1.0.197" +bon = "2.2.1" \ No newline at end of file diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/Cargo.toml b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/Cargo.toml new file mode 100644 index 000000000..bc537d0f0 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "pulumi_wasm_mypkg" +version = "0.0.1-0.0.0-DEV" +edition = "2021" + +[dependencies] +wit-bindgen.workspace = true +pulumi_wasm_rust.workspace = true +serde.workspace = true +pulumi_wasm_wit = { workspace = true, features = ["client"] } +bon.workspace = true +pulumi_wasm_provider_common.workspace = true diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_all_optional_inputs.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_all_optional_inputs.rs new file mode 100644 index 000000000..5d65df890 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_all_optional_inputs.rs @@ -0,0 +1,35 @@ +//! Check codegen of functions with all optional inputs. + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct FuncWithAllOptionalInputsArgs { + /// Property A + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub a: pulumi_wasm_rust::Output>, + /// Property B + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub b: pulumi_wasm_rust::Output>, +} + +pub struct FuncWithAllOptionalInputsResult { + pub r: pulumi_wasm_rust::Output, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: FuncWithAllOptionalInputsArgs +) -> FuncWithAllOptionalInputsResult { + + let result = crate::bindings::pulumi::mypkg::func_with_all_optional_inputs::invoke( + &crate::bindings::pulumi::mypkg::func_with_all_optional_inputs::Args { + a: &args.a.get_inner(), + b: &args.b.get_inner(), + } + ); + + FuncWithAllOptionalInputsResult { + r: crate::into_domain(result.r), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_const_input.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_const_input.rs new file mode 100644 index 000000000..f2404c671 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_const_input.rs @@ -0,0 +1,28 @@ +//! Codegen demo with const inputs + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct FuncWithConstInputArgs { + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub plain_input: pulumi_wasm_rust::Output>, +} + +pub struct FuncWithConstInputResult { +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: FuncWithConstInputArgs +) -> FuncWithConstInputResult { + + let result = crate::bindings::pulumi::mypkg::func_with_const_input::invoke( + &crate::bindings::pulumi::mypkg::func_with_const_input::Args { + plain_input: &args.plain_input.get_inner(), + } + ); + + FuncWithConstInputResult { + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_default_value.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_default_value.rs new file mode 100644 index 000000000..302286301 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_default_value.rs @@ -0,0 +1,33 @@ +//! Check codegen of functions with default values. + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct FuncWithDefaultValueArgs { + #[builder(into)] + pub a: pulumi_wasm_rust::Output, + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub b: pulumi_wasm_rust::Output>, +} + +pub struct FuncWithDefaultValueResult { + pub r: pulumi_wasm_rust::Output, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: FuncWithDefaultValueArgs +) -> FuncWithDefaultValueResult { + + let result = crate::bindings::pulumi::mypkg::func_with_default_value::invoke( + &crate::bindings::pulumi::mypkg::func_with_default_value::Args { + a: &args.a.get_inner(), + b: &args.b.get_inner(), + } + ); + + FuncWithDefaultValueResult { + r: crate::into_domain(result.r), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_dict_param.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_dict_param.rs new file mode 100644 index 000000000..83c7df4b7 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_dict_param.rs @@ -0,0 +1,33 @@ +//! Check codegen of functions with a Dict parameter. + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct FuncWithDictParamArgs { + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub a: pulumi_wasm_rust::Output>>, + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub b: pulumi_wasm_rust::Output>, +} + +pub struct FuncWithDictParamResult { + pub r: pulumi_wasm_rust::Output, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: FuncWithDictParamArgs +) -> FuncWithDictParamResult { + + let result = crate::bindings::pulumi::mypkg::func_with_dict_param::invoke( + &crate::bindings::pulumi::mypkg::func_with_dict_param::Args { + a: &args.a.get_inner(), + b: &args.b.get_inner(), + } + ); + + FuncWithDictParamResult { + r: crate::into_domain(result.r), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_empty_outputs.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_empty_outputs.rs new file mode 100644 index 000000000..b55be05e9 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_empty_outputs.rs @@ -0,0 +1,29 @@ +//! n/a + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct FuncWithEmptyOutputsArgs { + /// The Name of the FeatureGroup. + #[builder(into)] + pub name: pulumi_wasm_rust::Output, +} + +pub struct FuncWithEmptyOutputsResult { +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: FuncWithEmptyOutputsArgs +) -> FuncWithEmptyOutputsResult { + + let result = crate::bindings::pulumi::mypkg::func_with_empty_outputs::invoke( + &crate::bindings::pulumi::mypkg::func_with_empty_outputs::Args { + name: &args.name.get_inner(), + } + ); + + FuncWithEmptyOutputsResult { + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_list_param.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_list_param.rs new file mode 100644 index 000000000..9e079485f --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/func_with_list_param.rs @@ -0,0 +1,33 @@ +//! Check codegen of functions with a List parameter. + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct FuncWithListParamArgs { + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub a: pulumi_wasm_rust::Output>>, + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub b: pulumi_wasm_rust::Output>, +} + +pub struct FuncWithListParamResult { + pub r: pulumi_wasm_rust::Output, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: FuncWithListParamArgs +) -> FuncWithListParamResult { + + let result = crate::bindings::pulumi::mypkg::func_with_list_param::invoke( + &crate::bindings::pulumi::mypkg::func_with_list_param::Args { + a: &args.a.get_inner(), + b: &args.b.get_inner(), + } + ); + + FuncWithListParamResult { + r: crate::into_domain(result.r), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_bastion_shareable_link.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_bastion_shareable_link.rs new file mode 100644 index 000000000..34a13e3fc --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_bastion_shareable_link.rs @@ -0,0 +1,41 @@ +//! Response for all the Bastion Shareable Link endpoints. +//! API Version: 2020-11-01. + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct GetBastionShareableLinkArgs { + /// The name of the Bastion Host. + #[builder(into)] + pub bastion_host_name: pulumi_wasm_rust::Output, + /// The name of the resource group. + #[builder(into)] + pub resource_group_name: pulumi_wasm_rust::Output, + /// List of VM references. + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub vms: pulumi_wasm_rust::Output>>, +} + +pub struct GetBastionShareableLinkResult { + /// The URL to get the next set of results. + pub next_link: pulumi_wasm_rust::Output>, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: GetBastionShareableLinkArgs +) -> GetBastionShareableLinkResult { + + let result = crate::bindings::pulumi::mypkg::get_bastion_shareable_link::invoke( + &crate::bindings::pulumi::mypkg::get_bastion_shareable_link::Args { + bastion_host_name: &args.bastion_host_name.get_inner(), + resource_group_name: &args.resource_group_name.get_inner(), + vms: &args.vms.get_inner(), + } + ); + + GetBastionShareableLinkResult { + next_link: crate::into_domain(result.next_link), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_client_config.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_client_config.rs new file mode 100644 index 000000000..b5349bce1 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_client_config.rs @@ -0,0 +1,30 @@ +//! Failing example taken from azure-native. Original doc: Use this function to access the current configuration of the native Azure provider. + + +pub struct GetClientConfigResult { + /// Azure Client ID (Application Object ID). + pub client_id: pulumi_wasm_rust::Output, + /// Azure Object ID of the current user or service principal. + pub object_id: pulumi_wasm_rust::Output, + /// Azure Subscription ID + pub subscription_id: pulumi_wasm_rust::Output, + /// Azure Tenant ID + pub tenant_id: pulumi_wasm_rust::Output, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( +) -> GetClientConfigResult { + + let result = crate::bindings::pulumi::mypkg::get_client_config::invoke( + ); + + GetClientConfigResult { + client_id: crate::into_domain(result.client_id), + object_id: crate::into_domain(result.object_id), + subscription_id: crate::into_domain(result.subscription_id), + tenant_id: crate::into_domain(result.tenant_id), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_integration_runtime_object_metadatum.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_integration_runtime_object_metadatum.rs new file mode 100644 index 000000000..8ef02752a --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/get_integration_runtime_object_metadatum.rs @@ -0,0 +1,48 @@ +//! Another failing example. A list of SSIS object metadata. +//! API Version: 2018-06-01. + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct GetIntegrationRuntimeObjectMetadatumArgs { + /// The factory name. + #[builder(into)] + pub factory_name: pulumi_wasm_rust::Output, + /// The integration runtime name. + #[builder(into)] + pub integration_runtime_name: pulumi_wasm_rust::Output, + /// Metadata path. + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub metadata_path: pulumi_wasm_rust::Output>, + /// The resource group name. + #[builder(into)] + pub resource_group_name: pulumi_wasm_rust::Output, +} + +pub struct GetIntegrationRuntimeObjectMetadatumResult { + /// The link to the next page of results, if any remaining results exist. + pub next_link: pulumi_wasm_rust::Output>, + /// List of SSIS object metadata. + pub value: pulumi_wasm_rust::Output>>>, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: GetIntegrationRuntimeObjectMetadatumArgs +) -> GetIntegrationRuntimeObjectMetadatumResult { + + let result = crate::bindings::pulumi::mypkg::get_integration_runtime_object_metadatum::invoke( + &crate::bindings::pulumi::mypkg::get_integration_runtime_object_metadatum::Args { + factory_name: &args.factory_name.get_inner(), + integration_runtime_name: &args.integration_runtime_name.get_inner(), + metadata_path: &args.metadata_path.get_inner(), + resource_group_name: &args.resource_group_name.get_inner(), + } + ); + + GetIntegrationRuntimeObjectMetadatumResult { + next_link: crate::into_domain(result.next_link), + value: crate::into_domain(result.value), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/list_storage_account_keys.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/list_storage_account_keys.rs new file mode 100644 index 000000000..b29d00494 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/list_storage_account_keys.rs @@ -0,0 +1,41 @@ +//! The response from the ListKeys operation. +//! API Version: 2021-02-01. + +#[derive(bon::Builder, Clone)] +#[builder(finish_fn = build_struct)] +pub struct ListStorageAccountKeysArgs { + /// The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + #[builder(into)] + pub account_name: pulumi_wasm_rust::Output, + /// Specifies type of the key to be listed. Possible value is kerb. + #[builder(into, default = ::pulumi_wasm_rust::Output::empty())] + pub expand: pulumi_wasm_rust::Output>, + /// The name of the resource group within the user's subscription. The name is case insensitive. + #[builder(into)] + pub resource_group_name: pulumi_wasm_rust::Output, +} + +pub struct ListStorageAccountKeysResult { + /// Gets the list of storage account keys and their properties for the specified storage account. + pub keys: pulumi_wasm_rust::Output>, +} + +/// +/// Registers a new resource with the given unique name and arguments +/// +pub fn invoke( + args: ListStorageAccountKeysArgs +) -> ListStorageAccountKeysResult { + + let result = crate::bindings::pulumi::mypkg::list_storage_account_keys::invoke( + &crate::bindings::pulumi::mypkg::list_storage_account_keys::Args { + account_name: &args.account_name.get_inner(), + expand: &args.expand.get_inner(), + resource_group_name: &args.resource_group_name.get_inner(), + } + ); + + ListStorageAccountKeysResult { + keys: crate::into_domain(result.keys), + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/mod.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/mod.rs new file mode 100644 index 000000000..e582ec417 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/function/mod.rs @@ -0,0 +1,10 @@ +pub mod func_with_all_optional_inputs; +pub mod func_with_const_input; +pub mod func_with_default_value; +pub mod func_with_dict_param; +pub mod func_with_empty_outputs; +pub mod func_with_list_param; +pub mod get_bastion_shareable_link; +pub mod get_client_config; +pub mod get_integration_runtime_object_metadatum; +pub mod list_storage_account_keys; diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/lib.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/lib.rs new file mode 100644 index 000000000..43d23a3d6 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/lib.rs @@ -0,0 +1,22 @@ +use pulumi_wasm_rust::Output; +use pulumi_wasm_wit::client_bindings::component::pulumi_wasm::output_interface::Output as WitOutput; +#[allow(clippy::doc_lazy_continuation, clippy::tabs_in_doc_comments)] +mod function; +pub use function::*; +#[allow(clippy::doc_lazy_continuation, clippy::tabs_in_doc_comments)] +mod types; +pub use types::*; + +mod bindings { + wit_bindgen::generate!({ + // the name of the world in the `*.wit` input file + world: "mypkg-pulumi-client", + with: { + "component:pulumi-wasm/output-interface@0.0.0-DEV": pulumi_wasm_wit::client_bindings::component::pulumi_wasm::output_interface + } + }); +} + +fn into_domain(output: WitOutput) -> Output { + unsafe { Output::::new_from_handle(output) } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/resource/mod.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/resource/mod.rs new file mode 100644 index 000000000..e69de29bb diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/bastion_shareable_link.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/bastion_shareable_link.rs new file mode 100644 index 000000000..d63ca44a8 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/bastion_shareable_link.rs @@ -0,0 +1,10 @@ +//! Bastion Shareable Link. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct BastionShareableLink { + /// Reference of the virtual machine resource. + #[builder(into)] + #[serde(rename = "vm")] + pub r#vm: Box, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/mod.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/mod.rs new file mode 100644 index 000000000..0a47785a4 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/mod.rs @@ -0,0 +1,19 @@ +mod bastion_shareable_link; +pub use bastion_shareable_link::*; +mod ssis_environment_reference_response; +pub use ssis_environment_reference_response::*; +mod ssis_environment_response; +pub use ssis_environment_response::*; +mod ssis_folder_response; +pub use ssis_folder_response::*; +mod ssis_package_response; +pub use ssis_package_response::*; +mod ssis_parameter_response; +pub use ssis_parameter_response::*; +mod ssis_project_response; +pub use ssis_project_response::*; +mod ssis_variable_response; +pub use ssis_variable_response::*; +mod storage_account_key_response; +pub use storage_account_key_response::*; + diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_environment_reference_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_environment_reference_response.rs new file mode 100644 index 000000000..9b00d0cf0 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_environment_reference_response.rs @@ -0,0 +1,22 @@ +//! Ssis environment reference. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct SsisEnvironmentReferenceResponse { + /// Environment folder name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "environmentFolderName")] + pub r#environment_folder_name: Box>, + /// Environment name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "environmentName")] + pub r#environment_name: Box>, + /// Environment reference id. + #[builder(into, default = Box::new(None))] + #[serde(rename = "id")] + pub r#id: Box>, + /// Reference type + #[builder(into, default = Box::new(None))] + #[serde(rename = "referenceType")] + pub r#reference_type: Box>, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_environment_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_environment_response.rs new file mode 100644 index 000000000..0c59f9444 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_environment_response.rs @@ -0,0 +1,31 @@ +//! Ssis environment. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct SsisEnvironmentResponse { + /// Metadata description. + #[builder(into, default = Box::new(None))] + #[serde(rename = "description")] + pub r#description: Box>, + /// Folder id which contains environment. + #[builder(into, default = Box::new(None))] + #[serde(rename = "folderId")] + pub r#folder_id: Box>, + /// Metadata id. + #[builder(into, default = Box::new(None))] + #[serde(rename = "id")] + pub r#id: Box>, + /// Metadata name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "name")] + pub r#name: Box>, + /// The type of SSIS object metadata. + /// Expected value is 'Environment'. + #[builder(into)] + #[serde(rename = "type")] + pub r#type: Box, + /// Variable in environment + #[builder(into, default = Box::new(None))] + #[serde(rename = "variables")] + pub r#variables: Box>>, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_folder_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_folder_response.rs new file mode 100644 index 000000000..cb82eb837 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_folder_response.rs @@ -0,0 +1,23 @@ +//! Ssis folder. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct SsisFolderResponse { + /// Metadata description. + #[builder(into, default = Box::new(None))] + #[serde(rename = "description")] + pub r#description: Box>, + /// Metadata id. + #[builder(into, default = Box::new(None))] + #[serde(rename = "id")] + pub r#id: Box>, + /// Metadata name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "name")] + pub r#name: Box>, + /// The type of SSIS object metadata. + /// Expected value is 'Folder'. + #[builder(into)] + #[serde(rename = "type")] + pub r#type: Box, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_package_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_package_response.rs new file mode 100644 index 000000000..15d9dcc5f --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_package_response.rs @@ -0,0 +1,39 @@ +//! Ssis Package. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct SsisPackageResponse { + /// Metadata description. + #[builder(into, default = Box::new(None))] + #[serde(rename = "description")] + pub r#description: Box>, + /// Folder id which contains package. + #[builder(into, default = Box::new(None))] + #[serde(rename = "folderId")] + pub r#folder_id: Box>, + /// Metadata id. + #[builder(into, default = Box::new(None))] + #[serde(rename = "id")] + pub r#id: Box>, + /// Metadata name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "name")] + pub r#name: Box>, + /// Parameters in package + #[builder(into, default = Box::new(None))] + #[serde(rename = "parameters")] + pub r#parameters: Box>>, + /// Project id which contains package. + #[builder(into, default = Box::new(None))] + #[serde(rename = "projectId")] + pub r#project_id: Box>, + /// Project version which contains package. + #[builder(into, default = Box::new(None))] + #[serde(rename = "projectVersion")] + pub r#project_version: Box>, + /// The type of SSIS object metadata. + /// Expected value is 'Package'. + #[builder(into)] + #[serde(rename = "type")] + pub r#type: Box, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_parameter_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_parameter_response.rs new file mode 100644 index 000000000..3ff33d1cd --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_parameter_response.rs @@ -0,0 +1,54 @@ +//! Ssis parameter. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct SsisParameterResponse { + /// Parameter type. + #[builder(into, default = Box::new(None))] + #[serde(rename = "dataType")] + pub r#data_type: Box>, + /// Default value of parameter. + #[builder(into, default = Box::new(None))] + #[serde(rename = "defaultValue")] + pub r#default_value: Box>, + /// Parameter description. + #[builder(into, default = Box::new(None))] + #[serde(rename = "description")] + pub r#description: Box>, + /// Design default value of parameter. + #[builder(into, default = Box::new(None))] + #[serde(rename = "designDefaultValue")] + pub r#design_default_value: Box>, + /// Parameter id. + #[builder(into, default = Box::new(None))] + #[serde(rename = "id")] + pub r#id: Box>, + /// Parameter name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "name")] + pub r#name: Box>, + /// Whether parameter is required. + #[builder(into, default = Box::new(None))] + #[serde(rename = "required")] + pub r#required: Box>, + /// Whether parameter is sensitive. + #[builder(into, default = Box::new(None))] + #[serde(rename = "sensitive")] + pub r#sensitive: Box>, + /// Default sensitive value of parameter. + #[builder(into, default = Box::new(None))] + #[serde(rename = "sensitiveDefaultValue")] + pub r#sensitive_default_value: Box>, + /// Parameter value set. + #[builder(into, default = Box::new(None))] + #[serde(rename = "valueSet")] + pub r#value_set: Box>, + /// Parameter value type. + #[builder(into, default = Box::new(None))] + #[serde(rename = "valueType")] + pub r#value_type: Box>, + /// Parameter reference variable. + #[builder(into, default = Box::new(None))] + #[serde(rename = "variable")] + pub r#variable: Box>, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_project_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_project_response.rs new file mode 100644 index 000000000..249e06dae --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_project_response.rs @@ -0,0 +1,39 @@ +//! Ssis project. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct SsisProjectResponse { + /// Metadata description. + #[builder(into, default = Box::new(None))] + #[serde(rename = "description")] + pub r#description: Box>, + /// Environment reference in project + #[builder(into, default = Box::new(None))] + #[serde(rename = "environmentRefs")] + pub r#environment_refs: Box>>, + /// Folder id which contains project. + #[builder(into, default = Box::new(None))] + #[serde(rename = "folderId")] + pub r#folder_id: Box>, + /// Metadata id. + #[builder(into, default = Box::new(None))] + #[serde(rename = "id")] + pub r#id: Box>, + /// Metadata name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "name")] + pub r#name: Box>, + /// Parameters in project + #[builder(into, default = Box::new(None))] + #[serde(rename = "parameters")] + pub r#parameters: Box>>, + /// The type of SSIS object metadata. + /// Expected value is 'Project'. + #[builder(into)] + #[serde(rename = "type")] + pub r#type: Box, + /// Project version. + #[builder(into, default = Box::new(None))] + #[serde(rename = "version")] + pub r#version: Box>, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_variable_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_variable_response.rs new file mode 100644 index 000000000..cce53d08d --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/ssis_variable_response.rs @@ -0,0 +1,34 @@ +//! Ssis variable. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct SsisVariableResponse { + /// Variable type. + #[builder(into, default = Box::new(None))] + #[serde(rename = "dataType")] + pub r#data_type: Box>, + /// Variable description. + #[builder(into, default = Box::new(None))] + #[serde(rename = "description")] + pub r#description: Box>, + /// Variable id. + #[builder(into, default = Box::new(None))] + #[serde(rename = "id")] + pub r#id: Box>, + /// Variable name. + #[builder(into, default = Box::new(None))] + #[serde(rename = "name")] + pub r#name: Box>, + /// Whether variable is sensitive. + #[builder(into, default = Box::new(None))] + #[serde(rename = "sensitive")] + pub r#sensitive: Box>, + /// Variable sensitive value. + #[builder(into, default = Box::new(None))] + #[serde(rename = "sensitiveValue")] + pub r#sensitive_value: Box>, + /// Variable value. + #[builder(into, default = Box::new(None))] + #[serde(rename = "value")] + pub r#value: Box>, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/storage_account_key_response.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/storage_account_key_response.rs new file mode 100644 index 000000000..9de1434fb --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/src/types/storage_account_key_response.rs @@ -0,0 +1,22 @@ +//! An access key for the storage account. + +#[derive(serde::Deserialize, serde::Serialize, bon::Builder, Debug, PartialEq, Clone)] +#[builder(finish_fn = build_struct)] +pub struct StorageAccountKeyResponse { + /// Creation time of the key, in round trip date format. + #[builder(into)] + #[serde(rename = "creationTime")] + pub r#creation_time: Box, + /// Name of the key. + #[builder(into)] + #[serde(rename = "keyName")] + pub r#key_name: Box, + /// Permissions for the key -- read-only or full permissions. + #[builder(into)] + #[serde(rename = "permissions")] + pub r#permissions: Box, + /// Base 64-encoded value of the key. + #[builder(into)] + #[serde(rename = "value")] + pub r#value: Box, +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/wit/deps/pulumi-wasm.wit b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/wit/deps/pulumi-wasm.wit new file mode 100644 index 000000000..d41010180 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/wit/deps/pulumi-wasm.wit @@ -0,0 +1,59 @@ +package component:pulumi-wasm@0.0.0-DEV; + +interface output-interface { + + resource output { + constructor(value: string); + map: func(function-name: string) -> output; + } + combine: func(outputs: list>) -> output; +} + + +interface register-interface { + use output-interface.{output}; + + record object-field { + name: string, + value: borrow + } + + record result-field { + name: string + } + + record register-resource-result-field { + name: string, + output: output + } + + record register-resource-request { + %type: string, + name: string, + object: list, + results: list + } + + record register-resource-result { + fields: list + } + + register: func(request: register-resource-request) -> register-resource-result; + + record resource-invoke-result-field { + name: string, + output: output + } + + record resource-invoke-request { + token: string, + object: list, + results: list + } + + record resource-invoke-result { + fields: list + } + + invoke: func(request: resource-invoke-request) -> resource-invoke-result; +} \ No newline at end of file diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/wit/world.wit b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/wit/world.wit new file mode 100644 index 000000000..e0e33072f --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/lib/wit/world.wit @@ -0,0 +1,205 @@ +package pulumi:mypkg@0.0.1--0.0.0-DEV; + +world mypkg-pulumi { + import component:pulumi-wasm/register-interface@0.0.0-DEV; + export func-with-all-optional-inputs; + export func-with-const-input; + export func-with-default-value; + export func-with-dict-param; + export func-with-empty-outputs; + export func-with-list-param; + export get-bastion-shareable-link; + export get-client-config; + export get-integration-runtime-object-metadatum; + export list-storage-account-keys; +} + +world mypkg-pulumi-client { + import func-with-all-optional-inputs; + import func-with-const-input; + import func-with-default-value; + import func-with-dict-param; + import func-with-empty-outputs; + import func-with-list-param; + import get-bastion-shareable-link; + import get-client-config; + import get-integration-runtime-object-metadatum; + import list-storage-account-keys; +} + + +interface func-with-all-optional-inputs { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface func-with-const-input { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + plain-input: borrow, + } + + + invoke: func( + args: args + ); + +} +interface func-with-default-value { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface func-with-dict-param { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface func-with-empty-outputs { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + name: borrow, + } + + + invoke: func( + args: args + ); + +} +interface func-with-list-param { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface get-bastion-shareable-link { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + bastion-host-name: borrow, + resource-group-name: borrow, + vms: borrow, + } + + record res { + next-link: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface get-client-config { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + + record res { + client-id: output, + object-id: output, + subscription-id: output, + tenant-id: output, + } + + invoke: func( + ) -> res; + +} +interface get-integration-runtime-object-metadatum { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + factory-name: borrow, + integration-runtime-name: borrow, + metadata-path: borrow, + resource-group-name: borrow, + } + + record res { + next-link: output, + value: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface list-storage-account-keys { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + account-name: borrow, + expand: borrow, + resource-group-name: borrow, + } + + record res { + keys: output, + } + + invoke: func( + args: args + ) -> res; + +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/Cargo.toml b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/Cargo.toml new file mode 100644 index 000000000..ab90c4105 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "pulumi_wasm_mypkg_provider" +version = "0.0.1-0.0.0-DEV" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib"] + +[dependencies] +wit-bindgen-rt.workspace = true +pulumi_wasm_common.workspace = true + +[package.metadata.component] +package = "pulumi:mypkg" + +[package.metadata.component.target] +path = "wit" +world = "mypkg-pulumi" + +[package.metadata.component.target.dependencies] +"component:pulumi-wasm" = { path = "wit/deps/pulumi-wasm.wit" } diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_all_optional_inputs.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_all_optional_inputs.rs new file mode 100644 index 000000000..a4686ae93 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_all_optional_inputs.rs @@ -0,0 +1,30 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::func_with_all_optional_inputs; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl func_with_all_optional_inputs::Guest for Component { + fn invoke( + args: func_with_all_optional_inputs::Args + ) -> func_with_all_optional_inputs::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::funcWithAllOptionalInputs".into(), + object: vec![ + ObjectField { name: "a".into(), value: args.a }, + ObjectField { name: "b".into(), value: args.b }, + ], + results: vec![ + ResultField { name: "r".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + func_with_all_optional_inputs::Res { + r: hashmap.remove("r").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_const_input.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_const_input.rs new file mode 100644 index 000000000..350c80406 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_const_input.rs @@ -0,0 +1,23 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::func_with_const_input; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl func_with_const_input::Guest for Component { + fn invoke( + args: func_with_const_input::Args + ) { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::funcWithConstInput".into(), + object: vec![ + ObjectField { name: "plainInput".into(), value: args.plain_input }, + ], + results: vec![ + ], + }; + + let o = invoke(&request); + + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_default_value.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_default_value.rs new file mode 100644 index 000000000..3118462e8 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_default_value.rs @@ -0,0 +1,30 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::func_with_default_value; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl func_with_default_value::Guest for Component { + fn invoke( + args: func_with_default_value::Args + ) -> func_with_default_value::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::funcWithDefaultValue".into(), + object: vec![ + ObjectField { name: "a".into(), value: args.a }, + ObjectField { name: "b".into(), value: args.b }, + ], + results: vec![ + ResultField { name: "r".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + func_with_default_value::Res { + r: hashmap.remove("r").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_dict_param.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_dict_param.rs new file mode 100644 index 000000000..fd1e98479 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_dict_param.rs @@ -0,0 +1,30 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::func_with_dict_param; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl func_with_dict_param::Guest for Component { + fn invoke( + args: func_with_dict_param::Args + ) -> func_with_dict_param::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::funcWithDictParam".into(), + object: vec![ + ObjectField { name: "a".into(), value: args.a }, + ObjectField { name: "b".into(), value: args.b }, + ], + results: vec![ + ResultField { name: "r".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + func_with_dict_param::Res { + r: hashmap.remove("r").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_empty_outputs.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_empty_outputs.rs new file mode 100644 index 000000000..594451583 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_empty_outputs.rs @@ -0,0 +1,23 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::func_with_empty_outputs; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl func_with_empty_outputs::Guest for Component { + fn invoke( + args: func_with_empty_outputs::Args + ) { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::funcWithEmptyOutputs".into(), + object: vec![ + ObjectField { name: "name".into(), value: args.name }, + ], + results: vec![ + ], + }; + + let o = invoke(&request); + + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_list_param.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_list_param.rs new file mode 100644 index 000000000..261528ab1 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/func_with_list_param.rs @@ -0,0 +1,30 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::func_with_list_param; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl func_with_list_param::Guest for Component { + fn invoke( + args: func_with_list_param::Args + ) -> func_with_list_param::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::funcWithListParam".into(), + object: vec![ + ObjectField { name: "a".into(), value: args.a }, + ObjectField { name: "b".into(), value: args.b }, + ], + results: vec![ + ResultField { name: "r".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + func_with_list_param::Res { + r: hashmap.remove("r").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_bastion_shareable_link.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_bastion_shareable_link.rs new file mode 100644 index 000000000..8867603b6 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_bastion_shareable_link.rs @@ -0,0 +1,31 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::get_bastion_shareable_link; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl get_bastion_shareable_link::Guest for Component { + fn invoke( + args: get_bastion_shareable_link::Args + ) -> get_bastion_shareable_link::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::getBastionShareableLink".into(), + object: vec![ + ObjectField { name: "bastionHostName".into(), value: args.bastion_host_name }, + ObjectField { name: "resourceGroupName".into(), value: args.resource_group_name }, + ObjectField { name: "vms".into(), value: args.vms }, + ], + results: vec![ + ResultField { name: "nextLink".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + get_bastion_shareable_link::Res { + next_link: hashmap.remove("nextLink").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_client_config.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_client_config.rs new file mode 100644 index 000000000..ba9cacdea --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_client_config.rs @@ -0,0 +1,33 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::get_client_config; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl get_client_config::Guest for Component { + fn invoke( + ) -> get_client_config::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::getClientConfig".into(), + object: vec![ + ], + results: vec![ + ResultField { name: "clientId".into() }, + ResultField { name: "objectId".into() }, + ResultField { name: "subscriptionId".into() }, + ResultField { name: "tenantId".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + get_client_config::Res { + client_id: hashmap.remove("clientId").unwrap(), + object_id: hashmap.remove("objectId").unwrap(), + subscription_id: hashmap.remove("subscriptionId").unwrap(), + tenant_id: hashmap.remove("tenantId").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_integration_runtime_object_metadatum.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_integration_runtime_object_metadatum.rs new file mode 100644 index 000000000..d565035d8 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/get_integration_runtime_object_metadatum.rs @@ -0,0 +1,34 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::get_integration_runtime_object_metadatum; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl get_integration_runtime_object_metadatum::Guest for Component { + fn invoke( + args: get_integration_runtime_object_metadatum::Args + ) -> get_integration_runtime_object_metadatum::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::getIntegrationRuntimeObjectMetadatum".into(), + object: vec![ + ObjectField { name: "factoryName".into(), value: args.factory_name }, + ObjectField { name: "integrationRuntimeName".into(), value: args.integration_runtime_name }, + ObjectField { name: "metadataPath".into(), value: args.metadata_path }, + ObjectField { name: "resourceGroupName".into(), value: args.resource_group_name }, + ], + results: vec![ + ResultField { name: "nextLink".into() }, + ResultField { name: "value".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + get_integration_runtime_object_metadatum::Res { + next_link: hashmap.remove("nextLink").unwrap(), + value: hashmap.remove("value").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/list_storage_account_keys.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/list_storage_account_keys.rs new file mode 100644 index 000000000..254b6cb99 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/list_storage_account_keys.rs @@ -0,0 +1,31 @@ +use std::collections::HashMap; +use crate::bindings::exports::pulumi::mypkg::list_storage_account_keys; +use crate::bindings::component::pulumi_wasm::register_interface::{ObjectField, invoke, ResourceInvokeRequest, ResultField}; +use crate::Component; + +impl list_storage_account_keys::Guest for Component { + fn invoke( + args: list_storage_account_keys::Args + ) -> list_storage_account_keys::Res { + pulumi_wasm_common::setup_logger(); + let request = ResourceInvokeRequest { + token: "mypkg::listStorageAccountKeys".into(), + object: vec![ + ObjectField { name: "accountName".into(), value: args.account_name }, + ObjectField { name: "expand".into(), value: args.expand }, + ObjectField { name: "resourceGroupName".into(), value: args.resource_group_name }, + ], + results: vec![ + ResultField { name: "keys".into() }, + ], + }; + + let o = invoke(&request); + + let mut hashmap: HashMap = o.fields.into_iter().map(|f| (f.name, f.output)).collect(); + + list_storage_account_keys::Res { + keys: hashmap.remove("keys").unwrap(), + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/mod.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/mod.rs new file mode 100644 index 000000000..e582ec417 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/function/mod.rs @@ -0,0 +1,10 @@ +pub mod func_with_all_optional_inputs; +pub mod func_with_const_input; +pub mod func_with_default_value; +pub mod func_with_dict_param; +pub mod func_with_empty_outputs; +pub mod func_with_list_param; +pub mod get_bastion_shareable_link; +pub mod get_client_config; +pub mod get_integration_runtime_object_metadatum; +pub mod list_storage_account_keys; diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/lib.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/lib.rs new file mode 100644 index 000000000..3e8987bca --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/lib.rs @@ -0,0 +1,10 @@ +mod resource; +mod function; + +#[allow(unused_braces)] +#[allow(unused_imports)] +#[allow(static_mut_refs)] +mod bindings; +bindings::export!(Component with_types_in bindings); + +struct Component {} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/resource/mod.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/src/resource/mod.rs new file mode 100644 index 000000000..e69de29bb diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/wit/deps/pulumi-wasm.wit b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/wit/deps/pulumi-wasm.wit new file mode 100644 index 000000000..d41010180 --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/wit/deps/pulumi-wasm.wit @@ -0,0 +1,59 @@ +package component:pulumi-wasm@0.0.0-DEV; + +interface output-interface { + + resource output { + constructor(value: string); + map: func(function-name: string) -> output; + } + combine: func(outputs: list>) -> output; +} + + +interface register-interface { + use output-interface.{output}; + + record object-field { + name: string, + value: borrow + } + + record result-field { + name: string + } + + record register-resource-result-field { + name: string, + output: output + } + + record register-resource-request { + %type: string, + name: string, + object: list, + results: list + } + + record register-resource-result { + fields: list + } + + register: func(request: register-resource-request) -> register-resource-result; + + record resource-invoke-result-field { + name: string, + output: output + } + + record resource-invoke-request { + token: string, + object: list, + results: list + } + + record resource-invoke-result { + fields: list + } + + invoke: func(request: resource-invoke-request) -> resource-invoke-result; +} \ No newline at end of file diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/wit/world.wit b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/wit/world.wit new file mode 100644 index 000000000..e0e33072f --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/provider/wit/world.wit @@ -0,0 +1,205 @@ +package pulumi:mypkg@0.0.1--0.0.0-DEV; + +world mypkg-pulumi { + import component:pulumi-wasm/register-interface@0.0.0-DEV; + export func-with-all-optional-inputs; + export func-with-const-input; + export func-with-default-value; + export func-with-dict-param; + export func-with-empty-outputs; + export func-with-list-param; + export get-bastion-shareable-link; + export get-client-config; + export get-integration-runtime-object-metadatum; + export list-storage-account-keys; +} + +world mypkg-pulumi-client { + import func-with-all-optional-inputs; + import func-with-const-input; + import func-with-default-value; + import func-with-dict-param; + import func-with-empty-outputs; + import func-with-list-param; + import get-bastion-shareable-link; + import get-client-config; + import get-integration-runtime-object-metadatum; + import list-storage-account-keys; +} + + +interface func-with-all-optional-inputs { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface func-with-const-input { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + plain-input: borrow, + } + + + invoke: func( + args: args + ); + +} +interface func-with-default-value { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface func-with-dict-param { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface func-with-empty-outputs { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + name: borrow, + } + + + invoke: func( + args: args + ); + +} +interface func-with-list-param { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + a: borrow, + b: borrow, + } + + record res { + r: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface get-bastion-shareable-link { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + bastion-host-name: borrow, + resource-group-name: borrow, + vms: borrow, + } + + record res { + next-link: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface get-client-config { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + + record res { + client-id: output, + object-id: output, + subscription-id: output, + tenant-id: output, + } + + invoke: func( + ) -> res; + +} +interface get-integration-runtime-object-metadatum { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + factory-name: borrow, + integration-runtime-name: borrow, + metadata-path: borrow, + resource-group-name: borrow, + } + + record res { + next-link: output, + value: output, + } + + invoke: func( + args: args + ) -> res; + +} +interface list-storage-account-keys { + + use component:pulumi-wasm/output-interface@0.0.0-DEV.{output}; + + record args { + account-name: borrow, + expand: borrow, + resource-group-name: borrow, + } + + record res { + keys: output, + } + + invoke: func( + args: args + ) -> res; + +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/rust-toolchain.toml b/pulumi_wasm_generator_lib/tests/output/output-funcs/rust-toolchain.toml new file mode 100644 index 000000000..7466ea07d --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "1.83.0" +targets = ["wasm32-wasip1"] \ No newline at end of file diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/schema.json b/pulumi_wasm_generator_lib/tests/output/output-funcs/schema.json new file mode 100644 index 000000000..cb39478bd --- /dev/null +++ b/pulumi_wasm_generator_lib/tests/output/output-funcs/schema.json @@ -0,0 +1,669 @@ +{ + "name": "mypkg", + "version": "0.0.1", + "functions": { + "mypkg::funcWithAllOptionalInputs": { + "description": "Check codegen of functions with all optional inputs.", + "inputs": { + "type": "object", + "properties": { + "a": { + "type": "string", + "description": "Property A" + }, + "b": { + "type": "string", + "description": "Property B" + } + } + }, + "outputs": { + "properties": { + "r": { + "type": "string" + } + }, + "type": "object", + "required": [ + "r" + ] + } + }, + "mypkg::funcWithConstInput": { + "description": "Codegen demo with const inputs", + "inputs": { + "type": "object", + "properties": { + "plainInput": { + "type": "string", + "const": "fixed" + } + } + } + }, + "mypkg::funcWithDefaultValue": { + "description": "Check codegen of functions with default values.", + "inputs": { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "string" + }, + "b": { + "type": "string", + "default": "b-default" + } + } + }, + "outputs": { + "properties": { + "r": { + "type": "string" + } + }, + "type": "object", + "required": [ + "r" + ] + } + }, + "mypkg::funcWithDictParam": { + "description": "Check codegen of functions with a Dict parameter.", + "inputs": { + "type": "object", + "properties": { + "a": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "b": { + "type": "string" + } + } + }, + "outputs": { + "properties": { + "r": { + "type": "string" + } + }, + "type": "object", + "required": [ + "r" + ] + } + }, + "mypkg::funcWithListParam": { + "description": "Check codegen of functions with a List parameter.", + "inputs": { + "type": "object", + "properties": { + "a": { + "type": "array", + "items": { + "type": "string" + } + }, + "b": { + "type": "string" + } + } + }, + "outputs": { + "properties": { + "r": { + "type": "string" + } + }, + "type": "object", + "required": [ + "r" + ] + } + }, + "mypkg::getClientConfig": { + "description": "Failing example taken from azure-native. Original doc: Use this function to access the current configuration of the native Azure provider.", + "outputs": { + "description": "Configuration values returned by getClientConfig.", + "properties": { + "clientId": { + "type": "string", + "description": "Azure Client ID (Application Object ID)." + }, + "objectId": { + "type": "string", + "description": "Azure Object ID of the current user or service principal." + }, + "subscriptionId": { + "type": "string", + "description": "Azure Subscription ID" + }, + "tenantId": { + "type": "string", + "description": "Azure Tenant ID" + } + }, + "type": "object", + "required": [ + "clientId", + "objectId", + "subscriptionId", + "tenantId" + ] + } + }, + "mypkg::getIntegrationRuntimeObjectMetadatum": { + "description": "Another failing example. A list of SSIS object metadata.\nAPI Version: 2018-06-01.", + "inputs": { + "properties": { + "factoryName": { + "type": "string", + "description": "The factory name." + }, + "integrationRuntimeName": { + "type": "string", + "description": "The integration runtime name." + }, + "metadataPath": { + "type": "string", + "description": "Metadata path." + }, + "resourceGroupName": { + "type": "string", + "description": "The resource group name." + } + }, + "type": "object", + "required": [ + "factoryName", + "integrationRuntimeName", + "resourceGroupName" + ] + }, + "outputs": { + "description": "A list of SSIS object metadata.", + "properties": { + "nextLink": { + "type": "string", + "description": "The link to the next page of results, if any remaining results exist." + }, + "value": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "$ref": "#/types/mypkg::SsisEnvironmentResponse" + }, + { + "type": "object", + "$ref": "#/types/mypkg::SsisFolderResponse" + }, + { + "type": "object", + "$ref": "#/types/mypkg::SsisPackageResponse" + }, + { + "type": "object", + "$ref": "#/types/mypkg::SsisProjectResponse" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "Environment": "#/types/mypkg::SsisEnvironmentResponse", + "Folder": "#/types/mypkg::SsisFolderResponse", + "Package": "#/types/mypkg::SsisPackageResponse", + "Project": "#/types/mypkg::SsisProjectResponse" + } + } + }, + "description": "List of SSIS object metadata." + } + }, + "type": "object" + } + }, + "mypkg::listStorageAccountKeys": { + "description": "The response from the ListKeys operation.\nAPI Version: 2021-02-01.", + "inputs": { + "properties": { + "accountName": { + "type": "string", + "description": "The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only." + }, + "expand": { + "type": "string", + "description": "Specifies type of the key to be listed. Possible value is kerb." + }, + "resourceGroupName": { + "type": "string", + "description": "The name of the resource group within the user's subscription. The name is case insensitive." + } + }, + "type": "object", + "required": [ + "accountName", + "resourceGroupName" + ] + }, + "outputs": { + "description": "The response from the ListKeys operation.", + "properties": { + "keys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/mypkg::StorageAccountKeyResponse" + }, + "description": "Gets the list of storage account keys and their properties for the specified storage account." + } + }, + "type": "object", + "required": [ + "keys" + ] + } + }, + "mypkg::getBastionShareableLink": { + "description": "Response for all the Bastion Shareable Link endpoints.\nAPI Version: 2020-11-01.", + "inputs": { + "properties": { + "bastionHostName": { + "type": "string", + "description": "The name of the Bastion Host." + }, + "resourceGroupName": { + "type": "string", + "description": "The name of the resource group." + }, + "vms": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/mypkg::BastionShareableLink" + }, + "description": "List of VM references." + } + }, + "type": "object", + "required": [ + "bastionHostName", + "resourceGroupName" + ] + }, + "outputs": { + "description": "Response for all the Bastion Shareable Link endpoints.", + "properties": { + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + }, + "type": "object" + } + }, + "mypkg::funcWithEmptyOutputs": { + "description": "n/a", + "inputs": { + "properties": { + "name": { + "type": "string", + "description": "The Name of the FeatureGroup." + } + }, + "required": [ + "name" + ] + }, + "outputs": {} + } + }, + "types": { + "mypkg::BastionShareableLink": { + "description": "Bastion Shareable Link.", + "properties": { + "vm": { + "type": "string", + "description": "Reference of the virtual machine resource." + } + }, + "type": "object", + "required": [ + "vm" + ] + }, + "mypkg::SsisEnvironmentResponse": { + "description": "Ssis environment.", + "properties": { + "description": { + "type": "string", + "description": "Metadata description." + }, + "folderId": { + "type": "number", + "description": "Folder id which contains environment." + }, + "id": { + "type": "number", + "description": "Metadata id." + }, + "name": { + "type": "string", + "description": "Metadata name." + }, + "type": { + "type": "string", + "description": "The type of SSIS object metadata.\nExpected value is 'Environment'.", + "const": "Environment" + }, + "variables": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/mypkg::SsisVariableResponse" + }, + "description": "Variable in environment" + } + }, + "type": "object", + "required": [ + "type" + ] + }, + "mypkg::SsisFolderResponse": { + "description": "Ssis folder.", + "properties": { + "description": { + "type": "string", + "description": "Metadata description." + }, + "id": { + "type": "number", + "description": "Metadata id." + }, + "name": { + "type": "string", + "description": "Metadata name." + }, + "type": { + "type": "string", + "description": "The type of SSIS object metadata.\nExpected value is 'Folder'.", + "const": "Folder" + } + }, + "type": "object", + "required": [ + "type" + ] + }, + "mypkg::SsisPackageResponse": { + "description": "Ssis Package.", + "properties": { + "description": { + "type": "string", + "description": "Metadata description." + }, + "folderId": { + "type": "number", + "description": "Folder id which contains package." + }, + "id": { + "type": "number", + "description": "Metadata id." + }, + "name": { + "type": "string", + "description": "Metadata name." + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/mypkg::SsisParameterResponse" + }, + "description": "Parameters in package" + }, + "projectId": { + "type": "number", + "description": "Project id which contains package." + }, + "projectVersion": { + "type": "number", + "description": "Project version which contains package." + }, + "type": { + "type": "string", + "description": "The type of SSIS object metadata.\nExpected value is 'Package'.", + "const": "Package" + } + }, + "type": "object", + "required": [ + "type" + ] + }, + "mypkg::SsisProjectResponse": { + "description": "Ssis project.", + "properties": { + "description": { + "type": "string", + "description": "Metadata description." + }, + "environmentRefs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/mypkg::SsisEnvironmentReferenceResponse" + }, + "description": "Environment reference in project" + }, + "folderId": { + "type": "number", + "description": "Folder id which contains project." + }, + "id": { + "type": "number", + "description": "Metadata id." + }, + "name": { + "type": "string", + "description": "Metadata name." + }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/types/mypkg::SsisParameterResponse" + }, + "description": "Parameters in project" + }, + "type": { + "type": "string", + "description": "The type of SSIS object metadata.\nExpected value is 'Project'.", + "const": "Project" + }, + "version": { + "type": "number", + "description": "Project version." + } + }, + "type": "object", + "required": [ + "type" + ] + }, + "mypkg::SsisEnvironmentReferenceResponse": { + "description": "Ssis environment reference.", + "properties": { + "environmentFolderName": { + "type": "string", + "description": "Environment folder name." + }, + "environmentName": { + "type": "string", + "description": "Environment name." + }, + "id": { + "type": "number", + "description": "Environment reference id." + }, + "referenceType": { + "type": "string", + "description": "Reference type" + } + }, + "type": "object" + }, + "mypkg::SsisParameterResponse": { + "description": "Ssis parameter.", + "properties": { + "dataType": { + "type": "string", + "description": "Parameter type." + }, + "defaultValue": { + "type": "string", + "description": "Default value of parameter." + }, + "description": { + "type": "string", + "description": "Parameter description." + }, + "designDefaultValue": { + "type": "string", + "description": "Design default value of parameter." + }, + "id": { + "type": "number", + "description": "Parameter id." + }, + "name": { + "type": "string", + "description": "Parameter name." + }, + "required": { + "type": "boolean", + "description": "Whether parameter is required." + }, + "sensitive": { + "type": "boolean", + "description": "Whether parameter is sensitive." + }, + "sensitiveDefaultValue": { + "type": "string", + "description": "Default sensitive value of parameter." + }, + "valueSet": { + "type": "boolean", + "description": "Parameter value set." + }, + "valueType": { + "type": "string", + "description": "Parameter value type." + }, + "variable": { + "type": "string", + "description": "Parameter reference variable." + } + }, + "type": "object" + }, + "mypkg::SsisVariableResponse": { + "description": "Ssis variable.", + "properties": { + "dataType": { + "type": "string", + "description": "Variable type." + }, + "description": { + "type": "string", + "description": "Variable description." + }, + "id": { + "type": "number", + "description": "Variable id." + }, + "name": { + "type": "string", + "description": "Variable name." + }, + "sensitive": { + "type": "boolean", + "description": "Whether variable is sensitive." + }, + "sensitiveValue": { + "type": "string", + "description": "Variable sensitive value." + }, + "value": { + "type": "string", + "description": "Variable value." + } + }, + "type": "object" + }, + "mypkg::StorageAccountKeyResponse": { + "description": "An access key for the storage account.", + "properties": { + "creationTime": { + "type": "string", + "description": "Creation time of the key, in round trip date format." + }, + "keyName": { + "type": "string", + "description": "Name of the key." + }, + "permissions": { + "type": "string", + "description": "Permissions for the key -- read-only or full permissions." + }, + "value": { + "type": "string", + "description": "Base 64-encoded value of the key." + } + }, + "type": "object", + "required": [ + "creationTime", + "keyName", + "permissions", + "value" + ] + } + }, + "language": { + "nodejs": { + "optimizeNodeModuleLoading": ["lazy-load-functions", "lazy-load-resources", "use-type-only-enums-references"], + "devDependencies": { + "@types/mocha": "latest", + "@types/node": "ts4.3", + "mocha": "latest", + "ts-node": "latest" + }, + "extraTypeScriptFiles": [ + "tests/codegen.spec.ts" + ] + }, + "go": { + "generateExtraInputTypes": true, + "importBasePath": "output-funcs/mypkg", + "generics": "side-by-side" + }, + "python": {}, + "csharp": { + "packageReferences": { + "FluentAssertions": "5.10.2", + "Microsoft.NET.Test.Sdk": "16.5.0", + "Moq": "4.13.1", + "NUnit": "3.12.0", + "NUnit3TestAdapter": "4.2.1" + } + } + } +} diff --git a/pulumi_wasm_generator_lib/tests/output/output-funcs/src/lib.rs b/pulumi_wasm_generator_lib/tests/output/output-funcs/src/lib.rs new file mode 100644 index 000000000..e69de29bb diff --git a/pulumi_wasm_generator_lib/tests/test.rs b/pulumi_wasm_generator_lib/tests/test.rs index 5468ce981..4d4bf4944 100644 --- a/pulumi_wasm_generator_lib/tests/test.rs +++ b/pulumi_wasm_generator_lib/tests/test.rs @@ -22,8 +22,6 @@ fn functions_secrets() -> Result<()> { } #[test] -// https://github.com/andrzejressel/pulumi-wasm/issues/564 -#[ignore] fn output_funcs() -> Result<()> { run_pulumi_generator_test("output-funcs", "mypkg") } diff --git a/pulumi_wasm_provider_common/src/oneof.rs b/pulumi_wasm_provider_common/src/oneof.rs index 103a40caa..7fbfb40e7 100644 --- a/pulumi_wasm_provider_common/src/oneof.rs +++ b/pulumi_wasm_provider_common/src/oneof.rs @@ -16,3 +16,47 @@ impl OneOf2 { OneOf2::Right(b) } } + +#[derive(Debug, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OneOf3 { + Left(A), + Middle(B), + Right(C), +} + +impl OneOf3 { + pub fn left(a: A) -> Self { + OneOf3::Left(a) + } + pub fn middle(b: B) -> Self { + OneOf3::Middle(b) + } + pub fn right(c: C) -> Self { + OneOf3::Right(c) + } +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(untagged)] +pub enum OneOf4 { + Left(A), + Middle1(B), + Middle2(C), + Right(D), +} + +impl OneOf4 { + pub fn left(a: A) -> Self { + OneOf4::Left(a) + } + pub fn middle1(b: B) -> Self { + OneOf4::Middle1(b) + } + pub fn middle2(c: C) -> Self { + OneOf4::Middle2(c) + } + pub fn right(d: D) -> Self { + OneOf4::Right(d) + } +}