|
| 1 | +/** |
| 2 | + * This file was auto-generated by Fern from our API Definition. |
| 3 | + */ |
| 4 | +package com.polytomic.api.types; |
| 5 | + |
| 6 | +import com.fasterxml.jackson.annotation.JsonAnyGetter; |
| 7 | +import com.fasterxml.jackson.annotation.JsonAnySetter; |
| 8 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 9 | +import com.fasterxml.jackson.annotation.JsonInclude; |
| 10 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 11 | +import com.fasterxml.jackson.annotation.JsonSetter; |
| 12 | +import com.fasterxml.jackson.annotation.Nulls; |
| 13 | +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
| 14 | +import com.polytomic.api.core.ObjectMappers; |
| 15 | +import java.util.HashMap; |
| 16 | +import java.util.Map; |
| 17 | +import java.util.Objects; |
| 18 | +import java.util.Optional; |
| 19 | + |
| 20 | +@JsonInclude(JsonInclude.Include.NON_EMPTY) |
| 21 | +@JsonDeserialize(builder = BulkSyncCanceledEvent.Builder.class) |
| 22 | +public final class BulkSyncCanceledEvent { |
| 23 | + private final Optional<String> destinationConnectionId; |
| 24 | + |
| 25 | + private final Optional<String> executionId; |
| 26 | + |
| 27 | + private final Optional<String> name; |
| 28 | + |
| 29 | + private final Optional<String> organizationId; |
| 30 | + |
| 31 | + private final Optional<String> sourceConnectionId; |
| 32 | + |
| 33 | + private final Optional<String> syncId; |
| 34 | + |
| 35 | + private final Map<String, Object> additionalProperties; |
| 36 | + |
| 37 | + private BulkSyncCanceledEvent( |
| 38 | + Optional<String> destinationConnectionId, |
| 39 | + Optional<String> executionId, |
| 40 | + Optional<String> name, |
| 41 | + Optional<String> organizationId, |
| 42 | + Optional<String> sourceConnectionId, |
| 43 | + Optional<String> syncId, |
| 44 | + Map<String, Object> additionalProperties) { |
| 45 | + this.destinationConnectionId = destinationConnectionId; |
| 46 | + this.executionId = executionId; |
| 47 | + this.name = name; |
| 48 | + this.organizationId = organizationId; |
| 49 | + this.sourceConnectionId = sourceConnectionId; |
| 50 | + this.syncId = syncId; |
| 51 | + this.additionalProperties = additionalProperties; |
| 52 | + } |
| 53 | + |
| 54 | + @JsonProperty("destination_connection_id") |
| 55 | + public Optional<String> getDestinationConnectionId() { |
| 56 | + return destinationConnectionId; |
| 57 | + } |
| 58 | + |
| 59 | + @JsonProperty("execution_id") |
| 60 | + public Optional<String> getExecutionId() { |
| 61 | + return executionId; |
| 62 | + } |
| 63 | + |
| 64 | + @JsonProperty("name") |
| 65 | + public Optional<String> getName() { |
| 66 | + return name; |
| 67 | + } |
| 68 | + |
| 69 | + @JsonProperty("organization_id") |
| 70 | + public Optional<String> getOrganizationId() { |
| 71 | + return organizationId; |
| 72 | + } |
| 73 | + |
| 74 | + @JsonProperty("source_connection_id") |
| 75 | + public Optional<String> getSourceConnectionId() { |
| 76 | + return sourceConnectionId; |
| 77 | + } |
| 78 | + |
| 79 | + @JsonProperty("sync_id") |
| 80 | + public Optional<String> getSyncId() { |
| 81 | + return syncId; |
| 82 | + } |
| 83 | + |
| 84 | + @java.lang.Override |
| 85 | + public boolean equals(Object other) { |
| 86 | + if (this == other) return true; |
| 87 | + return other instanceof BulkSyncCanceledEvent && equalTo((BulkSyncCanceledEvent) other); |
| 88 | + } |
| 89 | + |
| 90 | + @JsonAnyGetter |
| 91 | + public Map<String, Object> getAdditionalProperties() { |
| 92 | + return this.additionalProperties; |
| 93 | + } |
| 94 | + |
| 95 | + private boolean equalTo(BulkSyncCanceledEvent other) { |
| 96 | + return destinationConnectionId.equals(other.destinationConnectionId) |
| 97 | + && executionId.equals(other.executionId) |
| 98 | + && name.equals(other.name) |
| 99 | + && organizationId.equals(other.organizationId) |
| 100 | + && sourceConnectionId.equals(other.sourceConnectionId) |
| 101 | + && syncId.equals(other.syncId); |
| 102 | + } |
| 103 | + |
| 104 | + @java.lang.Override |
| 105 | + public int hashCode() { |
| 106 | + return Objects.hash( |
| 107 | + this.destinationConnectionId, |
| 108 | + this.executionId, |
| 109 | + this.name, |
| 110 | + this.organizationId, |
| 111 | + this.sourceConnectionId, |
| 112 | + this.syncId); |
| 113 | + } |
| 114 | + |
| 115 | + @java.lang.Override |
| 116 | + public String toString() { |
| 117 | + return ObjectMappers.stringify(this); |
| 118 | + } |
| 119 | + |
| 120 | + public static Builder builder() { |
| 121 | + return new Builder(); |
| 122 | + } |
| 123 | + |
| 124 | + @JsonIgnoreProperties(ignoreUnknown = true) |
| 125 | + public static final class Builder { |
| 126 | + private Optional<String> destinationConnectionId = Optional.empty(); |
| 127 | + |
| 128 | + private Optional<String> executionId = Optional.empty(); |
| 129 | + |
| 130 | + private Optional<String> name = Optional.empty(); |
| 131 | + |
| 132 | + private Optional<String> organizationId = Optional.empty(); |
| 133 | + |
| 134 | + private Optional<String> sourceConnectionId = Optional.empty(); |
| 135 | + |
| 136 | + private Optional<String> syncId = Optional.empty(); |
| 137 | + |
| 138 | + @JsonAnySetter |
| 139 | + private Map<String, Object> additionalProperties = new HashMap<>(); |
| 140 | + |
| 141 | + private Builder() {} |
| 142 | + |
| 143 | + public Builder from(BulkSyncCanceledEvent other) { |
| 144 | + destinationConnectionId(other.getDestinationConnectionId()); |
| 145 | + executionId(other.getExecutionId()); |
| 146 | + name(other.getName()); |
| 147 | + organizationId(other.getOrganizationId()); |
| 148 | + sourceConnectionId(other.getSourceConnectionId()); |
| 149 | + syncId(other.getSyncId()); |
| 150 | + return this; |
| 151 | + } |
| 152 | + |
| 153 | + @JsonSetter(value = "destination_connection_id", nulls = Nulls.SKIP) |
| 154 | + public Builder destinationConnectionId(Optional<String> destinationConnectionId) { |
| 155 | + this.destinationConnectionId = destinationConnectionId; |
| 156 | + return this; |
| 157 | + } |
| 158 | + |
| 159 | + public Builder destinationConnectionId(String destinationConnectionId) { |
| 160 | + this.destinationConnectionId = Optional.of(destinationConnectionId); |
| 161 | + return this; |
| 162 | + } |
| 163 | + |
| 164 | + @JsonSetter(value = "execution_id", nulls = Nulls.SKIP) |
| 165 | + public Builder executionId(Optional<String> executionId) { |
| 166 | + this.executionId = executionId; |
| 167 | + return this; |
| 168 | + } |
| 169 | + |
| 170 | + public Builder executionId(String executionId) { |
| 171 | + this.executionId = Optional.of(executionId); |
| 172 | + return this; |
| 173 | + } |
| 174 | + |
| 175 | + @JsonSetter(value = "name", nulls = Nulls.SKIP) |
| 176 | + public Builder name(Optional<String> name) { |
| 177 | + this.name = name; |
| 178 | + return this; |
| 179 | + } |
| 180 | + |
| 181 | + public Builder name(String name) { |
| 182 | + this.name = Optional.of(name); |
| 183 | + return this; |
| 184 | + } |
| 185 | + |
| 186 | + @JsonSetter(value = "organization_id", nulls = Nulls.SKIP) |
| 187 | + public Builder organizationId(Optional<String> organizationId) { |
| 188 | + this.organizationId = organizationId; |
| 189 | + return this; |
| 190 | + } |
| 191 | + |
| 192 | + public Builder organizationId(String organizationId) { |
| 193 | + this.organizationId = Optional.of(organizationId); |
| 194 | + return this; |
| 195 | + } |
| 196 | + |
| 197 | + @JsonSetter(value = "source_connection_id", nulls = Nulls.SKIP) |
| 198 | + public Builder sourceConnectionId(Optional<String> sourceConnectionId) { |
| 199 | + this.sourceConnectionId = sourceConnectionId; |
| 200 | + return this; |
| 201 | + } |
| 202 | + |
| 203 | + public Builder sourceConnectionId(String sourceConnectionId) { |
| 204 | + this.sourceConnectionId = Optional.of(sourceConnectionId); |
| 205 | + return this; |
| 206 | + } |
| 207 | + |
| 208 | + @JsonSetter(value = "sync_id", nulls = Nulls.SKIP) |
| 209 | + public Builder syncId(Optional<String> syncId) { |
| 210 | + this.syncId = syncId; |
| 211 | + return this; |
| 212 | + } |
| 213 | + |
| 214 | + public Builder syncId(String syncId) { |
| 215 | + this.syncId = Optional.of(syncId); |
| 216 | + return this; |
| 217 | + } |
| 218 | + |
| 219 | + public BulkSyncCanceledEvent build() { |
| 220 | + return new BulkSyncCanceledEvent( |
| 221 | + destinationConnectionId, |
| 222 | + executionId, |
| 223 | + name, |
| 224 | + organizationId, |
| 225 | + sourceConnectionId, |
| 226 | + syncId, |
| 227 | + additionalProperties); |
| 228 | + } |
| 229 | + } |
| 230 | +} |
0 commit comments