Skip to content

Commit

Permalink
Automated SDK update
Browse files Browse the repository at this point in the history
This updates the SDK from internal repo commit segmentio/public-api@f77d7546.
  • Loading branch information
APIs and Common Services team committed Sep 25, 2024
1 parent 0cae590 commit 41cb7bc
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public CreateFilterForSpaceInput integrationId(String integrationId) {
}

/**
* The Space id to filer on.
* The Space id to filter on.
*
* @return integrationId
*/
Expand Down
78 changes: 76 additions & 2 deletions src/main/java/com/segment/publicapi/models/Filter.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ public class Filter {
@SerializedName(SERIALIZED_NAME_ALLOW_PROPERTIES)
private List<String> allowProperties;

public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";

@SerializedName(SERIALIZED_NAME_CREATED_AT)
private String createdAt;

public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";

@SerializedName(SERIALIZED_NAME_UPDATED_AT)
private String updatedAt;

public Filter() {}

public Filter id(String id) {
Expand Down Expand Up @@ -299,6 +309,46 @@ public void setAllowProperties(List<String> allowProperties) {
this.allowProperties = allowProperties;
}

public Filter createdAt(String createdAt) {

this.createdAt = createdAt;
return this;
}

/**
* The timestamp of this filter&#39;s creation.
*
* @return createdAt
*/
@javax.annotation.Nonnull
public String getCreatedAt() {
return createdAt;
}

public void setCreatedAt(String createdAt) {
this.createdAt = createdAt;
}

public Filter updatedAt(String updatedAt) {

this.updatedAt = updatedAt;
return this;
}

/**
* The timestamp of this filter&#39;s last change.
*
* @return updatedAt
*/
@javax.annotation.Nonnull
public String getUpdatedAt() {
return updatedAt;
}

public void setUpdatedAt(String updatedAt) {
this.updatedAt = updatedAt;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand All @@ -317,7 +367,9 @@ public boolean equals(Object o) {
&& Objects.equals(this._if, filter._if)
&& Objects.equals(this.drop, filter.drop)
&& Objects.equals(this.dropProperties, filter.dropProperties)
&& Objects.equals(this.allowProperties, filter.allowProperties);
&& Objects.equals(this.allowProperties, filter.allowProperties)
&& Objects.equals(this.createdAt, filter.createdAt)
&& Objects.equals(this.updatedAt, filter.updatedAt);
}

@Override
Expand All @@ -332,7 +384,9 @@ public int hashCode() {
_if,
drop,
dropProperties,
allowProperties);
allowProperties,
createdAt,
updatedAt);
}

@Override
Expand All @@ -349,6 +403,8 @@ public String toString() {
sb.append(" drop: ").append(toIndentedString(drop)).append("\n");
sb.append(" dropProperties: ").append(toIndentedString(dropProperties)).append("\n");
sb.append(" allowProperties: ").append(toIndentedString(allowProperties)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down Expand Up @@ -380,12 +436,16 @@ private String toIndentedString(Object o) {
openapiFields.add("drop");
openapiFields.add("dropProperties");
openapiFields.add("allowProperties");
openapiFields.add("createdAt");
openapiFields.add("updatedAt");

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>();
openapiRequiredFields.add("id");
openapiRequiredFields.add("workspaceId");
openapiRequiredFields.add("integrationId");
openapiRequiredFields.add("createdAt");
openapiRequiredFields.add("updatedAt");
}

/**
Expand Down Expand Up @@ -493,6 +553,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
+ " but got `%s`",
jsonObj.get("allowProperties").toString()));
}
if (!jsonObj.get("createdAt").isJsonPrimitive()) {
throw new IllegalArgumentException(
String.format(
"Expected the field `createdAt` to be a primitive type in the JSON"
+ " string but got `%s`",
jsonObj.get("createdAt").toString()));
}
if (!jsonObj.get("updatedAt").isJsonPrimitive()) {
throw new IllegalArgumentException(
String.format(
"Expected the field `updatedAt` to be a primitive type in the JSON"
+ " string but got `%s`",
jsonObj.get("updatedAt").toString()));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down

0 comments on commit 41cb7bc

Please sign in to comment.