diff --git a/src/main/java/com/segment/publicapi/models/CreateFilterInput.java b/src/main/java/com/segment/publicapi/models/CreateFilterInput.java index 76a52c5b..772e7c72 100644 --- a/src/main/java/com/segment/publicapi/models/CreateFilterInput.java +++ b/src/main/java/com/segment/publicapi/models/CreateFilterInput.java @@ -41,11 +41,6 @@ public class CreateFilterInput { @SerializedName(SERIALIZED_NAME_ENABLED) private Boolean enabled; - public static final String SERIALIZED_NAME_DROP = "drop"; - - @SerializedName(SERIALIZED_NAME_DROP) - private Boolean drop; - public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -61,10 +56,15 @@ public class CreateFilterInput { @SerializedName(SERIALIZED_NAME_IF) private String _if; - public static final String SERIALIZED_NAME_PROPERTY_DROPS = "propertyDrops"; + public static final String SERIALIZED_NAME_DROP = "drop"; - @SerializedName(SERIALIZED_NAME_PROPERTY_DROPS) - private List propertyDrops; + @SerializedName(SERIALIZED_NAME_DROP) + private Boolean drop; + + public static final String SERIALIZED_NAME_DROP_PROPERTIES = "dropProperties"; + + @SerializedName(SERIALIZED_NAME_DROP_PROPERTIES) + private List dropProperties; public static final String SERIALIZED_NAME_ALLOW_PROPERTIES = "allowProperties"; @@ -113,26 +113,6 @@ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public CreateFilterInput drop(Boolean drop) { - - this.drop = drop; - return this; - } - - /** - * Whether the event is dropped. - * - * @return drop - */ - @javax.annotation.Nullable - public Boolean getDrop() { - return drop; - } - - public void setDrop(Boolean drop) { - this.drop = drop; - } - public CreateFilterInput name(String name) { this.name = name; @@ -193,32 +173,52 @@ public void setIf(String _if) { this._if = _if; } - public CreateFilterInput propertyDrops(List propertyDrops) { + public CreateFilterInput drop(Boolean drop) { - this.propertyDrops = propertyDrops; + this.drop = drop; return this; } - public CreateFilterInput addPropertyDropsItem(String propertyDropsItem) { - if (this.propertyDrops == null) { - this.propertyDrops = new ArrayList<>(); + /** + * Whether the event is dropped. + * + * @return drop + */ + @javax.annotation.Nullable + public Boolean getDrop() { + return drop; + } + + public void setDrop(Boolean drop) { + this.drop = drop; + } + + public CreateFilterInput dropProperties(List dropProperties) { + + this.dropProperties = dropProperties; + return this; + } + + public CreateFilterInput addDropPropertiesItem(String dropPropertiesItem) { + if (this.dropProperties == null) { + this.dropProperties = new ArrayList<>(); } - this.propertyDrops.add(propertyDropsItem); + this.dropProperties.add(dropPropertiesItem); return this; } /** * Describes the properties to be dropped on events that match the \"if\" statement. * - * @return propertyDrops + * @return dropProperties */ @javax.annotation.Nullable - public List getPropertyDrops() { - return propertyDrops; + public List getDropProperties() { + return dropProperties; } - public void setPropertyDrops(List propertyDrops) { - this.propertyDrops = propertyDrops; + public void setDropProperties(List dropProperties) { + this.dropProperties = dropProperties; } public CreateFilterInput allowProperties(List allowProperties) { @@ -260,11 +260,11 @@ public boolean equals(Object o) { CreateFilterInput createFilterInput = (CreateFilterInput) o; return Objects.equals(this.integrationId, createFilterInput.integrationId) && Objects.equals(this.enabled, createFilterInput.enabled) - && Objects.equals(this.drop, createFilterInput.drop) && Objects.equals(this.name, createFilterInput.name) && Objects.equals(this.description, createFilterInput.description) && Objects.equals(this._if, createFilterInput._if) - && Objects.equals(this.propertyDrops, createFilterInput.propertyDrops) + && Objects.equals(this.drop, createFilterInput.drop) + && Objects.equals(this.dropProperties, createFilterInput.dropProperties) && Objects.equals(this.allowProperties, createFilterInput.allowProperties); } @@ -273,11 +273,11 @@ public int hashCode() { return Objects.hash( integrationId, enabled, - drop, name, description, _if, - propertyDrops, + drop, + dropProperties, allowProperties); } @@ -287,11 +287,11 @@ public String toString() { sb.append("class CreateFilterInput {\n"); sb.append(" integrationId: ").append(toIndentedString(integrationId)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" drop: ").append(toIndentedString(drop)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" _if: ").append(toIndentedString(_if)).append("\n"); - sb.append(" propertyDrops: ").append(toIndentedString(propertyDrops)).append("\n"); + 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("}"); return sb.toString(); @@ -316,11 +316,11 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("integrationId"); openapiFields.add("enabled"); - openapiFields.add("drop"); openapiFields.add("name"); openapiFields.add("description"); openapiFields.add("if"); - openapiFields.add("propertyDrops"); + openapiFields.add("drop"); + openapiFields.add("dropProperties"); openapiFields.add("allowProperties"); // a set of required properties/fields (JSON key names) @@ -400,14 +400,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti jsonObj.get("if").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("propertyDrops") != null - && !jsonObj.get("propertyDrops").isJsonNull() - && !jsonObj.get("propertyDrops").isJsonArray()) { + if (jsonObj.get("dropProperties") != null + && !jsonObj.get("dropProperties").isJsonNull() + && !jsonObj.get("dropProperties").isJsonArray()) { throw new IllegalArgumentException( String.format( - "Expected the field `propertyDrops` to be an array in the JSON string" + "Expected the field `dropProperties` to be an array in the JSON string" + " but got `%s`", - jsonObj.get("propertyDrops").toString())); + jsonObj.get("dropProperties").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("allowProperties") != null diff --git a/src/main/java/com/segment/publicapi/models/Filter.java b/src/main/java/com/segment/publicapi/models/Filter.java index b4f000a5..a650b1dd 100644 --- a/src/main/java/com/segment/publicapi/models/Filter.java +++ b/src/main/java/com/segment/publicapi/models/Filter.java @@ -51,11 +51,6 @@ public class Filter { @SerializedName(SERIALIZED_NAME_ENABLED) private Boolean enabled; - public static final String SERIALIZED_NAME_DROP = "drop"; - - @SerializedName(SERIALIZED_NAME_DROP) - private Boolean drop; - public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -71,10 +66,15 @@ public class Filter { @SerializedName(SERIALIZED_NAME_IF) private String _if; - public static final String SERIALIZED_NAME_PROPERTY_DROPS = "propertyDrops"; + public static final String SERIALIZED_NAME_DROP = "drop"; - @SerializedName(SERIALIZED_NAME_PROPERTY_DROPS) - private List propertyDrops; + @SerializedName(SERIALIZED_NAME_DROP) + private Boolean drop; + + public static final String SERIALIZED_NAME_DROP_PROPERTIES = "dropProperties"; + + @SerializedName(SERIALIZED_NAME_DROP_PROPERTIES) + private List dropProperties; public static final String SERIALIZED_NAME_ALLOW_PROPERTIES = "allowProperties"; @@ -163,26 +163,6 @@ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public Filter drop(Boolean drop) { - - this.drop = drop; - return this; - } - - /** - * Whether the event is dropped. - * - * @return drop - */ - @javax.annotation.Nullable - public Boolean getDrop() { - return drop; - } - - public void setDrop(Boolean drop) { - this.drop = drop; - } - public Filter name(String name) { this.name = name; @@ -243,32 +223,52 @@ public void setIf(String _if) { this._if = _if; } - public Filter propertyDrops(List propertyDrops) { + public Filter drop(Boolean drop) { - this.propertyDrops = propertyDrops; + this.drop = drop; return this; } - public Filter addPropertyDropsItem(String propertyDropsItem) { - if (this.propertyDrops == null) { - this.propertyDrops = new ArrayList<>(); + /** + * Whether the event is dropped. + * + * @return drop + */ + @javax.annotation.Nullable + public Boolean getDrop() { + return drop; + } + + public void setDrop(Boolean drop) { + this.drop = drop; + } + + public Filter dropProperties(List dropProperties) { + + this.dropProperties = dropProperties; + return this; + } + + public Filter addDropPropertiesItem(String dropPropertiesItem) { + if (this.dropProperties == null) { + this.dropProperties = new ArrayList<>(); } - this.propertyDrops.add(propertyDropsItem); + this.dropProperties.add(dropPropertiesItem); return this; } /** * Describes the properties to be dropped on events that match the \"if\" statement. * - * @return propertyDrops + * @return dropProperties */ @javax.annotation.Nullable - public List getPropertyDrops() { - return propertyDrops; + public List getDropProperties() { + return dropProperties; } - public void setPropertyDrops(List propertyDrops) { - this.propertyDrops = propertyDrops; + public void setDropProperties(List dropProperties) { + this.dropProperties = dropProperties; } public Filter allowProperties(List allowProperties) { @@ -312,11 +312,11 @@ public boolean equals(Object o) { && Objects.equals(this.workspaceId, filter.workspaceId) && Objects.equals(this.integrationId, filter.integrationId) && Objects.equals(this.enabled, filter.enabled) - && Objects.equals(this.drop, filter.drop) && Objects.equals(this.name, filter.name) && Objects.equals(this.description, filter.description) && Objects.equals(this._if, filter._if) - && Objects.equals(this.propertyDrops, filter.propertyDrops) + && Objects.equals(this.drop, filter.drop) + && Objects.equals(this.dropProperties, filter.dropProperties) && Objects.equals(this.allowProperties, filter.allowProperties); } @@ -327,11 +327,11 @@ public int hashCode() { workspaceId, integrationId, enabled, - drop, name, description, _if, - propertyDrops, + drop, + dropProperties, allowProperties); } @@ -343,11 +343,11 @@ public String toString() { sb.append(" workspaceId: ").append(toIndentedString(workspaceId)).append("\n"); sb.append(" integrationId: ").append(toIndentedString(integrationId)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" drop: ").append(toIndentedString(drop)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" _if: ").append(toIndentedString(_if)).append("\n"); - sb.append(" propertyDrops: ").append(toIndentedString(propertyDrops)).append("\n"); + 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("}"); return sb.toString(); @@ -374,11 +374,11 @@ private String toIndentedString(Object o) { openapiFields.add("workspaceId"); openapiFields.add("integrationId"); openapiFields.add("enabled"); - openapiFields.add("drop"); openapiFields.add("name"); openapiFields.add("description"); openapiFields.add("if"); - openapiFields.add("propertyDrops"); + openapiFields.add("drop"); + openapiFields.add("dropProperties"); openapiFields.add("allowProperties"); // a set of required properties/fields (JSON key names) @@ -474,14 +474,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti jsonObj.get("if").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("propertyDrops") != null - && !jsonObj.get("propertyDrops").isJsonNull() - && !jsonObj.get("propertyDrops").isJsonArray()) { + if (jsonObj.get("dropProperties") != null + && !jsonObj.get("dropProperties").isJsonNull() + && !jsonObj.get("dropProperties").isJsonArray()) { throw new IllegalArgumentException( String.format( - "Expected the field `propertyDrops` to be an array in the JSON string" + "Expected the field `dropProperties` to be an array in the JSON string" + " but got `%s`", - jsonObj.get("propertyDrops").toString())); + jsonObj.get("dropProperties").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("allowProperties") != null diff --git a/src/main/java/com/segment/publicapi/models/UpdateFilterByIdInput.java b/src/main/java/com/segment/publicapi/models/UpdateFilterByIdInput.java index 61e6b84c..e6899100 100644 --- a/src/main/java/com/segment/publicapi/models/UpdateFilterByIdInput.java +++ b/src/main/java/com/segment/publicapi/models/UpdateFilterByIdInput.java @@ -41,11 +41,6 @@ public class UpdateFilterByIdInput { @SerializedName(SERIALIZED_NAME_ENABLED) private Boolean enabled; - public static final String SERIALIZED_NAME_DROP = "drop"; - - @SerializedName(SERIALIZED_NAME_DROP) - private Boolean drop; - public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -61,10 +56,15 @@ public class UpdateFilterByIdInput { @SerializedName(SERIALIZED_NAME_IF) private String _if; - public static final String SERIALIZED_NAME_PROPERTY_DROPS = "propertyDrops"; + public static final String SERIALIZED_NAME_DROP = "drop"; - @SerializedName(SERIALIZED_NAME_PROPERTY_DROPS) - private List propertyDrops; + @SerializedName(SERIALIZED_NAME_DROP) + private Boolean drop; + + public static final String SERIALIZED_NAME_DROP_PROPERTIES = "dropProperties"; + + @SerializedName(SERIALIZED_NAME_DROP_PROPERTIES) + private List dropProperties; public static final String SERIALIZED_NAME_ALLOW_PROPERTIES = "allowProperties"; @@ -113,26 +113,6 @@ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - public UpdateFilterByIdInput drop(Boolean drop) { - - this.drop = drop; - return this; - } - - /** - * Whether the event is dropped. - * - * @return drop - */ - @javax.annotation.Nullable - public Boolean getDrop() { - return drop; - } - - public void setDrop(Boolean drop) { - this.drop = drop; - } - public UpdateFilterByIdInput name(String name) { this.name = name; @@ -193,32 +173,52 @@ public void setIf(String _if) { this._if = _if; } - public UpdateFilterByIdInput propertyDrops(List propertyDrops) { + public UpdateFilterByIdInput drop(Boolean drop) { - this.propertyDrops = propertyDrops; + this.drop = drop; return this; } - public UpdateFilterByIdInput addPropertyDropsItem(String propertyDropsItem) { - if (this.propertyDrops == null) { - this.propertyDrops = new ArrayList<>(); + /** + * Whether the event is dropped. + * + * @return drop + */ + @javax.annotation.Nullable + public Boolean getDrop() { + return drop; + } + + public void setDrop(Boolean drop) { + this.drop = drop; + } + + public UpdateFilterByIdInput dropProperties(List dropProperties) { + + this.dropProperties = dropProperties; + return this; + } + + public UpdateFilterByIdInput addDropPropertiesItem(String dropPropertiesItem) { + if (this.dropProperties == null) { + this.dropProperties = new ArrayList<>(); } - this.propertyDrops.add(propertyDropsItem); + this.dropProperties.add(dropPropertiesItem); return this; } /** * Describes the properties to be dropped on events that match the \"if\" statement. * - * @return propertyDrops + * @return dropProperties */ @javax.annotation.Nullable - public List getPropertyDrops() { - return propertyDrops; + public List getDropProperties() { + return dropProperties; } - public void setPropertyDrops(List propertyDrops) { - this.propertyDrops = propertyDrops; + public void setDropProperties(List dropProperties) { + this.dropProperties = dropProperties; } public UpdateFilterByIdInput allowProperties(List allowProperties) { @@ -260,11 +260,11 @@ public boolean equals(Object o) { UpdateFilterByIdInput updateFilterByIdInput = (UpdateFilterByIdInput) o; return Objects.equals(this.integrationId, updateFilterByIdInput.integrationId) && Objects.equals(this.enabled, updateFilterByIdInput.enabled) - && Objects.equals(this.drop, updateFilterByIdInput.drop) && Objects.equals(this.name, updateFilterByIdInput.name) && Objects.equals(this.description, updateFilterByIdInput.description) && Objects.equals(this._if, updateFilterByIdInput._if) - && Objects.equals(this.propertyDrops, updateFilterByIdInput.propertyDrops) + && Objects.equals(this.drop, updateFilterByIdInput.drop) + && Objects.equals(this.dropProperties, updateFilterByIdInput.dropProperties) && Objects.equals(this.allowProperties, updateFilterByIdInput.allowProperties); } @@ -273,11 +273,11 @@ public int hashCode() { return Objects.hash( integrationId, enabled, - drop, name, description, _if, - propertyDrops, + drop, + dropProperties, allowProperties); } @@ -287,11 +287,11 @@ public String toString() { sb.append("class UpdateFilterByIdInput {\n"); sb.append(" integrationId: ").append(toIndentedString(integrationId)).append("\n"); sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); - sb.append(" drop: ").append(toIndentedString(drop)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" _if: ").append(toIndentedString(_if)).append("\n"); - sb.append(" propertyDrops: ").append(toIndentedString(propertyDrops)).append("\n"); + 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("}"); return sb.toString(); @@ -316,11 +316,11 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("integrationId"); openapiFields.add("enabled"); - openapiFields.add("drop"); openapiFields.add("name"); openapiFields.add("description"); openapiFields.add("if"); - openapiFields.add("propertyDrops"); + openapiFields.add("drop"); + openapiFields.add("dropProperties"); openapiFields.add("allowProperties"); // a set of required properties/fields (JSON key names) @@ -400,14 +400,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti jsonObj.get("if").toString())); } // ensure the optional json data is an array if present - if (jsonObj.get("propertyDrops") != null - && !jsonObj.get("propertyDrops").isJsonNull() - && !jsonObj.get("propertyDrops").isJsonArray()) { + if (jsonObj.get("dropProperties") != null + && !jsonObj.get("dropProperties").isJsonNull() + && !jsonObj.get("dropProperties").isJsonArray()) { throw new IllegalArgumentException( String.format( - "Expected the field `propertyDrops` to be an array in the JSON string" + "Expected the field `dropProperties` to be an array in the JSON string" + " but got `%s`", - jsonObj.get("propertyDrops").toString())); + jsonObj.get("dropProperties").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("allowProperties") != null