Skip to content

Commit 59b67db

Browse files
committed
Release v1.7.12
1 parent d1f0fcb commit 59b67db

3 files changed

Lines changed: 39 additions & 8 deletions

File tree

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ java {
4646

4747
group = 'com.flagright.api'
4848

49-
version = 'v1.7.11'
49+
version = 'v1.7.12'
5050

5151
jar {
5252
dependsOn(":generatePomFileForMavenPublication")
@@ -77,7 +77,7 @@ publishing {
7777
maven(MavenPublication) {
7878
groupId = 'com.flagright.api'
7979
artifactId = 'flagright-java'
80-
version = 'v1.7.11'
80+
version = 'v1.7.12'
8181
from components.java
8282
pom {
8383
name = 'flagright'

src/main/java/com/flagright/api/core/ClientOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ private ClientOptions(
3232
this.headers.putAll(headers);
3333
this.headers.putAll(new HashMap<String, String>() {
3434
{
35-
put("User-Agent", "com.flagright.api:flagright-java/v1.7.11");
35+
put("User-Agent", "com.flagright.api:flagright-java/v1.7.12");
3636
put("X-Fern-Language", "JAVA");
3737
put("X-Fern-SDK-Name", "com.flagright.fern:api-sdk");
38-
put("X-Fern-SDK-Version", "v1.7.11");
38+
put("X-Fern-SDK-Version", "v1.7.12");
3939
}
4040
});
4141
this.headerSuppliers = headerSuppliers;

src/main/java/com/flagright/api/types/CustomColumn.java

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
import com.fasterxml.jackson.annotation.JsonInclude;
1010
import com.fasterxml.jackson.annotation.JsonProperty;
1111
import com.fasterxml.jackson.annotation.JsonSetter;
12+
import com.fasterxml.jackson.annotation.Nulls;
1213
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
1314
import com.flagright.api.core.ObjectMappers;
1415
import java.util.HashMap;
1516
import java.util.Map;
1617
import java.util.Objects;
18+
import java.util.Optional;
1719
import org.jetbrains.annotations.NotNull;
1820

1921
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@@ -23,11 +25,15 @@ public final class CustomColumn {
2325

2426
private final ColumnType type;
2527

28+
private final Optional<Boolean> primaryKey;
29+
2630
private final Map<String, Object> additionalProperties;
2731

28-
private CustomColumn(String key, ColumnType type, Map<String, Object> additionalProperties) {
32+
private CustomColumn(
33+
String key, ColumnType type, Optional<Boolean> primaryKey, Map<String, Object> additionalProperties) {
2934
this.key = key;
3035
this.type = type;
36+
this.primaryKey = primaryKey;
3137
this.additionalProperties = additionalProperties;
3238
}
3339

@@ -41,6 +47,11 @@ public ColumnType getType() {
4147
return type;
4248
}
4349

50+
@JsonProperty("primaryKey")
51+
public Optional<Boolean> getPrimaryKey() {
52+
return primaryKey;
53+
}
54+
4455
@java.lang.Override
4556
public boolean equals(Object other) {
4657
if (this == other) return true;
@@ -53,12 +64,12 @@ public Map<String, Object> getAdditionalProperties() {
5364
}
5465

5566
private boolean equalTo(CustomColumn other) {
56-
return key.equals(other.key) && type.equals(other.type);
67+
return key.equals(other.key) && type.equals(other.type) && primaryKey.equals(other.primaryKey);
5768
}
5869

5970
@java.lang.Override
6071
public int hashCode() {
61-
return Objects.hash(this.key, this.type);
72+
return Objects.hash(this.key, this.type, this.primaryKey);
6273
}
6374

6475
@java.lang.Override
@@ -82,6 +93,10 @@ public interface TypeStage {
8293

8394
public interface _FinalStage {
8495
CustomColumn build();
96+
97+
_FinalStage primaryKey(Optional<Boolean> primaryKey);
98+
99+
_FinalStage primaryKey(Boolean primaryKey);
85100
}
86101

87102
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -90,6 +105,8 @@ public static final class Builder implements KeyStage, TypeStage, _FinalStage {
90105

91106
private ColumnType type;
92107

108+
private Optional<Boolean> primaryKey = Optional.empty();
109+
93110
@JsonAnySetter
94111
private Map<String, Object> additionalProperties = new HashMap<>();
95112

@@ -99,6 +116,7 @@ private Builder() {}
99116
public Builder from(CustomColumn other) {
100117
key(other.getKey());
101118
type(other.getType());
119+
primaryKey(other.getPrimaryKey());
102120
return this;
103121
}
104122

@@ -116,9 +134,22 @@ public _FinalStage type(@NotNull ColumnType type) {
116134
return this;
117135
}
118136

137+
@java.lang.Override
138+
public _FinalStage primaryKey(Boolean primaryKey) {
139+
this.primaryKey = Optional.ofNullable(primaryKey);
140+
return this;
141+
}
142+
143+
@java.lang.Override
144+
@JsonSetter(value = "primaryKey", nulls = Nulls.SKIP)
145+
public _FinalStage primaryKey(Optional<Boolean> primaryKey) {
146+
this.primaryKey = primaryKey;
147+
return this;
148+
}
149+
119150
@java.lang.Override
120151
public CustomColumn build() {
121-
return new CustomColumn(key, type, additionalProperties);
152+
return new CustomColumn(key, type, primaryKey, additionalProperties);
122153
}
123154
}
124155
}

0 commit comments

Comments
 (0)