More renames
This commit is contained in:
0
sdk/java/README.md
Normal file
0
sdk/java/README.md
Normal file
47
sdk/java/src/main/java/com/pulumi/dockernative/Provider.java
Normal file
47
sdk/java/src/main/java/com/pulumi/dockernative/Provider.java
Normal file
@@ -0,0 +1,47 @@
|
||||
// *** WARNING: this file was generated by pulumi. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package com.pulumi.dockernative;
|
||||
|
||||
import com.pulumi.core.Output;
|
||||
import com.pulumi.core.annotations.ResourceType;
|
||||
import com.pulumi.core.internal.Codegen;
|
||||
import com.pulumi.dockernative.ProviderArgs;
|
||||
import com.pulumi.dockernative.Utilities;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ResourceType(type="pulumi:providers:docker-native")
|
||||
public class Provider extends com.pulumi.resources.ProviderResource {
|
||||
/**
|
||||
*
|
||||
* @param name The _unique_ name of the resulting resource.
|
||||
*/
|
||||
public Provider(String name) {
|
||||
this(name, ProviderArgs.Empty);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @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, @Nullable ProviderArgs args) {
|
||||
this(name, args, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param name The _unique_ name of the resulting resource.
|
||||
* @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, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
|
||||
super("docker-native", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
|
||||
}
|
||||
|
||||
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
|
||||
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
|
||||
.version(Utilities.getVersion())
|
||||
.build();
|
||||
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// *** WARNING: this file was generated by pulumi. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package com.pulumi.dockernative;
|
||||
|
||||
|
||||
|
||||
|
||||
public final class ProviderArgs extends com.pulumi.resources.ResourceArgs {
|
||||
|
||||
public static final ProviderArgs Empty = new ProviderArgs();
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static final class Builder {
|
||||
private ProviderArgs $;
|
||||
|
||||
public Builder() {
|
||||
$ = new ProviderArgs();
|
||||
}
|
||||
public ProviderArgs build() {
|
||||
return $;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
78
sdk/java/src/main/java/com/pulumi/dockernative/Random.java
Normal file
78
sdk/java/src/main/java/com/pulumi/dockernative/Random.java
Normal file
@@ -0,0 +1,78 @@
|
||||
// *** WARNING: this file was generated by pulumi. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package com.pulumi.dockernative;
|
||||
|
||||
import com.pulumi.core.Output;
|
||||
import com.pulumi.core.annotations.Export;
|
||||
import com.pulumi.core.annotations.ResourceType;
|
||||
import com.pulumi.core.internal.Codegen;
|
||||
import com.pulumi.dockernative.RandomArgs;
|
||||
import com.pulumi.dockernative.Utilities;
|
||||
import java.lang.Integer;
|
||||
import java.lang.String;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@ResourceType(type="docker-native:index:Random")
|
||||
public class Random extends com.pulumi.resources.CustomResource {
|
||||
@Export(name="length", refs={Integer.class}, tree="[0]")
|
||||
private Output<Integer> length;
|
||||
|
||||
public Output<Integer> length() {
|
||||
return this.length;
|
||||
}
|
||||
@Export(name="result", refs={String.class}, tree="[0]")
|
||||
private Output<String> result;
|
||||
|
||||
public Output<String> result() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param name The _unique_ name of the resulting resource.
|
||||
*/
|
||||
public Random(String name) {
|
||||
this(name, RandomArgs.Empty);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param name The _unique_ name of the resulting resource.
|
||||
* @param args The arguments to use to populate this resource's properties.
|
||||
*/
|
||||
public Random(String name, RandomArgs args) {
|
||||
this(name, args, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param name The _unique_ name of the resulting resource.
|
||||
* @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 Random(String name, RandomArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
|
||||
super("docker-native:index:Random", name, args == null ? RandomArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
|
||||
}
|
||||
|
||||
private Random(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
|
||||
super("docker-native:index:Random", name, null, makeResourceOptions(options, id));
|
||||
}
|
||||
|
||||
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
|
||||
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
|
||||
.version(Utilities.getVersion())
|
||||
.build();
|
||||
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an existing Host resource's state with the given name, ID, and optional extra
|
||||
* properties used to qualify the lookup.
|
||||
*
|
||||
* @param name The _unique_ name of the resulting resource.
|
||||
* @param id The _unique_ provider ID of the resource to lookup.
|
||||
* @param options Optional settings to control the behavior of the CustomResource.
|
||||
*/
|
||||
public static Random get(String name, Output<String> id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
|
||||
return new Random(name, id, options);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
// *** WARNING: this file was generated by pulumi. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package com.pulumi.dockernative;
|
||||
|
||||
import com.pulumi.core.Output;
|
||||
import com.pulumi.core.annotations.Import;
|
||||
import com.pulumi.exceptions.MissingRequiredPropertyException;
|
||||
import java.lang.Integer;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
public final class RandomArgs extends com.pulumi.resources.ResourceArgs {
|
||||
|
||||
public static final RandomArgs Empty = new RandomArgs();
|
||||
|
||||
@Import(name="length", required=true)
|
||||
private Output<Integer> length;
|
||||
|
||||
public Output<Integer> length() {
|
||||
return this.length;
|
||||
}
|
||||
|
||||
private RandomArgs() {}
|
||||
|
||||
private RandomArgs(RandomArgs $) {
|
||||
this.length = $.length;
|
||||
}
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
public static Builder builder(RandomArgs defaults) {
|
||||
return new Builder(defaults);
|
||||
}
|
||||
|
||||
public static final class Builder {
|
||||
private RandomArgs $;
|
||||
|
||||
public Builder() {
|
||||
$ = new RandomArgs();
|
||||
}
|
||||
|
||||
public Builder(RandomArgs defaults) {
|
||||
$ = new RandomArgs(Objects.requireNonNull(defaults));
|
||||
}
|
||||
|
||||
public Builder length(Output<Integer> length) {
|
||||
$.length = length;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder length(Integer length) {
|
||||
return length(Output.of(length));
|
||||
}
|
||||
|
||||
public RandomArgs build() {
|
||||
if ($.length == null) {
|
||||
throw new MissingRequiredPropertyException("RandomArgs", "length");
|
||||
}
|
||||
return $;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
// *** WARNING: this file was generated by pulumi. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package com.pulumi.dockernative;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Nullable;
|
||||
import com.pulumi.core.internal.Environment;
|
||||
import com.pulumi.deployment.InvokeOptions;
|
||||
|
||||
public class Utilities {
|
||||
|
||||
public static Optional<String> getEnv(String... names) {
|
||||
for (var n : names) {
|
||||
var value = Environment.getEnvironmentVariable(n);
|
||||
if (value.isValue()) {
|
||||
return Optional.of(value.value());
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
public static Optional<Boolean> getEnvBoolean(String... names) {
|
||||
for (var n : names) {
|
||||
var value = Environment.getBooleanEnvironmentVariable(n);
|
||||
if (value.isValue()) {
|
||||
return Optional.of(value.value());
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
public static Optional<Integer> getEnvInteger(String... names) {
|
||||
for (var n : names) {
|
||||
var value = Environment.getIntegerEnvironmentVariable(n);
|
||||
if (value.isValue()) {
|
||||
return Optional.of(value.value());
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
public static Optional<Double> getEnvDouble(String... names) {
|
||||
for (var n : names) {
|
||||
var value = Environment.getDoubleEnvironmentVariable(n);
|
||||
if (value.isValue()) {
|
||||
return Optional.of(value.value());
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
public static InvokeOptions withVersion(@Nullable InvokeOptions options) {
|
||||
if (options != null && options.getVersion().isPresent()) {
|
||||
return options;
|
||||
}
|
||||
return new InvokeOptions(
|
||||
options == null ? null : options.getParent().orElse(null),
|
||||
options == null ? null : options.getProvider().orElse(null),
|
||||
getVersion()
|
||||
);
|
||||
}
|
||||
|
||||
private static final String version;
|
||||
public static String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
static {
|
||||
var resourceName = "com/pulumi/docker-native/version.txt";
|
||||
var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName);
|
||||
if (versionFile == null) {
|
||||
throw new IllegalStateException(
|
||||
String.format("expected resource '%s' on Classpath, not found", resourceName)
|
||||
);
|
||||
}
|
||||
version = new BufferedReader(new InputStreamReader(versionFile))
|
||||
.lines()
|
||||
.collect(Collectors.joining("\n"))
|
||||
.trim();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user