Skip to content

Commit 339acab

Browse files
committed
sdk fix
1 parent b7391fc commit 339acab

File tree

14 files changed

+434
-1
lines changed

14 files changed

+434
-1
lines changed

astra-sdk/src/main/java/com/datastax/astra/sdk/config/AstraClientConfig.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,19 @@ public String getSecureConnectBundleFolder() {
302302
return secureConnectBundleFolder;
303303
}
304304

305+
/**
306+
* Provide path of the SCB.
307+
*
308+
* @param path
309+
* target scb
310+
* @return
311+
* reference to current scb
312+
*/
313+
public AstraClientConfig secureConnectBundleFolder(String path) {
314+
this.secureConnectBundleFolder = path;
315+
return this;
316+
}
317+
305318
/**
306319
* Getter for downloadSecureConnectBundle.
307320
*

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/Database.java

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* @author Cedrick LUNVEN (@clunven)
2525
*/
26-
@JsonIgnoreProperties
26+
@JsonIgnoreProperties(ignoreUnknown = true)
2727
public class Database {
2828

2929
private String id;
@@ -32,9 +32,11 @@ public class Database {
3232

3333
private String creationTime;
3434
private String terminationTime;
35+
private String lastUsageTime;
3536

3637
private DatabaseInfo info;
3738
private DatabaseStatusType status;
39+
private DatabaseStatusType observedStatus;
3840
private DatabaseStorage storage;
3941
private DatabaseCost cost;
4042
private DatabaseMetrics metrics;
@@ -349,6 +351,44 @@ public DatabaseStorage getStorage() {
349351
public Set<String> getAvailableActions() {
350352
return availableActions;
351353
}
354+
355+
/**
356+
* Getter accessor for attribute 'lastUsageTime'.
357+
*
358+
* @return
359+
* current value of 'lastUsageTime'
360+
*/
361+
public String getLastUsageTime() {
362+
return lastUsageTime;
363+
}
364+
365+
/**
366+
* Setter accessor for attribute 'lastUsageTime'.
367+
* @param lastUsageTime
368+
* new value for 'lastUsageTime '
369+
*/
370+
public void setLastUsageTime(String lastUsageTime) {
371+
this.lastUsageTime = lastUsageTime;
372+
}
373+
374+
/**
375+
* Getter accessor for attribute 'observedStatus'.
376+
*
377+
* @return
378+
* current value of 'observedStatus'
379+
*/
380+
public DatabaseStatusType getObservedStatus() {
381+
return observedStatus;
382+
}
383+
384+
/**
385+
* Setter accessor for attribute 'observedStatus'.
386+
* @param observedStatus
387+
* new value for 'observedStatus '
388+
*/
389+
public void setObservedStatus(DatabaseStatusType observedStatus) {
390+
this.observedStatus = observedStatus;
391+
}
352392

353393

354394
}

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseCost.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616

1717
package com.datastax.astra.sdk.databases.domain;
1818

19+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20+
1921
/**
2022
* @author Cedrick LUNVEN (@clunven)
2123
*/
24+
@JsonIgnoreProperties(ignoreUnknown = true)
2225
public class DatabaseCost {
2326

2427
double costPerMinCents = 0;
@@ -34,6 +37,9 @@ public class DatabaseCost {
3437
double costPerDayParkedCents = 0;
3538
double costPerMonthParkedCents = 0;
3639
double costPerNetworkGbCents = 0;
40+
double costPerWrittenGbCents = 0;
41+
double costPerReadGbCents = 0;
42+
3743
/**
3844
* Getter accessor for attribute 'costPerMinCents'.
3945
*
@@ -255,4 +261,38 @@ public double getCostPerNetworkGbCents() {
255261
public void setCostPerNetworkGbCents(double costPerNetworkGbCents) {
256262
this.costPerNetworkGbCents = costPerNetworkGbCents;
257263
}
264+
/**
265+
* Getter accessor for attribute 'costPerWrittenGbCents'.
266+
*
267+
* @return
268+
* current value of 'costPerWrittenGbCents'
269+
*/
270+
public double getCostPerWrittenGbCents() {
271+
return costPerWrittenGbCents;
272+
}
273+
/**
274+
* Setter accessor for attribute 'costPerWrittenGbCents'.
275+
* @param costPerWrittenGbCents
276+
* new value for 'costPerWrittenGbCents '
277+
*/
278+
public void setCostPerWrittenGbCents(double costPerWrittenGbCents) {
279+
this.costPerWrittenGbCents = costPerWrittenGbCents;
280+
}
281+
/**
282+
* Getter accessor for attribute 'costPerReadGbCents'.
283+
*
284+
* @return
285+
* current value of 'costPerReadGbCents'
286+
*/
287+
public double getCostPerReadGbCents() {
288+
return costPerReadGbCents;
289+
}
290+
/**
291+
* Setter accessor for attribute 'costPerReadGbCents'.
292+
* @param costPerReadGbCents
293+
* new value for 'costPerReadGbCents '
294+
*/
295+
public void setCostPerReadGbCents(double costPerReadGbCents) {
296+
this.costPerReadGbCents = costPerReadGbCents;
297+
}
258298
}

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseFilter.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818

1919
import java.util.Optional;
2020

21+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
22+
2123
/**
2224
* Create a filter.
2325
*
2426
* @author Cedrick LUNVEN (@clunven)
2527
*/
28+
@JsonIgnoreProperties(ignoreUnknown = true)
2629
public class DatabaseFilter {
2730

2831
/** default limit */

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818

1919
import java.util.Set;
2020

21+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
22+
2123
/**
2224
* Wrapper for DatabaseInfo attribut in findDatabase.
2325
*
2426
* @author Cedrick LUNVEN (@clunven)
2527
*/
28+
@JsonIgnoreProperties(ignoreUnknown = true)
2629
public class DatabaseInfo {
2730

2831
/** Name of the database--user friendly identifier. */

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseMetrics.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616

1717
package com.datastax.astra.sdk.databases.domain;
1818

19+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20+
1921
/**
2022
* Wrap Database Metrics.
2123
*
2224
* @author Cedrick LUNVEN (@clunven)
2325
*/
26+
@JsonIgnoreProperties(ignoreUnknown = true)
2427
public class DatabaseMetrics {
2528

2629
private int writeRequestsTotalCount;

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseRegion.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616

1717
package com.datastax.astra.sdk.databases.domain;
1818

19+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20+
1921
/**
2022
* @author Cedrick LUNVEN (@clunven)
2123
*/
24+
@JsonIgnoreProperties(ignoreUnknown = true)
2225
public class DatabaseRegion {
2326

2427
//private DatabaseTierType tier = DatabaseTierType.developer;

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseRegionServerless.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
package com.datastax.astra.sdk.databases.domain;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4+
35
/**
46
* Hold object returned by accessing servlerss list.
57
*
68
* @author Cedrick LUNVEN (@clunven)
79
*/
10+
@JsonIgnoreProperties(ignoreUnknown = true)
811
public class DatabaseRegionServerless {
912

1013
/** Region Name. */

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseStatusType.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public enum DatabaseStatusType {
2929
/** */
3030
HIBERNATED,
3131
/** */
32+
HIBERNATING,
33+
/** */
3234
INITIALIZING,
3335
/** */
3436
MAINTENANCE,
@@ -45,6 +47,8 @@ public enum DatabaseStatusType {
4547
/** */
4648
RESIZING,
4749
/** */
50+
RESUMING,
51+
/** */
4852
TERMINATED,
4953
/** */
5054
TERMINATING,

astra-sdk/src/main/java/com/datastax/astra/sdk/databases/domain/DatabaseStorage.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616

1717
package com.datastax.astra.sdk.databases.domain;
1818

19+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
20+
1921
/**
2022
* Represents Storage information for the db.
2123
*
2224
* @author Cedrick LUNVEN (@clunven)
2325
*/
26+
@JsonIgnoreProperties(ignoreUnknown = true)
2427
public class DatabaseStorage {
2528

2629
private int nodeCount;

0 commit comments

Comments
 (0)