diff --git a/.pulumi-java-gen.version b/.pulumi-java-gen.version index d33c3a2..0548fb4 100644 --- a/.pulumi-java-gen.version +++ b/.pulumi-java-gen.version @@ -1 +1 @@ -0.12.0 \ No newline at end of file +0.14.0 \ No newline at end of file diff --git a/examples/go.mod b/examples/go.mod index 3a38314..15a797a 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,7 @@ module github.com/pulumi/pulumi-slack/examples go 1.21 -require github.com/pulumi/pulumi/pkg/v3 v3.126.0 +require github.com/pulumi/pulumi/pkg/v3 v3.128.0 require ( cloud.google.com/go v0.112.1 // indirect @@ -123,7 +123,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.9.1 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.126.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.128.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect diff --git a/examples/go.sum b/examples/go.sum index 8ef9011..01fb8a5 100644 --- a/examples/go.sum +++ b/examples/go.sum @@ -342,10 +342,10 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= -github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.128.0 h1:K3qtJYjHg4DkA7LxknY/MoQZ+QHdHQDh/k2njjmjHXM= +github.com/pulumi/pulumi/pkg/v3 v3.128.0/go.mod h1:/spoJXy/mqQ8fBLgXBEbUrAnL7pHdfXOviIo5fZROEY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/provider/go.mod b/provider/go.mod index 828bf35..dd35f9b 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -9,7 +9,7 @@ replace ( require ( github.com/pablovarela/terraform-provider-slack v1.2.2 - github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0 + github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.0 ) require ( @@ -170,8 +170,8 @@ require ( github.com/pulumi/pulumi-java/pkg v0.11.0 // indirect github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 // indirect github.com/pulumi/pulumi-yaml v1.9.1 // indirect - github.com/pulumi/pulumi/pkg/v3 v3.126.0 // indirect - github.com/pulumi/pulumi/sdk/v3 v3.126.0 // indirect + github.com/pulumi/pulumi/pkg/v3 v3.128.0 // indirect + github.com/pulumi/pulumi/sdk/v3 v3.128.0 // indirect github.com/pulumi/schema-tools v0.1.2 // indirect github.com/pulumi/terraform-diff-reader v0.0.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect @@ -203,6 +203,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/yuin/goldmark v1.7.4 // indirect github.com/zclconf/go-cty v1.14.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect diff --git a/provider/go.sum b/provider/go.sum index 02986da..24c0dbc 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -1910,16 +1910,16 @@ github.com/pulumi/providertest v0.0.14 h1:5QlAPAAs82jkQraHsJvq1xgVfC7xtW8sFJwv2p github.com/pulumi/providertest v0.0.14/go.mod h1:GcsqEGgSngwaNOD+kICJPIUQlnA911fGBU8HDlJvVL0= github.com/pulumi/pulumi-java/pkg v0.11.0 h1:Jw9gBvyfmfOMq/EkYDm9+zGPxsDAA8jfeMpHmtZ+1oA= github.com/pulumi/pulumi-java/pkg v0.11.0/go.mod h1:sXAk25P47AQVQL6ilAbFmRNgZykC7og/+87ihnqzFTc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0 h1:0W2Y3Fk7VAWHpjD3FwzVnqWo7g1hD+96C0YDobMnvDU= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.88.0/go.mod h1:QSDiqiCMMbfzrsp3oyRPWgSVE/dkVH5ujxoFappqjdo= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.0 h1:Om0Yw07/5dVABB2ou8+XBCmbp9TUUtDZJEh2B5jPGgI= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.89.0/go.mod h1:EWGqRo+ogMPty23b6rVUajgJXUDSNXU+WqcZTPlzyEI= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8 h1:mav2tSitA9BPJPLLahKgepHyYsMzwaTm4cvp0dcTMYw= github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.8/go.mod h1:qUYk2c9i/yqMGNj9/bQyXpS39BxNDSXYjVN1njnq0zY= github.com/pulumi/pulumi-yaml v1.9.1 h1:JPeI80M23SPactxgnCFS1casZlSr7ZhAXwSx4H55QQ4= github.com/pulumi/pulumi-yaml v1.9.1/go.mod h1:OH0R34yJxA5u6zjYBN4JXcWoEvfkRoOVWi6viu8buoA= -github.com/pulumi/pulumi/pkg/v3 v3.126.0 h1:XaZU1ehjHN2I5ihkfwxK/UFMDiCDM9FSt2TBnbldAx4= -github.com/pulumi/pulumi/pkg/v3 v3.126.0/go.mod h1:1P4/oK9zceOJUm48QQl/TqjDN68lfsdnTR1FITTFddw= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/pkg/v3 v3.128.0 h1:K3qtJYjHg4DkA7LxknY/MoQZ+QHdHQDh/k2njjmjHXM= +github.com/pulumi/pulumi/pkg/v3 v3.128.0/go.mod h1:/spoJXy/mqQ8fBLgXBEbUrAnL7pHdfXOviIo5fZROEY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/pulumi/schema-tools v0.1.2 h1:Fd9xvUjgck4NA+7/jSk7InqCUT4Kj940+EcnbQKpfZo= github.com/pulumi/schema-tools v0.1.2/go.mod h1:62lgj52Tzq11eqWTIaKd+EVyYAu5dEcDJxMhTjvMO/k= github.com/pulumi/terraform-diff-reader v0.0.2 h1:kTE4nEXU3/SYXESvAIem+wyHMI3abqkI3OhJ0G04LLI= @@ -2041,6 +2041,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yuin/goldmark v1.7.4 h1:BDXOHExt+A7gwPCJgPIIq7ENvceR7we7rOS9TNoLZeg= +github.com/yuin/goldmark v1.7.4/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= diff --git a/sdk/go.mod b/sdk/go.mod index 7298250..2b8b633 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.126.0 + github.com/pulumi/pulumi/sdk/v3 v3.128.0 ) require ( diff --git a/sdk/go.sum b/sdk/go.sum index 4a60806..6185e55 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -150,8 +150,8 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs= github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c= -github.com/pulumi/pulumi/sdk/v3 v3.126.0 h1:6GQVhwG2jgnG7wjRiWgrq0/sU39onctAiBcvTlqb20s= -github.com/pulumi/pulumi/sdk/v3 v3.126.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= +github.com/pulumi/pulumi/sdk/v3 v3.128.0 h1:5VPFfygxt6rva0bEYVQZXxsGAo2/D1wsb9erGOtXxzk= +github.com/pulumi/pulumi/sdk/v3 v3.128.0/go.mod h1:p1U24en3zt51agx+WlNboSOV8eLlPWYAkxMzVEXKbnY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index 630820e..dbe1027 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.12.0") + implementation("com.pulumi:pulumi:0.14.0") } task sourcesJar(type: Jar) { @@ -150,4 +150,4 @@ if (signingKey) { useInMemoryPgpKeys(signingKey, signingPassword) sign publishing.publications.mainPublication } -} \ No newline at end of file +} diff --git a/sdk/java/src/main/java/com/pulumi/slack/Conversation.java b/sdk/java/src/main/java/com/pulumi/slack/Conversation.java index 5249868..c54b216 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/Conversation.java +++ b/sdk/java/src/main/java/com/pulumi/slack/Conversation.java @@ -411,7 +411,7 @@ public Output> topic() { * * @param name The _unique_ name of the resulting resource. */ - public Conversation(String name) { + public Conversation(java.lang.String name) { this(name, ConversationArgs.Empty); } /** @@ -419,7 +419,7 @@ public Conversation(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Conversation(String name, ConversationArgs args) { + public Conversation(java.lang.String name, ConversationArgs args) { this(name, args, null); } /** @@ -428,15 +428,22 @@ public Conversation(String name, ConversationArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Conversation(String name, ConversationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("slack:index/conversation:Conversation", name, args == null ? ConversationArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Conversation(java.lang.String name, ConversationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("slack:index/conversation:Conversation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Conversation(String name, Output id, @Nullable ConversationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("slack:index/conversation:Conversation", name, state, makeResourceOptions(options, id)); + private Conversation(java.lang.String name, Output id, @Nullable ConversationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("slack:index/conversation:Conversation", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ConversationArgs makeArgs(ConversationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ConversationArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -452,7 +459,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Conversation get(String name, Output id, @Nullable ConversationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Conversation get(java.lang.String name, Output id, @Nullable ConversationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Conversation(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/slack/Provider.java b/sdk/java/src/main/java/com/pulumi/slack/Provider.java index 3f72668..a8282ec 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/slack/Provider.java @@ -40,7 +40,7 @@ public Output token() { * * @param name The _unique_ name of the resulting resource. */ - public Provider(String name) { + public Provider(java.lang.String name) { this(name, ProviderArgs.Empty); } /** @@ -48,7 +48,7 @@ public Provider(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Provider(String name, ProviderArgs args) { + public Provider(java.lang.String name, ProviderArgs args) { this(name, args, null); } /** @@ -57,11 +57,18 @@ public Provider(String name, ProviderArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Provider(String name, ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("slack", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Provider(java.lang.String name, ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("slack", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static ProviderArgs makeArgs(ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? ProviderArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/slack/SlackFunctions.java b/sdk/java/src/main/java/com/pulumi/slack/SlackFunctions.java index e987d1d..f9c69d5 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/SlackFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/slack/SlackFunctions.java @@ -430,22 +430,22 @@ public static CompletableFuture getConversationPlain(GetC * import java.nio.file.Files; * import java.nio.file.Paths; * - * public class App { - * public static void main(String[] args) { + * public class App }{{@code + * public static void main(String[] args) }{{@code * Pulumi.run(App::stack); - * } + * }}{@code * - * public static void stack(Context ctx) { + * public static void stack(Context ctx) }{{@code * final var byName = SlackFunctions.getUser(GetUserArgs.builder() * .name("my-user") * .build()); * * final var byEmail = SlackFunctions.getUser(GetUserArgs.builder() - * .email("my-user{@literal @}example.com") + * .email("my-user}{@literal @}{@code example.com") * .build()); * - * } - * } + * }}{@code + * }}{@code * } * * <!--End PulumiCodeChooser --> @@ -492,22 +492,22 @@ public static Output getUser() { * import java.nio.file.Files; * import java.nio.file.Paths; * - * public class App { - * public static void main(String[] args) { + * public class App }{{@code + * public static void main(String[] args) }{{@code * Pulumi.run(App::stack); - * } + * }}{@code * - * public static void stack(Context ctx) { + * public static void stack(Context ctx) }{{@code * final var byName = SlackFunctions.getUser(GetUserArgs.builder() * .name("my-user") * .build()); * * final var byEmail = SlackFunctions.getUser(GetUserArgs.builder() - * .email("my-user{@literal @}example.com") + * .email("my-user}{@literal @}{@code example.com") * .build()); * - * } - * } + * }}{@code + * }}{@code * } * * <!--End PulumiCodeChooser --> @@ -554,22 +554,22 @@ public static CompletableFuture getUserPlain() { * import java.nio.file.Files; * import java.nio.file.Paths; * - * public class App { - * public static void main(String[] args) { + * public class App }{{@code + * public static void main(String[] args) }{{@code * Pulumi.run(App::stack); - * } + * }}{@code * - * public static void stack(Context ctx) { + * public static void stack(Context ctx) }{{@code * final var byName = SlackFunctions.getUser(GetUserArgs.builder() * .name("my-user") * .build()); * * final var byEmail = SlackFunctions.getUser(GetUserArgs.builder() - * .email("my-user{@literal @}example.com") + * .email("my-user}{@literal @}{@code example.com") * .build()); * - * } - * } + * }}{@code + * }}{@code * } * * <!--End PulumiCodeChooser --> @@ -616,22 +616,22 @@ public static Output getUser(GetUserArgs args) { * import java.nio.file.Files; * import java.nio.file.Paths; * - * public class App { - * public static void main(String[] args) { + * public class App }{{@code + * public static void main(String[] args) }{{@code * Pulumi.run(App::stack); - * } + * }}{@code * - * public static void stack(Context ctx) { + * public static void stack(Context ctx) }{{@code * final var byName = SlackFunctions.getUser(GetUserArgs.builder() * .name("my-user") * .build()); * * final var byEmail = SlackFunctions.getUser(GetUserArgs.builder() - * .email("my-user{@literal @}example.com") + * .email("my-user}{@literal @}{@code example.com") * .build()); * - * } - * } + * }}{@code + * }}{@code * } * * <!--End PulumiCodeChooser --> @@ -678,22 +678,22 @@ public static CompletableFuture getUserPlain(GetUserPlainArgs arg * import java.nio.file.Files; * import java.nio.file.Paths; * - * public class App { - * public static void main(String[] args) { + * public class App }{{@code + * public static void main(String[] args) }{{@code * Pulumi.run(App::stack); - * } + * }}{@code * - * public static void stack(Context ctx) { + * public static void stack(Context ctx) }{{@code * final var byName = SlackFunctions.getUser(GetUserArgs.builder() * .name("my-user") * .build()); * * final var byEmail = SlackFunctions.getUser(GetUserArgs.builder() - * .email("my-user{@literal @}example.com") + * .email("my-user}{@literal @}{@code example.com") * .build()); * - * } - * } + * }}{@code + * }}{@code * } * * <!--End PulumiCodeChooser --> @@ -740,22 +740,22 @@ public static Output getUser(GetUserArgs args, InvokeOptions opti * import java.nio.file.Files; * import java.nio.file.Paths; * - * public class App { - * public static void main(String[] args) { + * public class App }{{@code + * public static void main(String[] args) }{{@code * Pulumi.run(App::stack); - * } + * }}{@code * - * public static void stack(Context ctx) { + * public static void stack(Context ctx) }{{@code * final var byName = SlackFunctions.getUser(GetUserArgs.builder() * .name("my-user") * .build()); * * final var byEmail = SlackFunctions.getUser(GetUserArgs.builder() - * .email("my-user{@literal @}example.com") + * .email("my-user}{@literal @}{@code example.com") * .build()); * - * } - * } + * }}{@code + * }}{@code * } * * <!--End PulumiCodeChooser --> diff --git a/sdk/java/src/main/java/com/pulumi/slack/Usergroup.java b/sdk/java/src/main/java/com/pulumi/slack/Usergroup.java index a4d4042..19b3fa7 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/Usergroup.java +++ b/sdk/java/src/main/java/com/pulumi/slack/Usergroup.java @@ -215,7 +215,7 @@ public Output>> users() { * * @param name The _unique_ name of the resulting resource. */ - public Usergroup(String name) { + public Usergroup(java.lang.String name) { this(name, UsergroupArgs.Empty); } /** @@ -223,7 +223,7 @@ public Usergroup(String name) { * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ - public Usergroup(String name, @Nullable UsergroupArgs args) { + public Usergroup(java.lang.String name, @Nullable UsergroupArgs args) { this(name, args, null); } /** @@ -232,15 +232,22 @@ public Usergroup(String name, @Nullable UsergroupArgs args) { * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ - public Usergroup(String name, @Nullable UsergroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("slack:index/usergroup:Usergroup", name, args == null ? UsergroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + public Usergroup(java.lang.String name, @Nullable UsergroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("slack:index/usergroup:Usergroup", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } - private Usergroup(String name, Output id, @Nullable UsergroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("slack:index/usergroup:Usergroup", name, state, makeResourceOptions(options, id)); + private Usergroup(java.lang.String name, Output id, @Nullable UsergroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("slack:index/usergroup:Usergroup", name, state, makeResourceOptions(options, id), false); } - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + private static UsergroupArgs makeArgs(@Nullable UsergroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + if (options != null && options.getUrn().isPresent()) { + return null; + } + return args == null ? UsergroupArgs.Empty : args; + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); @@ -256,7 +263,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N * @param state * @param options Optional settings to control the behavior of the CustomResource. */ - public static Usergroup get(String name, Output id, @Nullable UsergroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { + public static Usergroup get(java.lang.String name, Output id, @Nullable UsergroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Usergroup(name, id, state, options); } } diff --git a/sdk/java/src/main/java/com/pulumi/slack/Utilities.java b/sdk/java/src/main/java/com/pulumi/slack/Utilities.java index fc93fd1..08bb5d3 100644 --- a/sdk/java/src/main/java/com/pulumi/slack/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/slack/Utilities.java @@ -17,7 +17,7 @@ public class Utilities { - public static Optional getEnv(String... names) { + public static Optional getEnv(java.lang.String... names) { for (var n : names) { var value = Environment.getEnvironmentVariable(n); if (value.isValue()) { @@ -27,7 +27,7 @@ public static Optional getEnv(String... names) { return Optional.empty(); } - public static Optional getEnvBoolean(String... names) { + public static Optional getEnvBoolean(java.lang.String... names) { for (var n : names) { var value = Environment.getBooleanEnvironmentVariable(n); if (value.isValue()) { @@ -37,7 +37,7 @@ public static Optional getEnvBoolean(String... names) { return Optional.empty(); } - public static Optional getEnvInteger(String... names) { + public static Optional getEnvInteger(java.lang.String... names) { for (var n : names) { var value = Environment.getIntegerEnvironmentVariable(n); if (value.isValue()) { @@ -47,7 +47,7 @@ public static Optional getEnvInteger(String... names) { return Optional.empty(); } - public static Optional getEnvDouble(String... names) { + public static Optional getEnvDouble(java.lang.String... names) { for (var n : names) { var value = Environment.getDoubleEnvironmentVariable(n); if (value.isValue()) { @@ -68,8 +68,8 @@ public static InvokeOptions withVersion(@Nullable InvokeOptions options) { ); } - private static final String version; - public static String getVersion() { + private static final java.lang.String version; + public static java.lang.String getVersion() { return version; } @@ -78,7 +78,7 @@ public static String getVersion() { var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName); if (versionFile == null) { throw new IllegalStateException( - String.format("expected resource '%s' on Classpath, not found", resourceName) + java.lang.String.format("expected resource '%s' on Classpath, not found", resourceName) ); } version = new BufferedReader(new InputStreamReader(versionFile))