Skip to content

Commit 40dec38

Browse files
authored
Merge pull request #171 from pulumi/pulumi-bot/resync-3484340429
Fix up build for pulumi-postgresql
2 parents 1659825 + c9fd417 commit 40dec38

File tree

4 files changed

+56
-70
lines changed

4 files changed

+56
-70
lines changed

sdk/java/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ repositories {
4242

4343
dependencies {
4444
implementation("com.google.code.findbugs:jsr305:3.0.2")
45-
implementation("com.pulumi:pulumi:0.5.0")
45+
implementation("com.google.code.gson:gson:2.8.9")
46+
implementation("com.pulumi:pulumi:0.5.4")
4647
}
4748

4849
task sourcesJar(type: Jar) {

sdk/java/src/main/java/com/pulumi/postgresql/config/inputs/Clientcert.java

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@
99

1010
@CustomType
1111
public final class Clientcert {
12-
private final String cert;
13-
private final String key;
14-
15-
@CustomType.Constructor
16-
private Clientcert(
17-
@CustomType.Parameter("cert") String cert,
18-
@CustomType.Parameter("key") String key) {
19-
this.cert = cert;
20-
this.key = key;
21-
}
12+
private String cert;
13+
private String key;
2214

15+
private Clientcert() {}
2316
public String cert() {
2417
return this.cert;
2518
}
@@ -34,30 +27,32 @@ public static Builder builder() {
3427
public static Builder builder(Clientcert defaults) {
3528
return new Builder(defaults);
3629
}
37-
30+
@CustomType.Builder
3831
public static final class Builder {
3932
private String cert;
4033
private String key;
41-
42-
public Builder() {
43-
// Empty
44-
}
45-
34+
public Builder() {}
4635
public Builder(Clientcert defaults) {
4736
Objects.requireNonNull(defaults);
4837
this.cert = defaults.cert;
4938
this.key = defaults.key;
5039
}
5140

41+
@CustomType.Setter
5242
public Builder cert(String cert) {
5343
this.cert = Objects.requireNonNull(cert);
5444
return this;
5545
}
46+
@CustomType.Setter
5647
public Builder key(String key) {
5748
this.key = Objects.requireNonNull(key);
5849
return this;
59-
} public Clientcert build() {
60-
return new Clientcert(cert, key);
50+
}
51+
public Clientcert build() {
52+
final var o = new Clientcert();
53+
o.cert = cert;
54+
o.key = key;
55+
return o;
6156
}
6257
}
6358
}

sdk/java/src/main/java/com/pulumi/postgresql/outputs/FunctionArg.java

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,24 @@ public final class FunctionArg {
1515
* @return An expression to be used as default value if the parameter is not specified.
1616
*
1717
*/
18-
private final @Nullable String default_;
18+
private @Nullable String default_;
1919
/**
2020
* @return Can be one of IN, INOUT, OUT, or VARIADIC. Default is IN.
2121
*
2222
*/
23-
private final @Nullable String mode;
23+
private @Nullable String mode;
2424
/**
2525
* @return The name of the argument.
2626
*
2727
*/
28-
private final @Nullable String name;
28+
private @Nullable String name;
2929
/**
3030
* @return The type of the argument.
3131
*
3232
*/
33-
private final String type;
34-
35-
@CustomType.Constructor
36-
private FunctionArg(
37-
@CustomType.Parameter("default") @Nullable String default_,
38-
@CustomType.Parameter("mode") @Nullable String mode,
39-
@CustomType.Parameter("name") @Nullable String name,
40-
@CustomType.Parameter("type") String type) {
41-
this.default_ = default_;
42-
this.mode = mode;
43-
this.name = name;
44-
this.type = type;
45-
}
33+
private String type;
4634

35+
private FunctionArg() {}
4736
/**
4837
* @return An expression to be used as default value if the parameter is not specified.
4938
*
@@ -80,17 +69,13 @@ public static Builder builder() {
8069
public static Builder builder(FunctionArg defaults) {
8170
return new Builder(defaults);
8271
}
83-
72+
@CustomType.Builder
8473
public static final class Builder {
8574
private @Nullable String default_;
8675
private @Nullable String mode;
8776
private @Nullable String name;
8877
private String type;
89-
90-
public Builder() {
91-
// Empty
92-
}
93-
78+
public Builder() {}
9479
public Builder(FunctionArg defaults) {
9580
Objects.requireNonNull(defaults);
9681
this.default_ = defaults.default_;
@@ -99,23 +84,33 @@ public Builder(FunctionArg defaults) {
9984
this.type = defaults.type;
10085
}
10186

87+
@CustomType.Setter("default")
10288
public Builder default_(@Nullable String default_) {
10389
this.default_ = default_;
10490
return this;
10591
}
92+
@CustomType.Setter
10693
public Builder mode(@Nullable String mode) {
10794
this.mode = mode;
10895
return this;
10996
}
97+
@CustomType.Setter
11098
public Builder name(@Nullable String name) {
11199
this.name = name;
112100
return this;
113101
}
102+
@CustomType.Setter
114103
public Builder type(String type) {
115104
this.type = Objects.requireNonNull(type);
116105
return this;
117-
} public FunctionArg build() {
118-
return new FunctionArg(default_, mode, name, type);
106+
}
107+
public FunctionArg build() {
108+
final var o = new FunctionArg();
109+
o.default_ = default_;
110+
o.mode = mode;
111+
o.name = name;
112+
o.type = type;
113+
return o;
119114
}
120115
}
121116
}

sdk/java/src/main/java/com/pulumi/postgresql/outputs/SchemaPolicy.java

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,29 @@ public final class SchemaPolicy {
1616
* @return Should the specified ROLE have CREATE privileges to the specified SCHEMA.
1717
*
1818
*/
19-
private final @Nullable Boolean create;
19+
private @Nullable Boolean create;
2020
/**
2121
* @return Should the specified ROLE have CREATE privileges to the specified SCHEMA and the ability to GRANT the CREATE privilege to other ROLEs.
2222
*
2323
*/
24-
private final @Nullable Boolean createWithGrant;
24+
private @Nullable Boolean createWithGrant;
2525
/**
2626
* @return The ROLE who is receiving the policy. If this value is empty or not specified it implies the policy is referring to the [`PUBLIC` role](https://www.postgresql.org/docs/current/static/sql-grant.html).
2727
*
2828
*/
29-
private final @Nullable String role;
29+
private @Nullable String role;
3030
/**
3131
* @return Should the specified ROLE have USAGE privileges to the specified SCHEMA.
3232
*
3333
*/
34-
private final @Nullable Boolean usage;
34+
private @Nullable Boolean usage;
3535
/**
3636
* @return Should the specified ROLE have USAGE privileges to the specified SCHEMA and the ability to GRANT the USAGE privilege to other ROLEs.
3737
*
3838
*/
39-
private final @Nullable Boolean usageWithGrant;
40-
41-
@CustomType.Constructor
42-
private SchemaPolicy(
43-
@CustomType.Parameter("create") @Nullable Boolean create,
44-
@CustomType.Parameter("createWithGrant") @Nullable Boolean createWithGrant,
45-
@CustomType.Parameter("role") @Nullable String role,
46-
@CustomType.Parameter("usage") @Nullable Boolean usage,
47-
@CustomType.Parameter("usageWithGrant") @Nullable Boolean usageWithGrant) {
48-
this.create = create;
49-
this.createWithGrant = createWithGrant;
50-
this.role = role;
51-
this.usage = usage;
52-
this.usageWithGrant = usageWithGrant;
53-
}
39+
private @Nullable Boolean usageWithGrant;
5440

41+
private SchemaPolicy() {}
5542
/**
5643
* @return Should the specified ROLE have CREATE privileges to the specified SCHEMA.
5744
*
@@ -95,18 +82,14 @@ public static Builder builder() {
9582
public static Builder builder(SchemaPolicy defaults) {
9683
return new Builder(defaults);
9784
}
98-
85+
@CustomType.Builder
9986
public static final class Builder {
10087
private @Nullable Boolean create;
10188
private @Nullable Boolean createWithGrant;
10289
private @Nullable String role;
10390
private @Nullable Boolean usage;
10491
private @Nullable Boolean usageWithGrant;
105-
106-
public Builder() {
107-
// Empty
108-
}
109-
92+
public Builder() {}
11093
public Builder(SchemaPolicy defaults) {
11194
Objects.requireNonNull(defaults);
11295
this.create = defaults.create;
@@ -116,27 +99,39 @@ public Builder(SchemaPolicy defaults) {
11699
this.usageWithGrant = defaults.usageWithGrant;
117100
}
118101

102+
@CustomType.Setter
119103
public Builder create(@Nullable Boolean create) {
120104
this.create = create;
121105
return this;
122106
}
107+
@CustomType.Setter
123108
public Builder createWithGrant(@Nullable Boolean createWithGrant) {
124109
this.createWithGrant = createWithGrant;
125110
return this;
126111
}
112+
@CustomType.Setter
127113
public Builder role(@Nullable String role) {
128114
this.role = role;
129115
return this;
130116
}
117+
@CustomType.Setter
131118
public Builder usage(@Nullable Boolean usage) {
132119
this.usage = usage;
133120
return this;
134121
}
122+
@CustomType.Setter
135123
public Builder usageWithGrant(@Nullable Boolean usageWithGrant) {
136124
this.usageWithGrant = usageWithGrant;
137125
return this;
138-
} public SchemaPolicy build() {
139-
return new SchemaPolicy(create, createWithGrant, role, usage, usageWithGrant);
126+
}
127+
public SchemaPolicy build() {
128+
final var o = new SchemaPolicy();
129+
o.create = create;
130+
o.createWithGrant = createWithGrant;
131+
o.role = role;
132+
o.usage = usage;
133+
o.usageWithGrant = usageWithGrant;
134+
return o;
140135
}
141136
}
142137
}

0 commit comments

Comments
 (0)