diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fbf39267..552eeb53d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: - name: Publish to maven run: | - ./gradlew publish + ./gradlew publish env: MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} diff --git a/build.gradle b/build.gradle index 6d78fda77..4c223f859 100644 --- a/build.gradle +++ b/build.gradle @@ -13,9 +13,9 @@ repositories { dependencies { api 'com.squareup.okhttp3:okhttp:4.12.0' - api 'com.fasterxml.jackson.core:jackson-databind:2.13.0' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.12.3' - api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.12.3' + api 'com.fasterxml.jackson.core:jackson-databind:2.17.2' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2' + api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2' } @@ -24,29 +24,54 @@ dependencies { sourceCompatibility = 1.8 targetCompatibility = 1.8 +tasks.withType(Javadoc) { + failOnError false + options.addStringOption('Xdoclint:none', '-quiet') +} + spotless { java { palantirJavaFormat() } } + java { withSourcesJar() withJavadocJar() } + +group = 'dev.merge' + +version = '1.1.0' + +jar { + dependsOn(":generatePomFileForMavenPublication") + archiveBaseName = "merge-java-client" +} + +sourcesJar { + archiveBaseName = "merge-java-client" +} + +javadocJar { + archiveBaseName = "merge-java-client" +} + test { useJUnitPlatform() testLogging { showStandardStreams = true } } + publishing { publications { maven(MavenPublication) { groupId = 'dev.merge' artifactId = 'merge-java-client' - version = '1.0.18' + version = '1.1.0' from components.java pom { scm { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e6441136f..a4b76b953 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4413138c..cea7a793a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index b740cf133..f3b75f3b0 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/gradlew.bat b/gradlew.bat index 7101f8e46..9b42019c7 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/settings.gradle b/settings.gradle index aed36fec1..1721a4b88 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,3 @@ +rootProject.name = 'merge-java-client' + include 'sample-app' \ No newline at end of file diff --git a/src/main/java/com/merge/api/MergeApiClient.java b/src/main/java/com/merge/api/MergeApiClient.java index 635197ae7..e5ba647e2 100644 --- a/src/main/java/com/merge/api/MergeApiClient.java +++ b/src/main/java/com/merge/api/MergeApiClient.java @@ -20,10 +20,10 @@ public class MergeApiClient { protected final Supplier crmClient; - protected final Supplier hrisClient; - protected final Supplier filestorageClient; + protected final Supplier hrisClient; + protected final Supplier ticketingClient; protected final Supplier accountingClient; @@ -32,8 +32,8 @@ public MergeApiClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; this.atsClient = Suppliers.memoize(() -> new AtsClient(clientOptions)); this.crmClient = Suppliers.memoize(() -> new CrmClient(clientOptions)); - this.hrisClient = Suppliers.memoize(() -> new HrisClient(clientOptions)); this.filestorageClient = Suppliers.memoize(() -> new FilestorageClient(clientOptions)); + this.hrisClient = Suppliers.memoize(() -> new HrisClient(clientOptions)); this.ticketingClient = Suppliers.memoize(() -> new TicketingClient(clientOptions)); this.accountingClient = Suppliers.memoize(() -> new AccountingClient(clientOptions)); } @@ -46,14 +46,14 @@ public CrmClient crm() { return this.crmClient.get(); } - public HrisClient hris() { - return this.hrisClient.get(); - } - public FilestorageClient filestorage() { return this.filestorageClient.get(); } + public HrisClient hris() { + return this.hrisClient.get(); + } + public TicketingClient ticketing() { return this.ticketingClient.get(); } diff --git a/src/main/java/com/merge/api/MergeApiClientBuilder.java b/src/main/java/com/merge/api/MergeApiClientBuilder.java index 005532bc4..7f8706b09 100644 --- a/src/main/java/com/merge/api/MergeApiClientBuilder.java +++ b/src/main/java/com/merge/api/MergeApiClientBuilder.java @@ -41,6 +41,14 @@ public MergeApiClientBuilder url(String url) { return this; } + /** + * Sets the timeout (in seconds) for the client + */ + public MergeApiClientBuilder timeout(int timeout) { + this.clientOptionsBuilder.timeout(timeout); + return this; + } + public MergeApiClient build() { if (apiKey == null) { throw new RuntimeException("Please provide apiKey"); diff --git a/src/main/java/com/merge/api/core/ClientOptions.java b/src/main/java/com/merge/api/core/ClientOptions.java index e94789955..0cbbc69fe 100644 --- a/src/main/java/com/merge/api/core/ClientOptions.java +++ b/src/main/java/com/merge/api/core/ClientOptions.java @@ -18,11 +18,14 @@ public final class ClientOptions { private final OkHttpClient httpClient; + private final int timeout; + private ClientOptions( Environment environment, Map headers, Map> headerSuppliers, - OkHttpClient httpClient) { + OkHttpClient httpClient, + int timeout) { this.environment = environment; this.headers = new HashMap<>(); this.headers.putAll(headers); @@ -30,11 +33,12 @@ private ClientOptions( { put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.merge.fern:api-sdk"); - put("X-Fern-SDK-Version", "1.0.18"); + put("X-Fern-SDK-Version", "1.1.0"); } }); this.headerSuppliers = headerSuppliers; this.httpClient = httpClient; + this.timeout = timeout; } public Environment environment() { @@ -80,6 +84,8 @@ public static final class Builder { private final Map> headerSuppliers = new HashMap<>(); + private int timeout = 60; + public Builder environment(Environment environment) { this.environment = environment; return this; @@ -95,11 +101,20 @@ public Builder addHeader(String key, Supplier value) { return this; } + /** + * Override the timeout in seconds. Defaults to 60 seconds. + */ + public Builder timeout(int timeout) { + this.timeout = timeout; + return this; + } + public ClientOptions build() { OkHttpClient okhttpClient = new OkHttpClient.Builder() .addInterceptor(new RetryInterceptor(3)) + .callTimeout(this.timeout, TimeUnit.SECONDS) .build(); - return new ClientOptions(environment, headers, headerSuppliers, okhttpClient); + return new ClientOptions(environment, headers, headerSuppliers, okhttpClient, this.timeout); } } } diff --git a/src/main/java/com/merge/api/core/FileStream.java b/src/main/java/com/merge/api/core/FileStream.java new file mode 100644 index 000000000..ff2d2cdab --- /dev/null +++ b/src/main/java/com/merge/api/core/FileStream.java @@ -0,0 +1,60 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.core; + +import java.io.InputStream; +import java.util.Objects; +import okhttp3.MediaType; +import okhttp3.RequestBody; +import org.jetbrains.annotations.Nullable; + +/** + * Represents a file stream with associated metadata for file uploads. + */ +public class FileStream { + private final InputStream inputStream; + private final String fileName; + private final MediaType contentType; + + /** + * Constructs a FileStream with the given input stream and optional metadata. + * + * @param inputStream The input stream of the file content. Must not be null. + * @param fileName The name of the file, or null if unknown. + * @param contentType The MIME type of the file content, or null if unknown. + * @throws NullPointerException if inputStream is null + */ + public FileStream(InputStream inputStream, @Nullable String fileName, @Nullable MediaType contentType) { + this.inputStream = Objects.requireNonNull(inputStream, "Input stream cannot be null"); + this.fileName = fileName; + this.contentType = contentType; + } + + public FileStream(InputStream inputStream) { + this(inputStream, null, null); + } + + public InputStream getInputStream() { + return inputStream; + } + + @Nullable + public String getFileName() { + return fileName; + } + + @Nullable + public MediaType getContentType() { + return contentType; + } + + /** + * Creates a RequestBody suitable for use with OkHttp client. + * + * @return A RequestBody instance representing this file stream. + */ + public RequestBody toRequestBody() { + return new InputStreamRequestBody(contentType, inputStream); + } +} diff --git a/src/main/java/com/merge/api/core/InputStreamRequestBody.java b/src/main/java/com/merge/api/core/InputStreamRequestBody.java new file mode 100644 index 000000000..b984fa9aa --- /dev/null +++ b/src/main/java/com/merge/api/core/InputStreamRequestBody.java @@ -0,0 +1,79 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.core; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Objects; +import okhttp3.MediaType; +import okhttp3.RequestBody; +import okhttp3.internal.Util; +import okio.BufferedSink; +import okio.Okio; +import okio.Source; +import org.jetbrains.annotations.Nullable; + +/** + * A custom implementation of OkHttp's RequestBody that wraps an InputStream. + * This class allows streaming of data from an InputStream directly to an HTTP request body, + * which is useful for file uploads or sending large amounts of data without loading it all into memory. + */ +public class InputStreamRequestBody extends RequestBody { + private final InputStream inputStream; + private final MediaType contentType; + + /** + * Constructs an InputStreamRequestBody with the specified content type and input stream. + * + * @param contentType the MediaType of the content, or null if not known + * @param inputStream the InputStream containing the data to be sent + * @throws NullPointerException if inputStream is null + */ + public InputStreamRequestBody(@Nullable MediaType contentType, InputStream inputStream) { + this.contentType = contentType; + this.inputStream = Objects.requireNonNull(inputStream, "inputStream == null"); + } + + /** + * Returns the content type of this request body. + * + * @return the MediaType of the content, or null if not specified + */ + @Nullable + @Override + public MediaType contentType() { + return contentType; + } + + /** + * Returns the content length of this request body, if known. + * This method attempts to determine the length using the InputStream's available() method, + * which may not always accurately reflect the total length of the stream. + * + * @return the content length, or -1 if the length is unknown + * @throws IOException if an I/O error occurs + */ + @Override + public long contentLength() throws IOException { + return inputStream.available() == 0 ? -1 : inputStream.available(); + } + + /** + * Writes the content of the InputStream to the given BufferedSink. + * This method is responsible for transferring the data from the InputStream to the network request. + * + * @param sink the BufferedSink to write the content to + * @throws IOException if an I/O error occurs during writing + */ + @Override + public void writeTo(BufferedSink sink) throws IOException { + Source source = null; + try { + source = Okio.source(inputStream); + sink.writeAll(source); + } finally { + Util.closeQuietly(Objects.requireNonNull(source)); + } + } +} diff --git a/src/main/java/com/merge/api/core/ResponseBodyInputStream.java b/src/main/java/com/merge/api/core/ResponseBodyInputStream.java new file mode 100644 index 000000000..125da9fda --- /dev/null +++ b/src/main/java/com/merge/api/core/ResponseBodyInputStream.java @@ -0,0 +1,45 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.core; + +import java.io.FilterInputStream; +import java.io.IOException; +import okhttp3.Response; + +/** + * A custom InputStream that wraps the InputStream from the OkHttp Response and ensures that the + * OkHttp Response object is properly closed when the stream is closed. + * + * This class extends FilterInputStream and takes an OkHttp Response object as a parameter. + * It retrieves the InputStream from the Response and overrides the close method to close + * both the InputStream and the Response object, ensuring proper resource management and preventing + * premature closure of the underlying HTTP connection. + */ +public class ResponseBodyInputStream extends FilterInputStream { + private final Response response; + + /** + * Constructs a ResponseBodyInputStream that wraps the InputStream from the given OkHttp + * Response object. + * + * @param response the OkHttp Response object from which the InputStream is retrieved + * @throws IOException if an I/O error occurs while retrieving the InputStream + */ + public ResponseBodyInputStream(Response response) throws IOException { + super(response.body().byteStream()); + this.response = response; + } + + /** + * Closes the InputStream and the associated OkHttp Response object. This ensures that the + * underlying HTTP connection is properly closed after the stream is no longer needed. + * + * @throws IOException if an I/O error occurs + */ + @Override + public void close() throws IOException { + super.close(); + response.close(); // Ensure the response is closed when the stream is closed + } +} diff --git a/src/main/java/com/merge/api/core/ResponseBodyReader.java b/src/main/java/com/merge/api/core/ResponseBodyReader.java new file mode 100644 index 000000000..6bdca4896 --- /dev/null +++ b/src/main/java/com/merge/api/core/ResponseBodyReader.java @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.merge.api.core; + +import java.io.FilterReader; +import java.io.IOException; +import okhttp3.Response; + +/** + * A custom Reader that wraps the Reader from the OkHttp Response and ensures that the + * OkHttp Response object is properly closed when the reader is closed. + * + * This class extends FilterReader and takes an OkHttp Response object as a parameter. + * It retrieves the Reader from the Response and overrides the close method to close + * both the Reader and the Response object, ensuring proper resource management and preventing + * premature closure of the underlying HTTP connection. + */ +public class ResponseBodyReader extends FilterReader { + private final Response response; + + /** + * Constructs a ResponseBodyReader that wraps the Reader from the given OkHttp Response object. + * + * @param response the OkHttp Response object from which the Reader is retrieved + * @throws IOException if an I/O error occurs while retrieving the Reader + */ + public ResponseBodyReader(Response response) throws IOException { + super(response.body().charStream()); + this.response = response; + } + + /** + * Closes the Reader and the associated OkHttp Response object. This ensures that the + * underlying HTTP connection is properly closed after the reader is no longer needed. + * + * @throws IOException if an I/O error occurs + */ + @Override + public void close() throws IOException { + super.close(); + response.close(); // Ensure the response is closed when the reader is closed + } +} diff --git a/src/main/java/com/merge/api/resources/accounting/accountdetails/AccountDetailsClient.java b/src/main/java/com/merge/api/resources/accounting/accountdetails/AccountDetailsClient.java index d0703fdd7..f1de87003 100644 --- a/src/main/java/com/merge/api/resources/accounting/accountdetails/AccountDetailsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/accountdetails/AccountDetailsClient.java @@ -44,6 +44,7 @@ public AccountDetails retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/accountingperiods/AccountingPeriodsClient.java b/src/main/java/com/merge/api/resources/accounting/accountingperiods/AccountingPeriodsClient.java index e7d855990..ad4c472b6 100644 --- a/src/main/java/com/merge/api/resources/accounting/accountingperiods/AccountingPeriodsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/accountingperiods/AccountingPeriodsClient.java @@ -71,7 +71,8 @@ public PaginatedAccountingPeriodList list(AccountingPeriodsListRequest request, .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -92,13 +93,6 @@ public PaginatedAccountingPeriodList list(AccountingPeriodsListRequest request, } } - /** - * Returns an AccountingPeriod object with the given id. - */ - public AccountingPeriod retrieve(String id) { - return retrieve(id, AccountingPeriodsRetrieveRequest.builder().build()); - } - /** * Returns an AccountingPeriod object with the given id. */ @@ -123,7 +117,8 @@ public AccountingPeriod retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsListRequest.java b/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsListRequest.java index 1c7fa18a7..81ef12eb2 100644 --- a/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingPeriodsListRequest.Builder.class) public final class AccountingPeriodsListRequest { private final Optional cursor; @@ -154,7 +154,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -165,7 +165,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -176,7 +176,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -187,7 +187,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -198,7 +198,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsRetrieveRequest.java index e598234dc..1382412e0 100644 --- a/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/accountingperiods/requests/AccountingPeriodsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingPeriodsRetrieveRequest.Builder.class) public final class AccountingPeriodsRetrieveRequest { private final Optional includeRemoteData; @@ -88,7 +88,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/accounts/AccountsClient.java b/src/main/java/com/merge/api/resources/accounting/accounts/AccountsClient.java index 9e45dbbaf..8daccfb76 100644 --- a/src/main/java/com/merge/api/resources/accounting/accounts/AccountsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/accounts/AccountsClient.java @@ -114,7 +114,8 @@ public PaginatedAccountList list(AccountsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,7 +170,8 @@ public AccountResponse create(AccountEndpointRequest request, RequestOptions req .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -190,13 +192,6 @@ public AccountResponse create(AccountEndpointRequest request, RequestOptions req } } - /** - * Returns an Account object with the given id. - */ - public Account retrieve(String id) { - return retrieve(id, AccountsRetrieveRequest.builder().build()); - } - /** * Returns an Account object with the given id. */ @@ -231,7 +226,8 @@ public Account retrieve(String id, AccountsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -272,6 +268,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountEndpointRequest.java index 6565c4e35..b6fc2aef5 100644 --- a/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountEndpointRequest.Builder.class) public final class AccountEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(AccountRequest model); + _FinalStage model(@NotNull AccountRequest model); Builder from(AccountEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(AccountEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(AccountRequest model) { + public _FinalStage model(@NotNull AccountRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(AccountRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsListRequest.java b/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsListRequest.java index 83aef26e1..7baa57f85 100644 --- a/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsListRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountsListRequest.Builder.class) public final class AccountsListRequest { private final Optional accountType; @@ -331,7 +331,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(String accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -342,7 +342,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -353,7 +353,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -364,7 +364,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -375,7 +375,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -386,7 +386,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -397,7 +397,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -408,7 +408,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -419,7 +419,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -430,7 +430,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -441,7 +441,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -452,7 +452,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -463,7 +463,7 @@ public Builder remoteFields(Optional remoteFiel } public Builder remoteFields(AccountsListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -474,7 +474,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -485,7 +485,7 @@ public Builder showEnumOrigins(Optional show } public Builder showEnumOrigins(AccountsListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsRetrieveRequest.java index 19952f1f4..1dc22b4cf 100644 --- a/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/accounts/requests/AccountsRetrieveRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountsRetrieveRequest.Builder.class) public final class AccountsRetrieveRequest { private final Optional expand; @@ -139,7 +139,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -150,7 +150,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -161,7 +161,7 @@ public Builder remoteFields(Optional remote } public Builder remoteFields(AccountsRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -172,7 +172,7 @@ public Builder showEnumOrigins(Optional } public Builder showEnumOrigins(AccountsRetrieveRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/accounttoken/AccountTokenClient.java b/src/main/java/com/merge/api/resources/accounting/accounttoken/AccountTokenClient.java index 8171c4188..5f3f236a0 100644 --- a/src/main/java/com/merge/api/resources/accounting/accounttoken/AccountTokenClient.java +++ b/src/main/java/com/merge/api/resources/accounting/accounttoken/AccountTokenClient.java @@ -45,6 +45,7 @@ public AccountToken retrieve(String publicToken, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/addresses/AddressesClient.java b/src/main/java/com/merge/api/resources/accounting/addresses/AddressesClient.java index d33fc31ca..f209c3aeb 100644 --- a/src/main/java/com/merge/api/resources/accounting/addresses/AddressesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/addresses/AddressesClient.java @@ -25,13 +25,6 @@ public AddressesClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - /** - * Returns an Address object with the given id. - */ - public Address retrieve(String id) { - return retrieve(id, AddressesRetrieveRequest.builder().build()); - } - /** * Returns an Address object with the given id. */ @@ -62,7 +55,8 @@ public Address retrieve(String id, AddressesRetrieveRequest request, RequestOpti .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/addresses/requests/AddressesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/addresses/requests/AddressesRetrieveRequest.java index 9e695c89b..42ed97a10 100644 --- a/src/main/java/com/merge/api/resources/accounting/addresses/requests/AddressesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/addresses/requests/AddressesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AddressesRetrieveRequest.Builder.class) public final class AddressesRetrieveRequest { private final Optional includeRemoteData; @@ -121,7 +121,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -132,7 +132,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -143,7 +143,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/asyncpassthrough/AsyncPassthroughClient.java b/src/main/java/com/merge/api/resources/accounting/asyncpassthrough/AsyncPassthroughClient.java index abfdeed44..9b4c6d9dc 100644 --- a/src/main/java/com/merge/api/resources/accounting/asyncpassthrough/AsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/resources/accounting/asyncpassthrough/AsyncPassthroughClient.java @@ -97,6 +97,7 @@ public AsyncPassthroughRetrieveResponse retrieve(String asyncPassthroughReceiptI .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/asynctasks/AsyncTasksClient.java b/src/main/java/com/merge/api/resources/accounting/asynctasks/AsyncTasksClient.java index 849d90e17..fa296fddd 100644 --- a/src/main/java/com/merge/api/resources/accounting/asynctasks/AsyncTasksClient.java +++ b/src/main/java/com/merge/api/resources/accounting/asynctasks/AsyncTasksClient.java @@ -45,6 +45,7 @@ public AsyncPostTask retrieve(String id, RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/attachments/AttachmentsClient.java b/src/main/java/com/merge/api/resources/accounting/attachments/AttachmentsClient.java index 98d810724..ed3664a71 100644 --- a/src/main/java/com/merge/api/resources/accounting/attachments/AttachmentsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/attachments/AttachmentsClient.java @@ -100,7 +100,8 @@ public PaginatedAccountingAttachmentList list(AttachmentsListRequest request, Re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -157,7 +158,8 @@ public AccountingAttachmentResponse create( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -178,13 +180,6 @@ public AccountingAttachmentResponse create( } } - /** - * Returns an AccountingAttachment object with the given id. - */ - public AccountingAttachment retrieve(String id) { - return retrieve(id, AttachmentsRetrieveRequest.builder().build()); - } - /** * Returns an AccountingAttachment object with the given id. */ @@ -208,7 +203,8 @@ public AccountingAttachment retrieve(String id, AttachmentsRetrieveRequest reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -249,6 +245,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/attachments/requests/AccountingAttachmentEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/attachments/requests/AccountingAttachmentEndpointRequest.java index 941ca4674..20b1e7b17 100644 --- a/src/main/java/com/merge/api/resources/accounting/attachments/requests/AccountingAttachmentEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/attachments/requests/AccountingAttachmentEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingAttachmentEndpointRequest.Builder.class) public final class AccountingAttachmentEndpointRequest { private final Optional isDebugMode; @@ -92,7 +93,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(AccountingAttachmentRequest model); + _FinalStage model(@NotNull AccountingAttachmentRequest model); Builder from(AccountingAttachmentEndpointRequest other); } @@ -132,7 +133,7 @@ public Builder from(AccountingAttachmentEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(AccountingAttachmentRequest model) { + public _FinalStage model(@NotNull AccountingAttachmentRequest model) { this.model = model; return this; } @@ -143,7 +144,7 @@ public _FinalStage model(AccountingAttachmentRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -160,7 +161,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsListRequest.java b/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsListRequest.java index d4e564c0f..6910b9596 100644 --- a/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentsListRequest.Builder.class) public final class AttachmentsListRequest { private final Optional companyId; @@ -261,7 +261,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -272,7 +272,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -283,7 +283,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -294,7 +294,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -305,7 +305,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -316,7 +316,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -327,7 +327,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsRetrieveRequest.java index 830369e3a..7107c630e 100644 --- a/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/attachments/requests/AttachmentsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentsRetrieveRequest.Builder.class) public final class AttachmentsRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/audittrail/AuditTrailClient.java b/src/main/java/com/merge/api/resources/accounting/audittrail/AuditTrailClient.java index dc7f8c0d9..b065f15dd 100644 --- a/src/main/java/com/merge/api/resources/accounting/audittrail/AuditTrailClient.java +++ b/src/main/java/com/merge/api/resources/accounting/audittrail/AuditTrailClient.java @@ -68,7 +68,8 @@ public PaginatedAuditLogEventList list(AuditTrailListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/audittrail/requests/AuditTrailListRequest.java b/src/main/java/com/merge/api/resources/accounting/audittrail/requests/AuditTrailListRequest.java index cbf5d2298..6ffa702d6 100644 --- a/src/main/java/com/merge/api/resources/accounting/audittrail/requests/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/audittrail/requests/AuditTrailListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditTrailListRequest.Builder.class) public final class AuditTrailListRequest { private final Optional cursor; @@ -169,7 +169,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -180,7 +180,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -191,7 +191,7 @@ public Builder eventType(Optional eventType) { } public Builder eventType(String eventType) { - this.eventType = Optional.of(eventType); + this.eventType = Optional.ofNullable(eventType); return this; } @@ -202,7 +202,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -213,7 +213,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -224,7 +224,7 @@ public Builder userEmail(Optional userEmail) { } public Builder userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/availableactions/AvailableActionsClient.java b/src/main/java/com/merge/api/resources/accounting/availableactions/AvailableActionsClient.java index 9430ae11e..4ee1175d0 100644 --- a/src/main/java/com/merge/api/resources/accounting/availableactions/AvailableActionsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/availableactions/AvailableActionsClient.java @@ -44,6 +44,7 @@ public AvailableActions retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/balancesheets/BalanceSheetsClient.java b/src/main/java/com/merge/api/resources/accounting/balancesheets/BalanceSheetsClient.java index 756d6ead7..d7184e1b2 100644 --- a/src/main/java/com/merge/api/resources/accounting/balancesheets/BalanceSheetsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/balancesheets/BalanceSheetsClient.java @@ -96,7 +96,8 @@ public PaginatedBalanceSheetList list(BalanceSheetsListRequest request, RequestO .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedBalanceSheetList list(BalanceSheetsListRequest request, RequestO } } - /** - * Returns a BalanceSheet object with the given id. - */ - public BalanceSheet retrieve(String id) { - return retrieve(id, BalanceSheetsRetrieveRequest.builder().build()); - } - /** * Returns a BalanceSheet object with the given id. */ @@ -150,7 +144,8 @@ public BalanceSheet retrieve(String id, BalanceSheetsRetrieveRequest request, Re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsListRequest.java b/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsListRequest.java index 13d80340e..dc0a835f3 100644 --- a/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BalanceSheetsListRequest.Builder.class) public final class BalanceSheetsListRequest { private final Optional companyId; @@ -278,7 +278,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -289,7 +289,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -300,7 +300,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -311,7 +311,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -322,7 +322,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -333,7 +333,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -344,7 +344,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -355,7 +355,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsRetrieveRequest.java index c47e20065..a647d103b 100644 --- a/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/balancesheets/requests/BalanceSheetsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BalanceSheetsRetrieveRequest.Builder.class) public final class BalanceSheetsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/BankFeedAccountsClient.java b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/BankFeedAccountsClient.java index 09a6e8ad1..0e3ce5b79 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/BankFeedAccountsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/BankFeedAccountsClient.java @@ -78,7 +78,8 @@ public PaginatedBankFeedAccountList list(BankFeedAccountsListRequest request, Re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -133,7 +134,8 @@ public BankFeedAccountResponse create(BankFeedAccountEndpointRequest request, Re .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -154,13 +156,6 @@ public BankFeedAccountResponse create(BankFeedAccountEndpointRequest request, Re } } - /** - * Returns a BankFeedAccount object with the given id. - */ - public BankFeedAccount retrieve(String id) { - return retrieve(id, BankFeedAccountsRetrieveRequest.builder().build()); - } - /** * Returns a BankFeedAccount object with the given id. */ @@ -184,7 +179,8 @@ public BankFeedAccount retrieve(String id, BankFeedAccountsRetrieveRequest reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -225,6 +221,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountEndpointRequest.java index bee3dd4c6..d14df4727 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedAccountEndpointRequest.Builder.class) public final class BankFeedAccountEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(BankFeedAccountRequest model); + _FinalStage model(@NotNull BankFeedAccountRequest model); Builder from(BankFeedAccountEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(BankFeedAccountEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(BankFeedAccountRequest model) { + public _FinalStage model(@NotNull BankFeedAccountRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(BankFeedAccountRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsListRequest.java b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsListRequest.java index ccf651431..4087db08f 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedAccountsListRequest.Builder.class) public final class BankFeedAccountsListRequest { private final Optional cursor; @@ -154,7 +154,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -165,7 +165,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -176,7 +176,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -187,7 +187,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -198,7 +198,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsRetrieveRequest.java index 9492e453b..bd7adc139 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedaccounts/requests/BankFeedAccountsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedAccountsRetrieveRequest.Builder.class) public final class BankFeedAccountsRetrieveRequest { private final Optional includeRemoteData; @@ -88,7 +88,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/BankFeedTransactionsClient.java b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/BankFeedTransactionsClient.java index 6f52fda56..f85f48072 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/BankFeedTransactionsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/BankFeedTransactionsClient.java @@ -105,7 +105,8 @@ public PaginatedBankFeedTransactionList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -162,7 +163,8 @@ public BankFeedTransactionResponse create( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -183,13 +185,6 @@ public BankFeedTransactionResponse create( } } - /** - * Returns a BankFeedTransaction object with the given id. - */ - public BankFeedTransaction retrieve(String id) { - return retrieve(id, BankFeedTransactionsRetrieveRequest.builder().build()); - } - /** * Returns a BankFeedTransaction object with the given id. */ @@ -217,7 +212,8 @@ public BankFeedTransaction retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -258,6 +254,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionEndpointRequest.java index 56e30125e..bfdbfb620 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedTransactionEndpointRequest.Builder.class) public final class BankFeedTransactionEndpointRequest { private final Optional isDebugMode; @@ -92,7 +93,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(BankFeedTransactionRequestRequest model); + _FinalStage model(@NotNull BankFeedTransactionRequestRequest model); Builder from(BankFeedTransactionEndpointRequest other); } @@ -132,7 +133,7 @@ public Builder from(BankFeedTransactionEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(BankFeedTransactionRequestRequest model) { + public _FinalStage model(@NotNull BankFeedTransactionRequestRequest model) { this.model = model; return this; } @@ -143,7 +144,7 @@ public _FinalStage model(BankFeedTransactionRequestRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -160,7 +161,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsListRequest.java b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsListRequest.java index f76f41f8e..a65989d6c 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedTransactionsListRequest.Builder.class) public final class BankFeedTransactionsListRequest { private final Optional createdAfter; @@ -278,7 +278,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -289,7 +289,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -300,7 +300,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -311,7 +311,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -322,7 +322,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -333,7 +333,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -344,7 +344,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -355,7 +355,7 @@ public Builder isProcessed(Optional isProcessed) { } public Builder isProcessed(Boolean isProcessed) { - this.isProcessed = Optional.of(isProcessed); + this.isProcessed = Optional.ofNullable(isProcessed); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsRetrieveRequest.java index 82699ef12..d1a9a94c7 100644 --- a/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/bankfeedtransactions/requests/BankFeedTransactionsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedTransactionsRetrieveRequest.Builder.class) public final class BankFeedTransactionsRetrieveRequest { private final Optional expand; @@ -103,7 +103,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -114,7 +114,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/cashflowstatements/CashFlowStatementsClient.java b/src/main/java/com/merge/api/resources/accounting/cashflowstatements/CashFlowStatementsClient.java index c8b731be9..29fa8e13e 100644 --- a/src/main/java/com/merge/api/resources/accounting/cashflowstatements/CashFlowStatementsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/cashflowstatements/CashFlowStatementsClient.java @@ -96,7 +96,8 @@ public PaginatedCashFlowStatementList list(CashFlowStatementsListRequest request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedCashFlowStatementList list(CashFlowStatementsListRequest request } } - /** - * Returns a CashFlowStatement object with the given id. - */ - public CashFlowStatement retrieve(String id) { - return retrieve(id, CashFlowStatementsRetrieveRequest.builder().build()); - } - /** * Returns a CashFlowStatement object with the given id. */ @@ -151,7 +145,8 @@ public CashFlowStatement retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsListRequest.java b/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsListRequest.java index 5f038ed1e..30d7b896b 100644 --- a/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CashFlowStatementsListRequest.Builder.class) public final class CashFlowStatementsListRequest { private final Optional companyId; @@ -278,7 +278,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -289,7 +289,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -300,7 +300,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -311,7 +311,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -322,7 +322,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -333,7 +333,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -344,7 +344,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -355,7 +355,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsRetrieveRequest.java index 8fcaeef64..29db7c7f2 100644 --- a/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/cashflowstatements/requests/CashFlowStatementsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CashFlowStatementsRetrieveRequest.Builder.class) public final class CashFlowStatementsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/companyinfo/CompanyInfoClient.java b/src/main/java/com/merge/api/resources/accounting/companyinfo/CompanyInfoClient.java index 39531ae72..b2e020910 100644 --- a/src/main/java/com/merge/api/resources/accounting/companyinfo/CompanyInfoClient.java +++ b/src/main/java/com/merge/api/resources/accounting/companyinfo/CompanyInfoClient.java @@ -93,7 +93,8 @@ public PaginatedCompanyInfoList list(CompanyInfoListRequest request, RequestOpti .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -114,13 +115,6 @@ public PaginatedCompanyInfoList list(CompanyInfoListRequest request, RequestOpti } } - /** - * Returns a CompanyInfo object with the given id. - */ - public CompanyInfo retrieve(String id) { - return retrieve(id, CompanyInfoRetrieveRequest.builder().build()); - } - /** * Returns a CompanyInfo object with the given id. */ @@ -147,7 +141,8 @@ public CompanyInfo retrieve(String id, CompanyInfoRetrieveRequest request, Reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoListRequest.java b/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoListRequest.java index ecca5c89f..dded57e3a 100644 --- a/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CompanyInfoListRequest.Builder.class) public final class CompanyInfoListRequest { private final Optional createdAfter; @@ -262,7 +262,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -273,7 +273,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -284,7 +284,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -295,7 +295,7 @@ public Builder expand(Optional expand) { } public Builder expand(CompanyInfoListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -306,7 +306,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -317,7 +317,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -328,7 +328,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -339,7 +339,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -350,7 +350,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -361,7 +361,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -372,7 +372,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoRetrieveRequest.java index 9c764fd54..a43205b56 100644 --- a/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/companyinfo/requests/CompanyInfoRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CompanyInfoRetrieveRequest.Builder.class) public final class CompanyInfoRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(CompanyInfoRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/contacts/ContactsClient.java b/src/main/java/com/merge/api/resources/accounting/contacts/ContactsClient.java index 2514d280c..387c35d14 100644 --- a/src/main/java/com/merge/api/resources/accounting/contacts/ContactsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/contacts/ContactsClient.java @@ -129,7 +129,8 @@ public PaginatedContactList list(ContactsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -184,7 +185,8 @@ public ContactResponse create(ContactEndpointRequest request, RequestOptions req .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -205,13 +207,6 @@ public ContactResponse create(ContactEndpointRequest request, RequestOptions req } } - /** - * Returns a Contact object with the given id. - */ - public Contact retrieve(String id) { - return retrieve(id, ContactsRetrieveRequest.builder().build()); - } - /** * Returns a Contact object with the given id. */ @@ -250,7 +245,8 @@ public Contact retrieve(String id, ContactsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -291,6 +287,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -362,7 +359,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactEndpointRequest.java index ac044130b..a86c0b627 100644 --- a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactEndpointRequest.Builder.class) public final class ContactEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(ContactRequest model); + _FinalStage model(@NotNull ContactRequest model); Builder from(ContactEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(ContactEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(ContactRequest model) { + public _FinalStage model(@NotNull ContactRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(ContactRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsListRequest.java b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsListRequest.java index 0e31608c4..67b527bf6 100644 --- a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsListRequest.Builder.class) public final class ContactsListRequest { private final Optional companyId; @@ -398,7 +398,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -409,7 +409,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -420,7 +420,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -431,7 +431,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -442,7 +442,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -453,7 +453,7 @@ public Builder expand(Optional expand) { } public Builder expand(ContactsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -464,7 +464,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -475,7 +475,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -486,7 +486,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -497,7 +497,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -508,7 +508,7 @@ public Builder isCustomer(Optional isCustomer) { } public Builder isCustomer(String isCustomer) { - this.isCustomer = Optional.of(isCustomer); + this.isCustomer = Optional.ofNullable(isCustomer); return this; } @@ -519,7 +519,7 @@ public Builder isSupplier(Optional isSupplier) { } public Builder isSupplier(String isSupplier) { - this.isSupplier = Optional.of(isSupplier); + this.isSupplier = Optional.ofNullable(isSupplier); return this; } @@ -530,7 +530,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -541,7 +541,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -552,7 +552,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -563,7 +563,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -574,7 +574,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -585,7 +585,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -596,7 +596,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRemoteFieldClassesListRequest.java index a64fd4535..cd73b8493 100644 --- a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsRemoteFieldClassesListRequest.Builder.class) public final class ContactsRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRetrieveRequest.java index 33e4a93a3..b687bffe6 100644 --- a/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/contacts/requests/ContactsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsRetrieveRequest.Builder.class) public final class ContactsRetrieveRequest { private final Optional expand; @@ -155,7 +155,7 @@ public Builder expand(Optional expand) { } public Builder expand(ContactsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -166,7 +166,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -177,7 +177,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -188,7 +188,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -199,7 +199,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/creditnotes/CreditNotesClient.java b/src/main/java/com/merge/api/resources/accounting/creditnotes/CreditNotesClient.java index bcb25ae3f..9b84d9a49 100644 --- a/src/main/java/com/merge/api/resources/accounting/creditnotes/CreditNotesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/creditnotes/CreditNotesClient.java @@ -121,7 +121,8 @@ public PaginatedCreditNoteList list(CreditNotesListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -176,7 +177,8 @@ public CreditNoteResponse create(CreditNoteEndpointRequest request, RequestOptio .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -197,13 +199,6 @@ public CreditNoteResponse create(CreditNoteEndpointRequest request, RequestOptio } } - /** - * Returns a CreditNote object with the given id. - */ - public CreditNote retrieve(String id) { - return retrieve(id, CreditNotesRetrieveRequest.builder().build()); - } - /** * Returns a CreditNote object with the given id. */ @@ -238,7 +233,8 @@ public CreditNote retrieve(String id, CreditNotesRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -279,6 +275,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNoteEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNoteEndpointRequest.java index efdbbb47e..c1d7c2879 100644 --- a/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNoteEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNoteEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteEndpointRequest.Builder.class) public final class CreditNoteEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(CreditNoteRequest model); + _FinalStage model(@NotNull CreditNoteRequest model); Builder from(CreditNoteEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(CreditNoteEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(CreditNoteRequest model) { + public _FinalStage model(@NotNull CreditNoteRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(CreditNoteRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesListRequest.java b/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesListRequest.java index a9d65cb36..7ab256346 100644 --- a/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesListRequest.java @@ -21,7 +21,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNotesListRequest.Builder.class) public final class CreditNotesListRequest { private final Optional companyId; @@ -349,7 +349,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -360,7 +360,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -371,7 +371,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -382,7 +382,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -393,7 +393,7 @@ public Builder expand(Optional expand) { } public Builder expand(CreditNotesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -404,7 +404,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -415,7 +415,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -426,7 +426,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -437,7 +437,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -448,7 +448,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -459,7 +459,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -470,7 +470,7 @@ public Builder remoteFields(Optional remoteF } public Builder remoteFields(CreditNotesListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -481,7 +481,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -492,7 +492,7 @@ public Builder showEnumOrigins(Optional s } public Builder showEnumOrigins(CreditNotesListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -503,7 +503,7 @@ public Builder transactionDateAfter(Optional transactionDateAfte } public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { - this.transactionDateAfter = Optional.of(transactionDateAfter); + this.transactionDateAfter = Optional.ofNullable(transactionDateAfter); return this; } @@ -514,7 +514,7 @@ public Builder transactionDateBefore(Optional transactionDateBef } public Builder transactionDateBefore(OffsetDateTime transactionDateBefore) { - this.transactionDateBefore = Optional.of(transactionDateBefore); + this.transactionDateBefore = Optional.ofNullable(transactionDateBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesRetrieveRequest.java index 70057af23..75909edbb 100644 --- a/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/creditnotes/requests/CreditNotesRetrieveRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNotesRetrieveRequest.Builder.class) public final class CreditNotesRetrieveRequest { private final Optional expand; @@ -140,7 +140,7 @@ public Builder expand(Optional expand) { } public Builder expand(CreditNotesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -151,7 +151,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -162,7 +162,7 @@ public Builder remoteFields(Optional rem } public Builder remoteFields(CreditNotesRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -173,7 +173,7 @@ public Builder showEnumOrigins(OptionalEmployee object with the given id. - */ - public Employee retrieve(String id) { - return retrieve(id, EmployeesRetrieveRequest.builder().build()); - } - /** * Returns an Employee object with the given id. */ @@ -128,7 +122,8 @@ public Employee retrieve(String id, EmployeesRetrieveRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesListRequest.java b/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesListRequest.java index c24a7e928..452e24f0a 100644 --- a/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeesListRequest.Builder.class) public final class EmployeesListRequest { private final Optional cursor; @@ -175,7 +175,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -186,7 +186,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -197,7 +197,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -208,7 +208,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -219,7 +219,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -230,7 +230,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesRetrieveRequest.java index bc3885313..83a6c593a 100644 --- a/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/employees/requests/EmployeesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeesRetrieveRequest.Builder.class) public final class EmployeesRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/expenses/ExpensesClient.java b/src/main/java/com/merge/api/resources/accounting/expenses/ExpensesClient.java index 85d5e3de7..7aaa625f9 100644 --- a/src/main/java/com/merge/api/resources/accounting/expenses/ExpensesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/expenses/ExpensesClient.java @@ -121,7 +121,8 @@ public PaginatedExpenseList list(ExpensesListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -176,7 +177,8 @@ public ExpenseResponse create(ExpenseEndpointRequest request, RequestOptions req .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -197,13 +199,6 @@ public ExpenseResponse create(ExpenseEndpointRequest request, RequestOptions req } } - /** - * Returns an Expense object with the given id. - */ - public Expense retrieve(String id) { - return retrieve(id, ExpensesRetrieveRequest.builder().build()); - } - /** * Returns an Expense object with the given id. */ @@ -235,7 +230,8 @@ public Expense retrieve(String id, ExpensesRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -308,7 +304,8 @@ public PaginatedRemoteFieldClassList linesRemoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -349,6 +346,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -420,7 +418,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpenseEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpenseEndpointRequest.java index e9e2cd5ad..015ca481d 100644 --- a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpenseEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpenseEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpenseEndpointRequest.Builder.class) public final class ExpenseEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(ExpenseRequest model); + _FinalStage model(@NotNull ExpenseRequest model); Builder from(ExpenseEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(ExpenseEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(ExpenseRequest model) { + public _FinalStage model(@NotNull ExpenseRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(ExpenseRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesLinesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesLinesRemoteFieldClassesListRequest.java index 69952890d..09305eee6 100644 --- a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesLinesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesLinesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpensesLinesRemoteFieldClassesListRequest.Builder.class) public final class ExpensesLinesRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesListRequest.java b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesListRequest.java index 32a780d95..036ea589c 100644 --- a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpensesListRequest.Builder.class) public final class ExpensesListRequest { private final Optional companyId; @@ -330,7 +330,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -341,7 +341,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -352,7 +352,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -363,7 +363,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -374,7 +374,7 @@ public Builder expand(Optional expand) { } public Builder expand(ExpensesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -385,7 +385,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -396,7 +396,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -407,7 +407,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -418,7 +418,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -429,7 +429,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -440,7 +440,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -451,7 +451,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -462,7 +462,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -473,7 +473,7 @@ public Builder transactionDateAfter(Optional transactionDateAfte } public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { - this.transactionDateAfter = Optional.of(transactionDateAfter); + this.transactionDateAfter = Optional.ofNullable(transactionDateAfter); return this; } @@ -484,7 +484,7 @@ public Builder transactionDateBefore(Optional transactionDateBef } public Builder transactionDateBefore(OffsetDateTime transactionDateBefore) { - this.transactionDateBefore = Optional.of(transactionDateBefore); + this.transactionDateBefore = Optional.ofNullable(transactionDateBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRemoteFieldClassesListRequest.java index 793c5de2c..9338f8143 100644 --- a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpensesRemoteFieldClassesListRequest.Builder.class) public final class ExpensesRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRetrieveRequest.java index 5e6f60e39..0b94c8644 100644 --- a/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/expenses/requests/ExpensesRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpensesRetrieveRequest.Builder.class) public final class ExpensesRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(ExpensesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/fieldmapping/FieldMappingClient.java b/src/main/java/com/merge/api/resources/accounting/fieldmapping/FieldMappingClient.java index 7d2db4516..55617ab9b 100644 --- a/src/main/java/com/merge/api/resources/accounting/fieldmapping/FieldMappingClient.java +++ b/src/main/java/com/merge/api/resources/accounting/fieldmapping/FieldMappingClient.java @@ -67,7 +67,8 @@ public FieldMappingApiInstanceResponse fieldMappingsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -127,7 +128,8 @@ public FieldMappingInstanceResponse fieldMappingsCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,6 +171,7 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, .method("DELETE", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -189,14 +192,6 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, } } - /** - * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. - */ - public FieldMappingInstanceResponse fieldMappingsPartialUpdate(String fieldMappingId) { - return fieldMappingsPartialUpdate( - fieldMappingId, PatchedEditFieldMappingRequest.builder().build()); - } - /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. */ @@ -227,6 +222,7 @@ public FieldMappingInstanceResponse fieldMappingsPartialUpdate( .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,7 +276,8 @@ public RemoteFieldApiResponse remoteFieldsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -321,6 +318,7 @@ public ExternalTargetFieldApiResponse targetFieldsRetrieve(RequestOptions reques .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/CreateFieldMappingRequest.java index 26450a09e..4def5bffb 100644 --- a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/CreateFieldMappingRequest.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateFieldMappingRequest.Builder.class) public final class CreateFieldMappingRequest { private final Optional excludeRemoteFieldMetadata; @@ -157,25 +158,25 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { - TargetFieldDescriptionStage targetFieldName(String targetFieldName); + TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { - RemoteMethodStage targetFieldDescription(String targetFieldDescription); + RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { - RemoteUrlPathStage remoteMethod(String remoteMethod); + RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { - CommonModelNameStage remoteUrlPath(String remoteUrlPath); + CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { - _FinalStage commonModelName(String commonModelName); + _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { @@ -237,7 +238,7 @@ public Builder from(CreateFieldMappingRequest other) { */ @java.lang.Override @JsonSetter("target_field_name") - public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { + public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName) { this.targetFieldName = targetFieldName; return this; } @@ -248,7 +249,7 @@ public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { */ @java.lang.Override @JsonSetter("target_field_description") - public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { + public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription) { this.targetFieldDescription = targetFieldDescription; return this; } @@ -259,7 +260,7 @@ public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { */ @java.lang.Override @JsonSetter("remote_method") - public RemoteUrlPathStage remoteMethod(String remoteMethod) { + public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { this.remoteMethod = remoteMethod; return this; } @@ -270,7 +271,7 @@ public RemoteUrlPathStage remoteMethod(String remoteMethod) { */ @java.lang.Override @JsonSetter("remote_url_path") - public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { + public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; return this; } @@ -281,7 +282,7 @@ public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { */ @java.lang.Override @JsonSetter("common_model_name") - public _FinalStage commonModelName(String commonModelName) { + public _FinalStage commonModelName(@NotNull String commonModelName) { this.commonModelName = commonModelName; return this; } @@ -320,7 +321,7 @@ public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalP */ @java.lang.Override public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/FieldMappingsRetrieveRequest.java index ed5590727..6fbb1534d 100644 --- a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/FieldMappingsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingsRetrieveRequest.Builder.class) public final class FieldMappingsRetrieveRequest { private final Optional excludeRemoteFieldMetadata; @@ -88,7 +88,7 @@ public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMe } public Builder excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/PatchedEditFieldMappingRequest.java index 9c2293224..d998d02f7 100644 --- a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/PatchedEditFieldMappingRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEditFieldMappingRequest.Builder.class) public final class PatchedEditFieldMappingRequest { private final Optional> remoteFieldTraversalPath; @@ -123,7 +123,7 @@ public Builder remoteFieldTraversalPath(Optional> remoteFieldTrav } public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) { - this.remoteFieldTraversalPath = Optional.of(remoteFieldTraversalPath); + this.remoteFieldTraversalPath = Optional.ofNullable(remoteFieldTraversalPath); return this; } @@ -134,7 +134,7 @@ public Builder remoteMethod(Optional remoteMethod) { } public Builder remoteMethod(String remoteMethod) { - this.remoteMethod = Optional.of(remoteMethod); + this.remoteMethod = Optional.ofNullable(remoteMethod); return this; } @@ -145,7 +145,7 @@ public Builder remoteUrlPath(Optional remoteUrlPath) { } public Builder remoteUrlPath(String remoteUrlPath) { - this.remoteUrlPath = Optional.of(remoteUrlPath); + this.remoteUrlPath = Optional.ofNullable(remoteUrlPath); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/RemoteFieldsRetrieveRequest.java index 59ab57b77..e4dc53b9f 100644 --- a/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/fieldmapping/requests/RemoteFieldsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldsRetrieveRequest.Builder.class) public final class RemoteFieldsRetrieveRequest { private final Optional commonModels; @@ -104,7 +104,7 @@ public Builder commonModels(Optional commonModels) { } public Builder commonModels(String commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -115,7 +115,7 @@ public Builder includeExampleValues(Optional includeExampleValues) { } public Builder includeExampleValues(String includeExampleValues) { - this.includeExampleValues = Optional.of(includeExampleValues); + this.includeExampleValues = Optional.ofNullable(includeExampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/forceresync/ForceResyncClient.java b/src/main/java/com/merge/api/resources/accounting/forceresync/ForceResyncClient.java index 0e04269cc..303837539 100644 --- a/src/main/java/com/merge/api/resources/accounting/forceresync/ForceResyncClient.java +++ b/src/main/java/com/merge/api/resources/accounting/forceresync/ForceResyncClient.java @@ -47,6 +47,7 @@ public List syncStatusResyncCreate(RequestOptions requestOptions) { .method("POST", RequestBody.create("", null)) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/GeneralLedgerTransactionsClient.java b/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/GeneralLedgerTransactionsClient.java index 86acddf7d..1d18dea31 100644 --- a/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/GeneralLedgerTransactionsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/GeneralLedgerTransactionsClient.java @@ -105,7 +105,8 @@ public PaginatedGeneralLedgerTransactionList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -127,13 +128,6 @@ public PaginatedGeneralLedgerTransactionList list( } } - /** - * Returns a GeneralLedgerTransaction object with the given id. - */ - public GeneralLedgerTransaction retrieve(String id) { - return retrieve(id, GeneralLedgerTransactionsRetrieveRequest.builder().build()); - } - /** * Returns a GeneralLedgerTransaction object with the given id. */ @@ -161,7 +155,8 @@ public GeneralLedgerTransaction retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsListRequest.java b/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsListRequest.java index 171843702..a7cafe3bb 100644 --- a/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GeneralLedgerTransactionsListRequest.Builder.class) public final class GeneralLedgerTransactionsListRequest { private final Optional companyId; @@ -314,7 +314,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -325,7 +325,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -336,7 +336,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -347,7 +347,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -358,7 +358,7 @@ public Builder expand(Optional expan } public Builder expand(GeneralLedgerTransactionsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -369,7 +369,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -380,7 +380,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -391,7 +391,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -402,7 +402,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -413,7 +413,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -424,7 +424,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -435,7 +435,7 @@ public Builder postedDateAfter(Optional postedDateAfter) { } public Builder postedDateAfter(OffsetDateTime postedDateAfter) { - this.postedDateAfter = Optional.of(postedDateAfter); + this.postedDateAfter = Optional.ofNullable(postedDateAfter); return this; } @@ -446,7 +446,7 @@ public Builder postedDateBefore(Optional postedDateBefore) { } public Builder postedDateBefore(OffsetDateTime postedDateBefore) { - this.postedDateBefore = Optional.of(postedDateBefore); + this.postedDateBefore = Optional.ofNullable(postedDateBefore); return this; } @@ -457,7 +457,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsRetrieveRequest.java index 17cdd39c4..f8f37c80c 100644 --- a/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/generalledgertransactions/requests/GeneralLedgerTransactionsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GeneralLedgerTransactionsRetrieveRequest.Builder.class) public final class GeneralLedgerTransactionsRetrieveRequest { private final Optional expand; @@ -106,7 +106,7 @@ public Builder expand(Optional e } public Builder expand(GeneralLedgerTransactionsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -117,7 +117,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/generatekey/GenerateKeyClient.java b/src/main/java/com/merge/api/resources/accounting/generatekey/GenerateKeyClient.java index f4987d6e1..22171e8a3 100644 --- a/src/main/java/com/merge/api/resources/accounting/generatekey/GenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/accounting/generatekey/GenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(GenerateRemoteKeyRequest request, RequestOptions request .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/generatekey/requests/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/resources/accounting/generatekey/requests/GenerateRemoteKeyRequest.java index 505b8882d..7f7460bb1 100644 --- a/src/main/java/com/merge/api/resources/accounting/generatekey/requests/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/generatekey/requests/GenerateRemoteKeyRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GenerateRemoteKeyRequest.Builder.class) public final class GenerateRemoteKeyRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); } @@ -95,7 +96,7 @@ public Builder from(GenerateRemoteKeyRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/incomestatements/IncomeStatementsClient.java b/src/main/java/com/merge/api/resources/accounting/incomestatements/IncomeStatementsClient.java index b3bf0905a..a5f4511f2 100644 --- a/src/main/java/com/merge/api/resources/accounting/incomestatements/IncomeStatementsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/incomestatements/IncomeStatementsClient.java @@ -96,7 +96,8 @@ public PaginatedIncomeStatementList list(IncomeStatementsListRequest request, Re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedIncomeStatementList list(IncomeStatementsListRequest request, Re } } - /** - * Returns an IncomeStatement object with the given id. - */ - public IncomeStatement retrieve(String id) { - return retrieve(id, IncomeStatementsRetrieveRequest.builder().build()); - } - /** * Returns an IncomeStatement object with the given id. */ @@ -150,7 +144,8 @@ public IncomeStatement retrieve(String id, IncomeStatementsRetrieveRequest reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsListRequest.java b/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsListRequest.java index 3a354ca6f..a4cec14f1 100644 --- a/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IncomeStatementsListRequest.Builder.class) public final class IncomeStatementsListRequest { private final Optional companyId; @@ -278,7 +278,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -289,7 +289,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -300,7 +300,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -311,7 +311,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -322,7 +322,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -333,7 +333,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -344,7 +344,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -355,7 +355,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsRetrieveRequest.java index 8c20b1ac7..89e5e0c10 100644 --- a/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/incomestatements/requests/IncomeStatementsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IncomeStatementsRetrieveRequest.Builder.class) public final class IncomeStatementsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/invoices/InvoicesClient.java b/src/main/java/com/merge/api/resources/accounting/invoices/InvoicesClient.java index b81812711..b64c6fc22 100644 --- a/src/main/java/com/merge/api/resources/accounting/invoices/InvoicesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/invoices/InvoicesClient.java @@ -139,7 +139,8 @@ public PaginatedInvoiceList list(InvoicesListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -196,7 +197,8 @@ public InvoiceResponse create(InvoiceEndpointRequest request, RequestOptions req .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -217,13 +219,6 @@ public InvoiceResponse create(InvoiceEndpointRequest request, RequestOptions req } } - /** - * Returns an Invoice object with the given id. - */ - public Invoice retrieve(String id) { - return retrieve(id, InvoicesRetrieveRequest.builder().build()); - } - /** * Returns an Invoice object with the given id. */ @@ -262,7 +257,8 @@ public Invoice retrieve(String id, InvoicesRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -319,7 +315,8 @@ public InvoiceResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -392,7 +389,8 @@ public PaginatedRemoteFieldClassList lineItemsRemoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -434,6 +432,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -474,6 +473,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -545,7 +545,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoiceEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoiceEndpointRequest.java index 42ad93688..d48bac47d 100644 --- a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoiceEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoiceEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoiceEndpointRequest.Builder.class) public final class InvoiceEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(InvoiceRequest model); + _FinalStage model(@NotNull InvoiceRequest model); Builder from(InvoiceEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(InvoiceEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(InvoiceRequest model) { + public _FinalStage model(@NotNull InvoiceRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(InvoiceRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesLineItemsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesLineItemsRemoteFieldClassesListRequest.java index e955e587c..25c9b2bc6 100644 --- a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesLineItemsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesLineItemsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoicesLineItemsRemoteFieldClassesListRequest.Builder.class) public final class InvoicesLineItemsRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesListRequest.java b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesListRequest.java index bf46b92ef..ee786508a 100644 --- a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesListRequest.java @@ -21,7 +21,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoicesListRequest.Builder.class) public final class InvoicesListRequest { private final Optional companyId; @@ -446,7 +446,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -457,7 +457,7 @@ public Builder contactId(Optional contactId) { } public Builder contactId(String contactId) { - this.contactId = Optional.of(contactId); + this.contactId = Optional.ofNullable(contactId); return this; } @@ -468,7 +468,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -479,7 +479,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -490,7 +490,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -501,7 +501,7 @@ public Builder expand(Optional expand) { } public Builder expand(InvoicesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -512,7 +512,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -523,7 +523,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -534,7 +534,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -545,7 +545,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -556,7 +556,7 @@ public Builder issueDateAfter(Optional issueDateAfter) { } public Builder issueDateAfter(OffsetDateTime issueDateAfter) { - this.issueDateAfter = Optional.of(issueDateAfter); + this.issueDateAfter = Optional.ofNullable(issueDateAfter); return this; } @@ -567,7 +567,7 @@ public Builder issueDateBefore(Optional issueDateBefore) { } public Builder issueDateBefore(OffsetDateTime issueDateBefore) { - this.issueDateBefore = Optional.of(issueDateBefore); + this.issueDateBefore = Optional.ofNullable(issueDateBefore); return this; } @@ -578,7 +578,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -589,7 +589,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -600,7 +600,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -611,7 +611,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -622,7 +622,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -633,7 +633,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -644,7 +644,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -655,7 +655,7 @@ public Builder status(Optional status) { } public Builder status(InvoicesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -666,7 +666,7 @@ public Builder type(Optional type) { } public Builder type(InvoicesListRequestType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRemoteFieldClassesListRequest.java index 742e91b3a..daff114e1 100644 --- a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoicesRemoteFieldClassesListRequest.Builder.class) public final class InvoicesRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRetrieveRequest.java index 19f1022c5..eb21d1c80 100644 --- a/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/invoices/requests/InvoicesRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoicesRetrieveRequest.Builder.class) public final class InvoicesRetrieveRequest { private final Optional expand; @@ -155,7 +155,7 @@ public Builder expand(Optional expand) { } public Builder expand(InvoicesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -166,7 +166,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -177,7 +177,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -188,7 +188,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -199,7 +199,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/invoices/requests/PatchedInvoiceEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/invoices/requests/PatchedInvoiceEndpointRequest.java index 88a7d0f6f..14bdfeec3 100644 --- a/src/main/java/com/merge/api/resources/accounting/invoices/requests/PatchedInvoiceEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/invoices/requests/PatchedInvoiceEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedInvoiceEndpointRequest.Builder.class) public final class PatchedInvoiceEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(InvoiceRequest model); + _FinalStage model(@NotNull InvoiceRequest model); Builder from(PatchedInvoiceEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedInvoiceEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(InvoiceRequest model) { + public _FinalStage model(@NotNull InvoiceRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(InvoiceRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/issues/IssuesClient.java b/src/main/java/com/merge/api/resources/accounting/issues/IssuesClient.java index 14ecea8ad..43f031b0f 100644 --- a/src/main/java/com/merge/api/resources/accounting/issues/IssuesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/issues/IssuesClient.java @@ -105,7 +105,8 @@ public PaginatedIssueList list(IssuesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -147,6 +148,7 @@ public Issue retrieve(String id, RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/issues/requests/IssuesListRequest.java b/src/main/java/com/merge/api/resources/accounting/issues/requests/IssuesListRequest.java index 8adcb2486..1d8863b78 100644 --- a/src/main/java/com/merge/api/resources/accounting/issues/requests/IssuesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/issues/requests/IssuesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IssuesListRequest.Builder.class) public final class IssuesListRequest { private final Optional accountToken; @@ -308,7 +308,7 @@ public Builder accountToken(Optional accountToken) { } public Builder accountToken(String accountToken) { - this.accountToken = Optional.of(accountToken); + this.accountToken = Optional.ofNullable(accountToken); return this; } @@ -319,7 +319,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -330,7 +330,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -341,7 +341,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -352,7 +352,7 @@ public Builder firstIncidentTimeAfter(Optional firstIncidentTime } public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { - this.firstIncidentTimeAfter = Optional.of(firstIncidentTimeAfter); + this.firstIncidentTimeAfter = Optional.ofNullable(firstIncidentTimeAfter); return this; } @@ -363,7 +363,7 @@ public Builder firstIncidentTimeBefore(Optional firstIncidentTim } public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { - this.firstIncidentTimeBefore = Optional.of(firstIncidentTimeBefore); + this.firstIncidentTimeBefore = Optional.ofNullable(firstIncidentTimeBefore); return this; } @@ -374,7 +374,7 @@ public Builder includeMuted(Optional includeMuted) { } public Builder includeMuted(String includeMuted) { - this.includeMuted = Optional.of(includeMuted); + this.includeMuted = Optional.ofNullable(includeMuted); return this; } @@ -385,7 +385,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -396,7 +396,7 @@ public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAf } public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { - this.lastIncidentTimeAfter = Optional.of(lastIncidentTimeAfter); + this.lastIncidentTimeAfter = Optional.ofNullable(lastIncidentTimeAfter); return this; } @@ -407,7 +407,7 @@ public Builder lastIncidentTimeBefore(Optional lastIncidentTimeB } public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { - this.lastIncidentTimeBefore = Optional.of(lastIncidentTimeBefore); + this.lastIncidentTimeBefore = Optional.ofNullable(lastIncidentTimeBefore); return this; } @@ -418,7 +418,7 @@ public Builder linkedAccountId(Optional linkedAccountId) { } public Builder linkedAccountId(String linkedAccountId) { - this.linkedAccountId = Optional.of(linkedAccountId); + this.linkedAccountId = Optional.ofNullable(linkedAccountId); return this; } @@ -429,7 +429,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -440,7 +440,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -451,7 +451,7 @@ public Builder status(Optional status) { } public Builder status(IssuesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/items/ItemsClient.java b/src/main/java/com/merge/api/resources/accounting/items/ItemsClient.java index 32fa1bf6c..60c498963 100644 --- a/src/main/java/com/merge/api/resources/accounting/items/ItemsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/items/ItemsClient.java @@ -103,7 +103,8 @@ public PaginatedItemList list(ItemsListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -124,13 +125,6 @@ public PaginatedItemList list(ItemsListRequest request, RequestOptions requestOp } } - /** - * Returns an Item object with the given id. - */ - public Item retrieve(String id) { - return retrieve(id, ItemsRetrieveRequest.builder().build()); - } - /** * Returns an Item object with the given id. */ @@ -164,7 +158,8 @@ public Item retrieve(String id, ItemsRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsListRequest.java b/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsListRequest.java index e0410f2a0..8116647af 100644 --- a/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ItemsListRequest.Builder.class) public final class ItemsListRequest { private final Optional companyId; @@ -313,7 +313,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -324,7 +324,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -335,7 +335,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -346,7 +346,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -357,7 +357,7 @@ public Builder expand(Optional expand) { } public Builder expand(ItemsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -368,7 +368,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -379,7 +379,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -390,7 +390,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -401,7 +401,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -412,7 +412,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -423,7 +423,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -434,7 +434,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -445,7 +445,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -456,7 +456,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsRetrieveRequest.java index c43b2b550..f360d2a78 100644 --- a/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/items/requests/ItemsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ItemsRetrieveRequest.Builder.class) public final class ItemsRetrieveRequest { private final Optional expand; @@ -138,7 +138,7 @@ public Builder expand(Optional expand) { } public Builder expand(ItemsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -149,7 +149,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -160,7 +160,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -171,7 +171,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/journalentries/JournalEntriesClient.java b/src/main/java/com/merge/api/resources/accounting/journalentries/JournalEntriesClient.java index 0154702e2..43c777f4f 100644 --- a/src/main/java/com/merge/api/resources/accounting/journalentries/JournalEntriesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/journalentries/JournalEntriesClient.java @@ -121,7 +121,8 @@ public PaginatedJournalEntryList list(JournalEntriesListRequest request, Request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -176,7 +177,8 @@ public JournalEntryResponse create(JournalEntryEndpointRequest request, RequestO .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -197,13 +199,6 @@ public JournalEntryResponse create(JournalEntryEndpointRequest request, RequestO } } - /** - * Returns a JournalEntry object with the given id. - */ - public JournalEntry retrieve(String id) { - return retrieve(id, JournalEntriesRetrieveRequest.builder().build()); - } - /** * Returns a JournalEntry object with the given id. */ @@ -235,7 +230,8 @@ public JournalEntry retrieve(String id, JournalEntriesRetrieveRequest request, R .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -308,7 +304,8 @@ public PaginatedRemoteFieldClassList linesRemoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -349,6 +346,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -420,7 +418,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesLinesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesLinesRemoteFieldClassesListRequest.java index c896cc084..0a5e24567 100644 --- a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesLinesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesLinesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntriesLinesRemoteFieldClassesListRequest.Builder.class) public final class JournalEntriesLinesRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesListRequest.java b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesListRequest.java index a393c663b..c4302e359 100644 --- a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntriesListRequest.Builder.class) public final class JournalEntriesListRequest { private final Optional companyId; @@ -330,7 +330,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -341,7 +341,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -352,7 +352,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -363,7 +363,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -374,7 +374,7 @@ public Builder expand(Optional expand) { } public Builder expand(JournalEntriesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -385,7 +385,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -396,7 +396,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -407,7 +407,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -418,7 +418,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -429,7 +429,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -440,7 +440,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -451,7 +451,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -462,7 +462,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -473,7 +473,7 @@ public Builder transactionDateAfter(Optional transactionDateAfte } public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { - this.transactionDateAfter = Optional.of(transactionDateAfter); + this.transactionDateAfter = Optional.ofNullable(transactionDateAfter); return this; } @@ -484,7 +484,7 @@ public Builder transactionDateBefore(Optional transactionDateBef } public Builder transactionDateBefore(OffsetDateTime transactionDateBefore) { - this.transactionDateBefore = Optional.of(transactionDateBefore); + this.transactionDateBefore = Optional.ofNullable(transactionDateBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRemoteFieldClassesListRequest.java index abbb3a5d4..1f507ac36 100644 --- a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntriesRemoteFieldClassesListRequest.Builder.class) public final class JournalEntriesRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRetrieveRequest.java index 35e9901d1..f199d3218 100644 --- a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntriesRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntriesRetrieveRequest.Builder.class) public final class JournalEntriesRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(JournalEntriesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntryEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntryEndpointRequest.java index 5ac7c24fb..5ae3bb00b 100644 --- a/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntryEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/journalentries/requests/JournalEntryEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntryEndpointRequest.Builder.class) public final class JournalEntryEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(JournalEntryRequest model); + _FinalStage model(@NotNull JournalEntryRequest model); Builder from(JournalEntryEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(JournalEntryEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(JournalEntryRequest model) { + public _FinalStage model(@NotNull JournalEntryRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(JournalEntryRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/linkedaccounts/LinkedAccountsClient.java b/src/main/java/com/merge/api/resources/accounting/linkedaccounts/LinkedAccountsClient.java index e4585616b..54d76fa08 100644 --- a/src/main/java/com/merge/api/resources/accounting/linkedaccounts/LinkedAccountsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/linkedaccounts/LinkedAccountsClient.java @@ -98,7 +98,8 @@ public PaginatedAccountDetailsAndActionsList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/linkedaccounts/requests/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/resources/accounting/linkedaccounts/requests/LinkedAccountsListRequest.java index 03ed9f6b1..59f1643bb 100644 --- a/src/main/java/com/merge/api/resources/accounting/linkedaccounts/requests/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/linkedaccounts/requests/LinkedAccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountsListRequest.Builder.class) public final class LinkedAccountsListRequest { private final Optional category; @@ -301,7 +301,7 @@ public Builder category(Optional category) { } public Builder category(LinkedAccountsListRequestCategory category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -312,7 +312,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -323,7 +323,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -334,7 +334,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -345,7 +345,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -356,7 +356,7 @@ public Builder endUserOriginIds(Optional endUserOriginIds) { } public Builder endUserOriginIds(String endUserOriginIds) { - this.endUserOriginIds = Optional.of(endUserOriginIds); + this.endUserOriginIds = Optional.ofNullable(endUserOriginIds); return this; } @@ -367,7 +367,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -378,7 +378,7 @@ public Builder ids(Optional ids) { } public Builder ids(String ids) { - this.ids = Optional.of(ids); + this.ids = Optional.ofNullable(ids); return this; } @@ -389,7 +389,7 @@ public Builder includeDuplicates(Optional includeDuplicates) { } public Builder includeDuplicates(Boolean includeDuplicates) { - this.includeDuplicates = Optional.of(includeDuplicates); + this.includeDuplicates = Optional.ofNullable(includeDuplicates); return this; } @@ -400,7 +400,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -411,7 +411,7 @@ public Builder isTestAccount(Optional isTestAccount) { } public Builder isTestAccount(String isTestAccount) { - this.isTestAccount = Optional.of(isTestAccount); + this.isTestAccount = Optional.ofNullable(isTestAccount); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/linktoken/LinkTokenClient.java b/src/main/java/com/merge/api/resources/accounting/linktoken/LinkTokenClient.java index 912357957..c3a471517 100644 --- a/src/main/java/com/merge/api/resources/accounting/linktoken/LinkTokenClient.java +++ b/src/main/java/com/merge/api/resources/accounting/linktoken/LinkTokenClient.java @@ -55,6 +55,7 @@ public LinkToken create(EndUserDetailsRequest request, RequestOptions requestOpt .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/linktoken/requests/EndUserDetailsRequest.java b/src/main/java/com/merge/api/resources/accounting/linktoken/requests/EndUserDetailsRequest.java index c78f61e4c..3ea17e256 100644 --- a/src/main/java/com/merge/api/resources/accounting/linktoken/requests/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/linktoken/requests/EndUserDetailsRequest.java @@ -23,8 +23,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EndUserDetailsRequest.Builder.class) public final class EndUserDetailsRequest { private final String endUserEmailAddress; @@ -252,17 +253,17 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { - EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress); + EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { - EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName); + EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { - _FinalStage endUserOriginId(String endUserOriginId); + _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { @@ -373,7 +374,7 @@ public Builder from(EndUserDetailsRequest other) { */ @java.lang.Override @JsonSetter("end_user_email_address") - public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress) { + public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @@ -384,7 +385,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddre */ @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @@ -395,7 +396,7 @@ public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationNa */ @java.lang.Override @JsonSetter("end_user_origin_id") - public _FinalStage endUserOriginId(String endUserOriginId) { + public _FinalStage endUserOriginId(@NotNull String endUserOriginId) { this.endUserOriginId = endUserOriginId; return this; } @@ -406,7 +407,7 @@ public _FinalStage endUserOriginId(String endUserOriginId) { */ @java.lang.Override public _FinalStage integrationSpecificConfig(Map integrationSpecificConfig) { - this.integrationSpecificConfig = Optional.of(integrationSpecificConfig); + this.integrationSpecificConfig = Optional.ofNullable(integrationSpecificConfig); return this; } @@ -423,7 +424,7 @@ public _FinalStage integrationSpecificConfig(Optional> int */ @java.lang.Override public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { - this.areSyncsDisabled = Optional.of(areSyncsDisabled); + this.areSyncsDisabled = Optional.ofNullable(areSyncsDisabled); return this; } @@ -444,7 +445,7 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { */ @java.lang.Override public _FinalStage language(LanguageEnum language) { - this.language = Optional.of(language); + this.language = Optional.ofNullable(language); return this; } @@ -462,7 +463,7 @@ public _FinalStage language(Optional language) { @java.lang.Override public _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes) { - this.categoryCommonModelScopes = Optional.of(categoryCommonModelScopes); + this.categoryCommonModelScopes = Optional.ofNullable(categoryCommonModelScopes); return this; } @@ -481,7 +482,7 @@ public _FinalStage categoryCommonModelScopes( */ @java.lang.Override public _FinalStage commonModels(List commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -498,7 +499,7 @@ public _FinalStage commonModels(Optional> com */ @java.lang.Override public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { - this.hideAdminMagicLink = Optional.of(hideAdminMagicLink); + this.hideAdminMagicLink = Optional.ofNullable(hideAdminMagicLink); return this; } @@ -515,7 +516,7 @@ public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { */ @java.lang.Override public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { - this.shouldCreateMagicLinkUrl = Optional.of(shouldCreateMagicLinkUrl); + this.shouldCreateMagicLinkUrl = Optional.ofNullable(shouldCreateMagicLinkUrl); return this; } @@ -532,7 +533,7 @@ public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicL */ @java.lang.Override public _FinalStage linkExpiryMins(Integer linkExpiryMins) { - this.linkExpiryMins = Optional.of(linkExpiryMins); + this.linkExpiryMins = Optional.ofNullable(linkExpiryMins); return this; } @@ -549,7 +550,7 @@ public _FinalStage linkExpiryMins(Optional linkExpiryMins) { */ @java.lang.Override public _FinalStage integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/payments/PaymentsClient.java b/src/main/java/com/merge/api/resources/accounting/payments/PaymentsClient.java index 298559f3e..adf5be8fc 100644 --- a/src/main/java/com/merge/api/resources/accounting/payments/PaymentsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/payments/PaymentsClient.java @@ -128,7 +128,8 @@ public PaginatedPaymentList list(PaymentsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -183,7 +184,8 @@ public PaymentResponse create(PaymentEndpointRequest request, RequestOptions req .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -204,13 +206,6 @@ public PaymentResponse create(PaymentEndpointRequest request, RequestOptions req } } - /** - * Returns a Payment object with the given id. - */ - public Payment retrieve(String id) { - return retrieve(id, PaymentsRetrieveRequest.builder().build()); - } - /** * Returns a Payment object with the given id. */ @@ -242,7 +237,8 @@ public Payment retrieve(String id, PaymentsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -299,7 +295,8 @@ public PaymentResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -372,7 +369,8 @@ public PaginatedRemoteFieldClassList lineItemsRemoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -414,6 +412,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -454,6 +453,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -525,7 +525,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/payments/requests/PatchedPaymentEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/payments/requests/PatchedPaymentEndpointRequest.java index b1f33dbbd..403d3fc4b 100644 --- a/src/main/java/com/merge/api/resources/accounting/payments/requests/PatchedPaymentEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/payments/requests/PatchedPaymentEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedPaymentEndpointRequest.Builder.class) public final class PatchedPaymentEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PatchedPaymentRequest model); + _FinalStage model(@NotNull PatchedPaymentRequest model); Builder from(PatchedPaymentEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedPaymentEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PatchedPaymentRequest model) { + public _FinalStage model(@NotNull PatchedPaymentRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PatchedPaymentRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentEndpointRequest.java index c57d137bc..58e8dff53 100644 --- a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentEndpointRequest.Builder.class) public final class PaymentEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PaymentRequest model); + _FinalStage model(@NotNull PaymentRequest model); Builder from(PaymentEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PaymentEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PaymentRequest model) { + public _FinalStage model(@NotNull PaymentRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PaymentRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsLineItemsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsLineItemsRemoteFieldClassesListRequest.java index 1efc3f864..d3c1e15ff 100644 --- a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsLineItemsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsLineItemsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentsLineItemsRemoteFieldClassesListRequest.Builder.class) public final class PaymentsLineItemsRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsListRequest.java b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsListRequest.java index 078143bcc..1f42bf87d 100644 --- a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentsListRequest.Builder.class) public final class PaymentsListRequest { private final Optional accountId; @@ -364,7 +364,7 @@ public Builder accountId(Optional accountId) { } public Builder accountId(String accountId) { - this.accountId = Optional.of(accountId); + this.accountId = Optional.ofNullable(accountId); return this; } @@ -375,7 +375,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -386,7 +386,7 @@ public Builder contactId(Optional contactId) { } public Builder contactId(String contactId) { - this.contactId = Optional.of(contactId); + this.contactId = Optional.ofNullable(contactId); return this; } @@ -397,7 +397,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -408,7 +408,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -419,7 +419,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -430,7 +430,7 @@ public Builder expand(Optional expand) { } public Builder expand(PaymentsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -441,7 +441,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -452,7 +452,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -463,7 +463,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -474,7 +474,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -485,7 +485,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -496,7 +496,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -507,7 +507,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -518,7 +518,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -529,7 +529,7 @@ public Builder transactionDateAfter(Optional transactionDateAfte } public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { - this.transactionDateAfter = Optional.of(transactionDateAfter); + this.transactionDateAfter = Optional.ofNullable(transactionDateAfter); return this; } @@ -540,7 +540,7 @@ public Builder transactionDateBefore(Optional transactionDateBef } public Builder transactionDateBefore(OffsetDateTime transactionDateBefore) { - this.transactionDateBefore = Optional.of(transactionDateBefore); + this.transactionDateBefore = Optional.ofNullable(transactionDateBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRemoteFieldClassesListRequest.java index 835bcb6bc..3e459d42e 100644 --- a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentsRemoteFieldClassesListRequest.Builder.class) public final class PaymentsRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRetrieveRequest.java index f1b71d33f..15c7d8a85 100644 --- a/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/payments/requests/PaymentsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentsRetrieveRequest.Builder.class) public final class PaymentsRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(PaymentsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/phonenumbers/PhoneNumbersClient.java b/src/main/java/com/merge/api/resources/accounting/phonenumbers/PhoneNumbersClient.java index a75d196cd..0675b75bc 100644 --- a/src/main/java/com/merge/api/resources/accounting/phonenumbers/PhoneNumbersClient.java +++ b/src/main/java/com/merge/api/resources/accounting/phonenumbers/PhoneNumbersClient.java @@ -25,13 +25,6 @@ public PhoneNumbersClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - /** - * Returns an AccountingPhoneNumber object with the given id. - */ - public AccountingPhoneNumber retrieve(String id) { - return retrieve(id, PhoneNumbersRetrieveRequest.builder().build()); - } - /** * Returns an AccountingPhoneNumber object with the given id. */ @@ -56,7 +49,8 @@ public AccountingPhoneNumber retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/phonenumbers/requests/PhoneNumbersRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/phonenumbers/requests/PhoneNumbersRetrieveRequest.java index 028895e5f..11fb2e3ee 100644 --- a/src/main/java/com/merge/api/resources/accounting/phonenumbers/requests/PhoneNumbersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/phonenumbers/requests/PhoneNumbersRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PhoneNumbersRetrieveRequest.Builder.class) public final class PhoneNumbersRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/purchaseorders/PurchaseOrdersClient.java b/src/main/java/com/merge/api/resources/accounting/purchaseorders/PurchaseOrdersClient.java index 5a5af282b..6e1eab462 100644 --- a/src/main/java/com/merge/api/resources/accounting/purchaseorders/PurchaseOrdersClient.java +++ b/src/main/java/com/merge/api/resources/accounting/purchaseorders/PurchaseOrdersClient.java @@ -126,7 +126,8 @@ public PaginatedPurchaseOrderList list(PurchaseOrdersListRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -181,7 +182,8 @@ public PurchaseOrderResponse create(PurchaseOrderEndpointRequest request, Reques .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -202,13 +204,6 @@ public PurchaseOrderResponse create(PurchaseOrderEndpointRequest request, Reques } } - /** - * Returns a PurchaseOrder object with the given id. - */ - public PurchaseOrder retrieve(String id) { - return retrieve(id, PurchaseOrdersRetrieveRequest.builder().build()); - } - /** * Returns a PurchaseOrder object with the given id. */ @@ -247,7 +242,8 @@ public PurchaseOrder retrieve(String id, PurchaseOrdersRetrieveRequest request, .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -320,7 +316,8 @@ public PaginatedRemoteFieldClassList lineItemsRemoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -361,6 +358,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -432,7 +430,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrderEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrderEndpointRequest.java index df5a96ae0..10ccab50c 100644 --- a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrderEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrderEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrderEndpointRequest.Builder.class) public final class PurchaseOrderEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PurchaseOrderRequest model); + _FinalStage model(@NotNull PurchaseOrderRequest model); Builder from(PurchaseOrderEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PurchaseOrderEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PurchaseOrderRequest model) { + public _FinalStage model(@NotNull PurchaseOrderRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PurchaseOrderRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java index 9e4d8ffae..dd73ab68d 100644 --- a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersLineItemsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrdersLineItemsRemoteFieldClassesListRequest.Builder.class) public final class PurchaseOrdersLineItemsRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersListRequest.java b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersListRequest.java index afc33754b..9d12d1884 100644 --- a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrdersListRequest.Builder.class) public final class PurchaseOrdersListRequest { private final Optional companyId; @@ -364,7 +364,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -375,7 +375,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -386,7 +386,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -397,7 +397,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -408,7 +408,7 @@ public Builder expand(Optional expand) { } public Builder expand(PurchaseOrdersListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -419,7 +419,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -430,7 +430,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -441,7 +441,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -452,7 +452,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -463,7 +463,7 @@ public Builder issueDateAfter(Optional issueDateAfter) { } public Builder issueDateAfter(OffsetDateTime issueDateAfter) { - this.issueDateAfter = Optional.of(issueDateAfter); + this.issueDateAfter = Optional.ofNullable(issueDateAfter); return this; } @@ -474,7 +474,7 @@ public Builder issueDateBefore(Optional issueDateBefore) { } public Builder issueDateBefore(OffsetDateTime issueDateBefore) { - this.issueDateBefore = Optional.of(issueDateBefore); + this.issueDateBefore = Optional.ofNullable(issueDateBefore); return this; } @@ -485,7 +485,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -496,7 +496,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -507,7 +507,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -518,7 +518,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -529,7 +529,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -540,7 +540,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRemoteFieldClassesListRequest.java index 8c7bf7c4b..e5dae09b9 100644 --- a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrdersRemoteFieldClassesListRequest.Builder.class) public final class PurchaseOrdersRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRetrieveRequest.java index e6d9bb48d..30e23e69c 100644 --- a/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/purchaseorders/requests/PurchaseOrdersRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrdersRetrieveRequest.Builder.class) public final class PurchaseOrdersRetrieveRequest { private final Optional expand; @@ -155,7 +155,7 @@ public Builder expand(Optional expand) { } public Builder expand(PurchaseOrdersRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -166,7 +166,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -177,7 +177,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -188,7 +188,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -199,7 +199,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/regeneratekey/RegenerateKeyClient.java b/src/main/java/com/merge/api/resources/accounting/regeneratekey/RegenerateKeyClient.java index c49dc968c..f599650e1 100644 --- a/src/main/java/com/merge/api/resources/accounting/regeneratekey/RegenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/accounting/regeneratekey/RegenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(RemoteKeyForRegenerationRequest request, RequestOptions .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/regeneratekey/requests/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/resources/accounting/regeneratekey/requests/RemoteKeyForRegenerationRequest.java index 1b6c8d72f..18851bdcb 100644 --- a/src/main/java/com/merge/api/resources/accounting/regeneratekey/requests/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/regeneratekey/requests/RemoteKeyForRegenerationRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKeyForRegenerationRequest.Builder.class) public final class RemoteKeyForRegenerationRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); } @@ -95,7 +96,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/scopes/ScopesClient.java b/src/main/java/com/merge/api/resources/accounting/scopes/ScopesClient.java index 7f77d91e1..7d46051ff 100644 --- a/src/main/java/com/merge/api/resources/accounting/scopes/ScopesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/scopes/ScopesClient.java @@ -48,6 +48,7 @@ public CommonModelScopeApi defaultScopesRetrieve(RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -88,6 +89,7 @@ public CommonModelScopeApi linkedAccountScopesRetrieve(RequestOptions requestOpt .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -136,6 +138,7 @@ public CommonModelScopeApi linkedAccountScopesCreate( .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/accounting/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java index 37e3a805a..6be494618 100644 --- a/src/main/java/com/merge/api/resources/accounting/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountCommonModelScopeDeserializerRequest.Builder.class) public final class LinkedAccountCommonModelScopeDeserializerRequest { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/accounting/syncstatus/SyncStatusClient.java b/src/main/java/com/merge/api/resources/accounting/syncstatus/SyncStatusClient.java index 6b9d8439c..e7c72bf3c 100644 --- a/src/main/java/com/merge/api/resources/accounting/syncstatus/SyncStatusClient.java +++ b/src/main/java/com/merge/api/resources/accounting/syncstatus/SyncStatusClient.java @@ -56,7 +56,8 @@ public PaginatedSyncStatusList list(SyncStatusListRequest request, RequestOption .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/syncstatus/requests/SyncStatusListRequest.java b/src/main/java/com/merge/api/resources/accounting/syncstatus/requests/SyncStatusListRequest.java index d0f81c35c..3e50894d8 100644 --- a/src/main/java/com/merge/api/resources/accounting/syncstatus/requests/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/syncstatus/requests/SyncStatusListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatusListRequest.Builder.class) public final class SyncStatusListRequest { private final Optional cursor; @@ -102,7 +102,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -113,7 +113,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/taxrates/TaxRatesClient.java b/src/main/java/com/merge/api/resources/accounting/taxrates/TaxRatesClient.java index de3fcdc62..1889b103e 100644 --- a/src/main/java/com/merge/api/resources/accounting/taxrates/TaxRatesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/taxrates/TaxRatesClient.java @@ -96,7 +96,8 @@ public PaginatedTaxRateList list(TaxRatesListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedTaxRateList list(TaxRatesListRequest request, RequestOptions req } } - /** - * Returns a TaxRate object with the given id. - */ - public TaxRate retrieve(String id) { - return retrieve(id, TaxRatesRetrieveRequest.builder().build()); - } - /** * Returns a TaxRate object with the given id. */ @@ -150,7 +144,8 @@ public TaxRate retrieve(String id, TaxRatesRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesListRequest.java b/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesListRequest.java index 9a131a3f3..4fd846e4b 100644 --- a/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TaxRatesListRequest.Builder.class) public final class TaxRatesListRequest { private final Optional companyId; @@ -278,7 +278,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -289,7 +289,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -300,7 +300,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -311,7 +311,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -322,7 +322,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -333,7 +333,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -344,7 +344,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -355,7 +355,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesRetrieveRequest.java index 63fed2710..f5c825ed7 100644 --- a/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/taxrates/requests/TaxRatesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TaxRatesRetrieveRequest.Builder.class) public final class TaxRatesRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/trackingcategories/TrackingCategoriesClient.java b/src/main/java/com/merge/api/resources/accounting/trackingcategories/TrackingCategoriesClient.java index f95ccd4c9..883a77152 100644 --- a/src/main/java/com/merge/api/resources/accounting/trackingcategories/TrackingCategoriesClient.java +++ b/src/main/java/com/merge/api/resources/accounting/trackingcategories/TrackingCategoriesClient.java @@ -103,7 +103,8 @@ public PaginatedTrackingCategoryList list(TrackingCategoriesListRequest request, .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -124,13 +125,6 @@ public PaginatedTrackingCategoryList list(TrackingCategoriesListRequest request, } } - /** - * Returns a TrackingCategory object with the given id. - */ - public TrackingCategory retrieve(String id) { - return retrieve(id, TrackingCategoriesRetrieveRequest.builder().build()); - } - /** * Returns a TrackingCategory object with the given id. */ @@ -165,7 +159,8 @@ public TrackingCategory retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesListRequest.java b/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesListRequest.java index 18e71d4f3..310b4dd81 100644 --- a/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TrackingCategoriesListRequest.Builder.class) public final class TrackingCategoriesListRequest { private final Optional companyId; @@ -312,7 +312,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -323,7 +323,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -334,7 +334,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -345,7 +345,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -356,7 +356,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -367,7 +367,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -378,7 +378,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -389,7 +389,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -400,7 +400,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -411,7 +411,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -444,7 +444,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -455,7 +455,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesRetrieveRequest.java index 1668f7fae..6f6f9a372 100644 --- a/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/trackingcategories/requests/TrackingCategoriesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TrackingCategoriesRetrieveRequest.Builder.class) public final class TrackingCategoriesRetrieveRequest { private final Optional expand; @@ -137,7 +137,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -148,7 +148,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -159,7 +159,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -170,7 +170,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/transactions/TransactionsClient.java b/src/main/java/com/merge/api/resources/accounting/transactions/TransactionsClient.java index ac8085abb..897c0337f 100644 --- a/src/main/java/com/merge/api/resources/accounting/transactions/TransactionsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/transactions/TransactionsClient.java @@ -106,7 +106,8 @@ public PaginatedTransactionList list(TransactionsListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -127,13 +128,6 @@ public PaginatedTransactionList list(TransactionsListRequest request, RequestOpt } } - /** - * Returns a Transaction object with the given id. - */ - public Transaction retrieve(String id) { - return retrieve(id, TransactionsRetrieveRequest.builder().build()); - } - /** * Returns a Transaction object with the given id. */ @@ -160,7 +154,8 @@ public Transaction retrieve(String id, TransactionsRetrieveRequest request, Requ .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsListRequest.java b/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsListRequest.java index cbb586184..a831163d3 100644 --- a/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TransactionsListRequest.Builder.class) public final class TransactionsListRequest { private final Optional companyId; @@ -313,7 +313,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -324,7 +324,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -335,7 +335,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -346,7 +346,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -357,7 +357,7 @@ public Builder expand(Optional expand) { } public Builder expand(TransactionsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -368,7 +368,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -379,7 +379,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -390,7 +390,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -401,7 +401,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -412,7 +412,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -423,7 +423,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -434,7 +434,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -445,7 +445,7 @@ public Builder transactionDateAfter(Optional transactionDateAfte } public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { - this.transactionDateAfter = Optional.of(transactionDateAfter); + this.transactionDateAfter = Optional.ofNullable(transactionDateAfter); return this; } @@ -456,7 +456,7 @@ public Builder transactionDateBefore(Optional transactionDateBef } public Builder transactionDateBefore(OffsetDateTime transactionDateBefore) { - this.transactionDateBefore = Optional.of(transactionDateBefore); + this.transactionDateBefore = Optional.ofNullable(transactionDateBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsRetrieveRequest.java index d9141b06b..6d14b2dc4 100644 --- a/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/transactions/requests/TransactionsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TransactionsRetrieveRequest.Builder.class) public final class TransactionsRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(TransactionsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Account.java b/src/main/java/com/merge/api/resources/accounting/types/Account.java index ebc2c1b00..cdf071ea9 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Account.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Account.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Account.Builder.class) public final class Account { private final Optional id; @@ -708,7 +708,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -719,7 +719,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -730,7 +730,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -741,7 +741,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -752,7 +752,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -763,7 +763,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -774,7 +774,7 @@ public Builder classification(Optional classification) { } public Builder classification(AccountClassification classification) { - this.classification = Optional.of(classification); + this.classification = Optional.ofNullable(classification); return this; } @@ -785,7 +785,7 @@ public Builder type(Optional type) { } public Builder type(String type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -796,7 +796,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(AccountAccountType accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -807,7 +807,7 @@ public Builder status(Optional status) { } public Builder status(AccountStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -818,7 +818,7 @@ public Builder currentBalance(Optional currentBalance) { } public Builder currentBalance(Double currentBalance) { - this.currentBalance = Optional.of(currentBalance); + this.currentBalance = Optional.ofNullable(currentBalance); return this; } @@ -829,7 +829,7 @@ public Builder currency(Optional currency) { } public Builder currency(AccountCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -840,7 +840,7 @@ public Builder accountNumber(Optional accountNumber) { } public Builder accountNumber(String accountNumber) { - this.accountNumber = Optional.of(accountNumber); + this.accountNumber = Optional.ofNullable(accountNumber); return this; } @@ -851,7 +851,7 @@ public Builder parentAccount(Optional parentAccount) { } public Builder parentAccount(String parentAccount) { - this.parentAccount = Optional.of(parentAccount); + this.parentAccount = Optional.ofNullable(parentAccount); return this; } @@ -862,7 +862,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -873,7 +873,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -884,7 +884,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -895,7 +895,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountDetails.java b/src/main/java/com/merge/api/resources/accounting/types/AccountDetails.java index 78c491ea6..fc18ae146 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountDetails.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountDetails.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetails.Builder.class) public final class AccountDetails { private final Optional id; @@ -248,7 +248,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -259,7 +259,7 @@ public Builder integration(Optional integration) { } public Builder integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -270,7 +270,7 @@ public Builder integrationSlug(Optional integrationSlug) { } public Builder integrationSlug(String integrationSlug) { - this.integrationSlug = Optional.of(integrationSlug); + this.integrationSlug = Optional.ofNullable(integrationSlug); return this; } @@ -281,7 +281,7 @@ public Builder category(Optional category) { } public Builder category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -292,7 +292,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -303,7 +303,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -314,7 +314,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -325,7 +325,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -336,7 +336,7 @@ public Builder webhookListenerUrl(Optional webhookListenerUrl) { } public Builder webhookListenerUrl(String webhookListenerUrl) { - this.webhookListenerUrl = Optional.of(webhookListenerUrl); + this.webhookListenerUrl = Optional.ofNullable(webhookListenerUrl); return this; } @@ -347,7 +347,7 @@ public Builder isDuplicate(Optional isDuplicate) { } public Builder isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -358,7 +358,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(String accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -369,7 +369,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActions.java index b2a832d24..4cf951ea6 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActions.Builder.class) public final class AccountDetailsAndActions { private final String id; @@ -206,33 +207,33 @@ public static IdStage builder() { } public interface IdStage { - StatusStage id(String id); + StatusStage id(@NotNull String id); Builder from(AccountDetailsAndActions other); } public interface StatusStage { - EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); } public interface EndUserOrganizationNameStage { - EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName); + EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserEmailAddressStage { - WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress); + WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress); } public interface WebhookListenerUrlStage { - AccountTypeStage webhookListenerUrl(String webhookListenerUrl); + AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl); } public interface AccountTypeStage { - CompletedAtStage accountType(String accountType); + CompletedAtStage accountType(@NotNull String accountType); } public interface CompletedAtStage { - _FinalStage completedAt(OffsetDateTime completedAt); + _FinalStage completedAt(@NotNull OffsetDateTime completedAt); } public interface _FinalStage { @@ -324,56 +325,56 @@ public Builder from(AccountDetailsAndActions other) { @java.lang.Override @JsonSetter("id") - public StatusStage id(String id) { + public StatusStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { this.status = status; return this; } @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @java.lang.Override @JsonSetter("end_user_email_address") - public WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress) { + public WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @java.lang.Override @JsonSetter("webhook_listener_url") - public AccountTypeStage webhookListenerUrl(String webhookListenerUrl) { + public AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl) { this.webhookListenerUrl = webhookListenerUrl; return this; } @java.lang.Override @JsonSetter("account_type") - public CompletedAtStage accountType(String accountType) { + public CompletedAtStage accountType(@NotNull String accountType) { this.accountType = accountType; return this; } @java.lang.Override @JsonSetter("completed_at") - public _FinalStage completedAt(OffsetDateTime completedAt) { + public _FinalStage completedAt(@NotNull OffsetDateTime completedAt) { this.completedAt = completedAt; return this; } @java.lang.Override public _FinalStage integration(AccountDetailsAndActionsIntegration integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -390,7 +391,7 @@ public _FinalStage integration(Optional int */ @java.lang.Override public _FinalStage isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -407,7 +408,7 @@ public _FinalStage isDuplicate(Optional isDuplicate) { */ @java.lang.Override public _FinalStage subdomain(String subdomain) { - this.subdomain = Optional.of(subdomain); + this.subdomain = Optional.ofNullable(subdomain); return this; } @@ -420,7 +421,7 @@ public _FinalStage subdomain(Optional subdomain) { @java.lang.Override public _FinalStage endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -433,7 +434,7 @@ public _FinalStage endUserOriginId(Optional endUserOriginId) { @java.lang.Override public _FinalStage statusDetail(String statusDetail) { - this.statusDetail = Optional.of(statusDetail); + this.statusDetail = Optional.ofNullable(statusDetail); return this; } @@ -446,7 +447,7 @@ public _FinalStage statusDetail(Optional statusDetail) { @java.lang.Override public _FinalStage category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActionsIntegration.java b/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActionsIntegration.java index ac4dafb7b..736e7164a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActionsIntegration.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountDetailsAndActionsIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActionsIntegration.Builder.class) public final class AccountDetailsAndActionsIntegration { private final String name; @@ -147,17 +148,17 @@ public static NameStage builder() { } public interface NameStage { - ColorStage name(String name); + ColorStage name(@NotNull String name); Builder from(AccountDetailsAndActionsIntegration other); } public interface ColorStage { - SlugStage color(String color); + SlugStage color(@NotNull String color); } public interface SlugStage { - PassthroughAvailableStage slug(String slug); + PassthroughAvailableStage slug(@NotNull String slug); } public interface PassthroughAvailableStage { @@ -225,21 +226,21 @@ public Builder from(AccountDetailsAndActionsIntegration other) { @java.lang.Override @JsonSetter("name") - public ColorStage name(String name) { + public ColorStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("color") - public SlugStage color(String color) { + public SlugStage color(@NotNull String color) { this.color = color; return this; } @java.lang.Override @JsonSetter("slug") - public PassthroughAvailableStage slug(String slug) { + public PassthroughAvailableStage slug(@NotNull String slug) { this.slug = slug; return this; } @@ -253,7 +254,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } @@ -266,7 +267,7 @@ public _FinalStage availableModelOperations(Optional> avail @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -279,7 +280,7 @@ public _FinalStage squareImage(Optional squareImage) { @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountIntegration.java b/src/main/java/com/merge/api/resources/accounting/types/AccountIntegration.java index bf5f1888d..b76e4767e 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountIntegration.Builder.class) public final class AccountIntegration { private final String name; @@ -195,7 +196,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); } @@ -288,7 +289,7 @@ public Builder from(AccountIntegration other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } @@ -299,7 +300,7 @@ public _FinalStage name(String name) { */ @java.lang.Override public _FinalStage categoryBetaStatus(Map categoryBetaStatus) { - this.categoryBetaStatus = Optional.of(categoryBetaStatus); + this.categoryBetaStatus = Optional.ofNullable(categoryBetaStatus); return this; } @@ -316,7 +317,7 @@ public _FinalStage categoryBetaStatus(Optional> categoryBe */ @java.lang.Override public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { - this.webhookSetupGuideUrl = Optional.of(webhookSetupGuideUrl); + this.webhookSetupGuideUrl = Optional.ofNullable(webhookSetupGuideUrl); return this; } @@ -333,7 +334,7 @@ public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { */ @java.lang.Override public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls) { - this.apiEndpointsToDocumentationUrls = Optional.of(apiEndpointsToDocumentationUrls); + this.apiEndpointsToDocumentationUrls = Optional.ofNullable(apiEndpointsToDocumentationUrls); return this; } @@ -347,7 +348,7 @@ public _FinalStage apiEndpointsToDocumentationUrls( @java.lang.Override public _FinalStage slug(String slug) { - this.slug = Optional.of(slug); + this.slug = Optional.ofNullable(slug); return this; } @@ -364,7 +365,7 @@ public _FinalStage slug(Optional slug) { */ @java.lang.Override public _FinalStage color(String color) { - this.color = Optional.of(color); + this.color = Optional.ofNullable(color); return this; } @@ -381,7 +382,7 @@ public _FinalStage color(Optional color) { */ @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -398,7 +399,7 @@ public _FinalStage squareImage(Optional squareImage) { */ @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } @@ -415,7 +416,7 @@ public _FinalStage image(Optional image) { */ @java.lang.Override public _FinalStage categories(List categories) { - this.categories = Optional.of(categories); + this.categories = Optional.ofNullable(categories); return this; } @@ -432,7 +433,7 @@ public _FinalStage categories(Optional> categories) { */ @java.lang.Override public _FinalStage abbreviatedName(String abbreviatedName) { - this.abbreviatedName = Optional.of(abbreviatedName); + this.abbreviatedName = Optional.ofNullable(abbreviatedName); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountRequest.java b/src/main/java/com/merge/api/resources/accounting/types/AccountRequest.java index 2039eaac0..bc6dacbad 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountRequest.Builder.class) public final class AccountRequest { private final Optional name; @@ -624,7 +624,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -635,7 +635,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -646,7 +646,7 @@ public Builder classification(Optional classificat } public Builder classification(AccountRequestClassification classification) { - this.classification = Optional.of(classification); + this.classification = Optional.ofNullable(classification); return this; } @@ -657,7 +657,7 @@ public Builder type(Optional type) { } public Builder type(String type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -668,7 +668,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(AccountRequestAccountType accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -679,7 +679,7 @@ public Builder status(Optional status) { } public Builder status(AccountRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -690,7 +690,7 @@ public Builder currentBalance(Optional currentBalance) { } public Builder currentBalance(Double currentBalance) { - this.currentBalance = Optional.of(currentBalance); + this.currentBalance = Optional.ofNullable(currentBalance); return this; } @@ -701,7 +701,7 @@ public Builder currency(Optional currency) { } public Builder currency(AccountRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -712,7 +712,7 @@ public Builder accountNumber(Optional accountNumber) { } public Builder accountNumber(String accountNumber) { - this.accountNumber = Optional.of(accountNumber); + this.accountNumber = Optional.ofNullable(accountNumber); return this; } @@ -723,7 +723,7 @@ public Builder parentAccount(Optional parentAccount) { } public Builder parentAccount(String parentAccount) { - this.parentAccount = Optional.of(parentAccount); + this.parentAccount = Optional.ofNullable(parentAccount); return this; } @@ -734,7 +734,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -745,7 +745,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -756,7 +756,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountResponse.java b/src/main/java/com/merge/api/resources/accounting/types/AccountResponse.java index 50299c4ec..d40151455 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountResponse.Builder.class) public final class AccountResponse { private final Account model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Account model); + _FinalStage model(@NotNull Account model); Builder from(AccountResponse other); } @@ -149,14 +150,14 @@ public Builder from(AccountResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Account model) { + public _FinalStage model(@NotNull Account model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountToken.java b/src/main/java/com/merge/api/resources/accounting/types/AccountToken.java index 1af9ebe80..08643227f 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountToken.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountToken.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountToken.Builder.class) public final class AccountToken { private final String accountToken; @@ -71,13 +72,13 @@ public static AccountTokenStage builder() { } public interface AccountTokenStage { - IntegrationStage accountToken(String accountToken); + IntegrationStage accountToken(@NotNull String accountToken); Builder from(AccountToken other); } public interface IntegrationStage { - _FinalStage integration(AccountIntegration integration); + _FinalStage integration(@NotNull AccountIntegration integration); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(AccountToken other) { @java.lang.Override @JsonSetter("account_token") - public IntegrationStage accountToken(String accountToken) { + public IntegrationStage accountToken(@NotNull String accountToken) { this.accountToken = accountToken; return this; } @java.lang.Override @JsonSetter("integration") - public _FinalStage integration(AccountIntegration integration) { + public _FinalStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachment.java b/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachment.java index 593a1ee9c..f76aa5c03 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachment.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachment.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingAttachment.Builder.class) public final class AccountingAttachment { private final Optional id; @@ -237,7 +237,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -248,7 +248,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -259,7 +259,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -270,7 +270,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -281,7 +281,7 @@ public Builder fileName(Optional fileName) { } public Builder fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -292,7 +292,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -303,7 +303,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -314,7 +314,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -325,7 +325,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -336,7 +336,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentRequest.java b/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentRequest.java index de52b7711..bc61fcd61 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingAttachmentRequest.Builder.class) public final class AccountingAttachmentRequest { private final Optional fileName; @@ -149,7 +149,7 @@ public Builder fileName(Optional fileName) { } public Builder fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -160,7 +160,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -171,7 +171,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -182,7 +182,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -193,7 +193,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentResponse.java b/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentResponse.java index f18889d32..3e506f143 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountingAttachmentResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingAttachmentResponse.Builder.class) public final class AccountingAttachmentResponse { private final AccountingAttachment model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(AccountingAttachment model); + _FinalStage model(@NotNull AccountingAttachment model); Builder from(AccountingAttachmentResponse other); } @@ -149,14 +150,14 @@ public Builder from(AccountingAttachmentResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(AccountingAttachment model) { + public _FinalStage model(@NotNull AccountingAttachment model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountingPeriod.java b/src/main/java/com/merge/api/resources/accounting/types/AccountingPeriod.java index d10e0f314..238313681 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountingPeriod.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountingPeriod.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingPeriod.Builder.class) public final class AccountingPeriod { private final Optional id; @@ -234,7 +234,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -245,7 +245,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -256,7 +256,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -267,7 +267,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -278,7 +278,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -289,7 +289,7 @@ public Builder status(Optional status) { } public Builder status(AccountingPeriodStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -300,7 +300,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(OffsetDateTime startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -311,7 +311,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(OffsetDateTime endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -322,7 +322,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -333,7 +333,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumber.java b/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumber.java index a68788aa9..43783e8f0 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumber.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumber.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingPhoneNumber.Builder.class) public final class AccountingPhoneNumber { private final Optional createdAt; @@ -138,7 +138,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -149,7 +149,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -160,7 +160,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -171,7 +171,7 @@ public Builder type(Optional type) { } public Builder type(String type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumberRequest.java b/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumberRequest.java index 9da2982fd..a1f4efc06 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumberRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AccountingPhoneNumberRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountingPhoneNumberRequest.Builder.class) public final class AccountingPhoneNumberRequest { private final Optional number; @@ -132,7 +132,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -143,7 +143,7 @@ public Builder type(Optional type) { } public Builder type(String type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -154,7 +154,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -165,7 +165,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Address.java b/src/main/java/com/merge/api/resources/accounting/types/Address.java index 3650681c8..f13b182ae 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Address.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Address.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Address.Builder.class) public final class Address { private final Optional createdAt; @@ -497,7 +497,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -508,7 +508,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -519,7 +519,7 @@ public Builder type(Optional type) { } public Builder type(AddressType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -530,7 +530,7 @@ public Builder street1(Optional street1) { } public Builder street1(String street1) { - this.street1 = Optional.of(street1); + this.street1 = Optional.ofNullable(street1); return this; } @@ -541,7 +541,7 @@ public Builder street2(Optional street2) { } public Builder street2(String street2) { - this.street2 = Optional.of(street2); + this.street2 = Optional.ofNullable(street2); return this; } @@ -552,7 +552,7 @@ public Builder city(Optional city) { } public Builder city(String city) { - this.city = Optional.of(city); + this.city = Optional.ofNullable(city); return this; } @@ -563,7 +563,7 @@ public Builder state(Optional state) { } public Builder state(JsonNode state) { - this.state = Optional.of(state); + this.state = Optional.ofNullable(state); return this; } @@ -574,7 +574,7 @@ public Builder countrySubdivision(Optional countrySubdivision) { } public Builder countrySubdivision(String countrySubdivision) { - this.countrySubdivision = Optional.of(countrySubdivision); + this.countrySubdivision = Optional.ofNullable(countrySubdivision); return this; } @@ -585,7 +585,7 @@ public Builder country(Optional country) { } public Builder country(AddressCountry country) { - this.country = Optional.of(country); + this.country = Optional.ofNullable(country); return this; } @@ -596,7 +596,7 @@ public Builder zipCode(Optional zipCode) { } public Builder zipCode(String zipCode) { - this.zipCode = Optional.of(zipCode); + this.zipCode = Optional.ofNullable(zipCode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AddressRequest.java b/src/main/java/com/merge/api/resources/accounting/types/AddressRequest.java index 279239aa0..66dbb21f1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AddressRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AddressRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AddressRequest.Builder.class) public final class AddressRequest { private final Optional type; @@ -476,7 +476,7 @@ public Builder type(Optional type) { } public Builder type(AddressRequestType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -487,7 +487,7 @@ public Builder street1(Optional street1) { } public Builder street1(String street1) { - this.street1 = Optional.of(street1); + this.street1 = Optional.ofNullable(street1); return this; } @@ -498,7 +498,7 @@ public Builder street2(Optional street2) { } public Builder street2(String street2) { - this.street2 = Optional.of(street2); + this.street2 = Optional.ofNullable(street2); return this; } @@ -509,7 +509,7 @@ public Builder city(Optional city) { } public Builder city(String city) { - this.city = Optional.of(city); + this.city = Optional.ofNullable(city); return this; } @@ -520,7 +520,7 @@ public Builder countrySubdivision(Optional countrySubdivision) { } public Builder countrySubdivision(String countrySubdivision) { - this.countrySubdivision = Optional.of(countrySubdivision); + this.countrySubdivision = Optional.ofNullable(countrySubdivision); return this; } @@ -531,7 +531,7 @@ public Builder country(Optional country) { } public Builder country(AddressRequestCountry country) { - this.country = Optional.of(country); + this.country = Optional.ofNullable(country); return this; } @@ -542,7 +542,7 @@ public Builder zipCode(Optional zipCode) { } public Builder zipCode(String zipCode) { - this.zipCode = Optional.of(zipCode); + this.zipCode = Optional.ofNullable(zipCode); return this; } @@ -553,7 +553,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -564,7 +564,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AdvancedMetadata.java b/src/main/java/com/merge/api/resources/accounting/types/AdvancedMetadata.java index bced99ae3..f38530735 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AdvancedMetadata.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AdvancedMetadata.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AdvancedMetadata.Builder.class) public final class AdvancedMetadata { private final String id; @@ -119,7 +120,7 @@ public static IdStage builder() { } public interface IdStage { - _FinalStage id(String id); + _FinalStage id(@NotNull String id); Builder from(AdvancedMetadata other); } @@ -180,14 +181,14 @@ public Builder from(AdvancedMetadata other) { @java.lang.Override @JsonSetter("id") - public _FinalStage id(String id) { + public _FinalStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override public _FinalStage fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -200,7 +201,7 @@ public _FinalStage fieldChoices(Optional> fieldChoices) { @java.lang.Override public _FinalStage isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -213,7 +214,7 @@ public _FinalStage isCustom(Optional isCustom) { @java.lang.Override public _FinalStage isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -226,7 +227,7 @@ public _FinalStage isRequired(Optional isRequired) { @java.lang.Override public _FinalStage description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -239,7 +240,7 @@ public _FinalStage description(Optional description) { @java.lang.Override public _FinalStage displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AsyncPassthroughReciept.java b/src/main/java/com/merge/api/resources/accounting/types/AsyncPassthroughReciept.java index fd0e1b482..6ef56c833 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AsyncPassthroughReciept.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AsyncPassthroughReciept.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPassthroughReciept.Builder.class) public final class AsyncPassthroughReciept { private final String asyncPassthroughReceiptId; @@ -62,7 +63,7 @@ public static AsyncPassthroughReceiptIdStage builder() { } public interface AsyncPassthroughReceiptIdStage { - _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId); + _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId); Builder from(AsyncPassthroughReciept other); } @@ -88,7 +89,7 @@ public Builder from(AsyncPassthroughReciept other) { @java.lang.Override @JsonSetter("async_passthrough_receipt_id") - public _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId) { + public _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId) { this.asyncPassthroughReceiptId = asyncPassthroughReceiptId; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTask.java b/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTask.java index dcb156f91..ee1917812 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTask.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTask.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPostTask.Builder.class) public final class AsyncPostTask { private final AsyncPostTaskStatus status; @@ -71,13 +72,13 @@ public static StatusStage builder() { } public interface StatusStage { - ResultStage status(AsyncPostTaskStatus status); + ResultStage status(@NotNull AsyncPostTaskStatus status); Builder from(AsyncPostTask other); } public interface ResultStage { - _FinalStage result(AsyncPostTaskResult result); + _FinalStage result(@NotNull AsyncPostTaskResult result); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(AsyncPostTask other) { @java.lang.Override @JsonSetter("status") - public ResultStage status(AsyncPostTaskStatus status) { + public ResultStage status(@NotNull AsyncPostTaskStatus status) { this.status = status; return this; } @java.lang.Override @JsonSetter("result") - public _FinalStage result(AsyncPostTaskResult result) { + public _FinalStage result(@NotNull AsyncPostTaskResult result) { this.result = result; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTaskResult.java b/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTaskResult.java index a9ae3ed51..b3ba60d99 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTaskResult.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AsyncPostTaskResult.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPostTaskResult.Builder.class) public final class AsyncPostTaskResult { private final Optional statusCode; @@ -99,7 +99,7 @@ public Builder statusCode(Optional statusCode) { } public Builder statusCode(Integer statusCode) { - this.statusCode = Optional.of(statusCode); + this.statusCode = Optional.ofNullable(statusCode); return this; } @@ -110,7 +110,7 @@ public Builder response(Optional> response) { } public Builder response(Map response) { - this.response = Optional.of(response); + this.response = Optional.ofNullable(response); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AuditLogEvent.java b/src/main/java/com/merge/api/resources/accounting/types/AuditLogEvent.java index 13d8a32cd..d0980b0d4 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AuditLogEvent.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditLogEvent.Builder.class) public final class AuditLogEvent { private final Optional id; @@ -208,21 +209,21 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(AuditLogEventRole role); + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } public interface IpAddressStage { - EventTypeStage ipAddress(String ipAddress); + EventTypeStage ipAddress(@NotNull String ipAddress); } public interface EventTypeStage { - EventDescriptionStage eventType(AuditLogEventEventType eventType); + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { - _FinalStage eventDescription(String eventDescription); + _FinalStage eventDescription(@NotNull String eventDescription); } public interface _FinalStage { @@ -296,14 +297,14 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(AuditLogEventRole role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @java.lang.Override @JsonSetter("ip_address") - public EventTypeStage ipAddress(String ipAddress) { + public EventTypeStage ipAddress(@NotNull String ipAddress) { this.ipAddress = ipAddress; return this; } @@ -357,21 +358,21 @@ public EventTypeStage ipAddress(String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(AuditLogEventEventType eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @java.lang.Override @JsonSetter("event_description") - public _FinalStage eventDescription(String eventDescription) { + public _FinalStage eventDescription(@NotNull String eventDescription) { this.eventDescription = eventDescription; return this; } @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -388,7 +389,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } @@ -405,7 +406,7 @@ public _FinalStage userEmail(Optional userEmail) { */ @java.lang.Override public _FinalStage userName(String userName) { - this.userName = Optional.of(userName); + this.userName = Optional.ofNullable(userName); return this; } @@ -418,7 +419,7 @@ public _FinalStage userName(Optional userName) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/AvailableActions.java b/src/main/java/com/merge/api/resources/accounting/types/AvailableActions.java index a75ed16a1..4ba96d8d7 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/AvailableActions.java +++ b/src/main/java/com/merge/api/resources/accounting/types/AvailableActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AvailableActions.Builder.class) public final class AvailableActions { private final AccountIntegration integration; @@ -87,7 +88,7 @@ public static IntegrationStage builder() { } public interface IntegrationStage { - PassthroughAvailableStage integration(AccountIntegration integration); + PassthroughAvailableStage integration(@NotNull AccountIntegration integration); Builder from(AvailableActions other); } @@ -127,7 +128,7 @@ public Builder from(AvailableActions other) { @java.lang.Override @JsonSetter("integration") - public PassthroughAvailableStage integration(AccountIntegration integration) { + public PassthroughAvailableStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } @@ -141,7 +142,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/BalanceSheet.java b/src/main/java/com/merge/api/resources/accounting/types/BalanceSheet.java index 017c62365..34e3ccd9b 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/BalanceSheet.java +++ b/src/main/java/com/merge/api/resources/accounting/types/BalanceSheet.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BalanceSheet.Builder.class) public final class BalanceSheet { private final Optional id; @@ -638,7 +638,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -649,7 +649,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -660,7 +660,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -671,7 +671,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -682,7 +682,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -693,7 +693,7 @@ public Builder currency(Optional currency) { } public Builder currency(BalanceSheetCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -704,7 +704,7 @@ public Builder company(Optional company) { } public Builder company(BalanceSheetCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -715,7 +715,7 @@ public Builder date(Optional date) { } public Builder date(OffsetDateTime date) { - this.date = Optional.of(date); + this.date = Optional.ofNullable(date); return this; } @@ -726,7 +726,7 @@ public Builder netAssets(Optional netAssets) { } public Builder netAssets(Double netAssets) { - this.netAssets = Optional.of(netAssets); + this.netAssets = Optional.ofNullable(netAssets); return this; } @@ -737,7 +737,7 @@ public Builder assets(Optional> assets) { } public Builder assets(List assets) { - this.assets = Optional.of(assets); + this.assets = Optional.ofNullable(assets); return this; } @@ -748,7 +748,7 @@ public Builder liabilities(Optional> liabilities) { } public Builder liabilities(List liabilities) { - this.liabilities = Optional.of(liabilities); + this.liabilities = Optional.ofNullable(liabilities); return this; } @@ -759,7 +759,7 @@ public Builder equity(Optional> equity) { } public Builder equity(List equity) { - this.equity = Optional.of(equity); + this.equity = Optional.ofNullable(equity); return this; } @@ -770,7 +770,7 @@ public Builder remoteGeneratedAt(Optional remoteGeneratedAt) { } public Builder remoteGeneratedAt(OffsetDateTime remoteGeneratedAt) { - this.remoteGeneratedAt = Optional.of(remoteGeneratedAt); + this.remoteGeneratedAt = Optional.ofNullable(remoteGeneratedAt); return this; } @@ -781,7 +781,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -792,7 +792,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -803,7 +803,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccount.java b/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccount.java index 59a7403af..71bab0d50 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccount.java +++ b/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccount.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedAccount.Builder.class) public final class BankFeedAccount { private final Optional id; @@ -672,7 +672,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -683,7 +683,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -694,7 +694,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -705,7 +705,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -716,7 +716,7 @@ public Builder sourceAccountId(Optional sourceAccountId) { } public Builder sourceAccountId(String sourceAccountId) { - this.sourceAccountId = Optional.of(sourceAccountId); + this.sourceAccountId = Optional.ofNullable(sourceAccountId); return this; } @@ -727,7 +727,7 @@ public Builder targetAccountId(Optional targetAccountId) { } public Builder targetAccountId(String targetAccountId) { - this.targetAccountId = Optional.of(targetAccountId); + this.targetAccountId = Optional.ofNullable(targetAccountId); return this; } @@ -738,7 +738,7 @@ public Builder sourceAccountName(Optional sourceAccountName) { } public Builder sourceAccountName(String sourceAccountName) { - this.sourceAccountName = Optional.of(sourceAccountName); + this.sourceAccountName = Optional.ofNullable(sourceAccountName); return this; } @@ -749,7 +749,7 @@ public Builder sourceAccountNumber(Optional sourceAccountNumber) { } public Builder sourceAccountNumber(String sourceAccountNumber) { - this.sourceAccountNumber = Optional.of(sourceAccountNumber); + this.sourceAccountNumber = Optional.ofNullable(sourceAccountNumber); return this; } @@ -760,7 +760,7 @@ public Builder targetAccountName(Optional targetAccountName) { } public Builder targetAccountName(String targetAccountName) { - this.targetAccountName = Optional.of(targetAccountName); + this.targetAccountName = Optional.ofNullable(targetAccountName); return this; } @@ -771,7 +771,7 @@ public Builder currency(Optional currency) { } public Builder currency(BankFeedAccountCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -782,7 +782,7 @@ public Builder feedStatus(Optional feedStatus) { } public Builder feedStatus(BankFeedAccountFeedStatus feedStatus) { - this.feedStatus = Optional.of(feedStatus); + this.feedStatus = Optional.ofNullable(feedStatus); return this; } @@ -793,7 +793,7 @@ public Builder feedStartDate(Optional feedStartDate) { } public Builder feedStartDate(OffsetDateTime feedStartDate) { - this.feedStartDate = Optional.of(feedStartDate); + this.feedStartDate = Optional.ofNullable(feedStartDate); return this; } @@ -804,7 +804,7 @@ public Builder sourceAccountBalance(Optional sourceAccountBalance) { } public Builder sourceAccountBalance(Double sourceAccountBalance) { - this.sourceAccountBalance = Optional.of(sourceAccountBalance); + this.sourceAccountBalance = Optional.ofNullable(sourceAccountBalance); return this; } @@ -815,7 +815,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(BankFeedAccountAccountType accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -826,7 +826,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -837,7 +837,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -848,7 +848,7 @@ public Builder remoteData(Optional>>> remote } public Builder remoteData(List>> remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountRequest.java b/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountRequest.java index 3bb2a24df..c11110e34 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedAccountRequest.Builder.class) public final class BankFeedAccountRequest { private final Optional sourceAccountId; @@ -589,7 +589,7 @@ public Builder sourceAccountId(Optional sourceAccountId) { } public Builder sourceAccountId(String sourceAccountId) { - this.sourceAccountId = Optional.of(sourceAccountId); + this.sourceAccountId = Optional.ofNullable(sourceAccountId); return this; } @@ -600,7 +600,7 @@ public Builder targetAccountId(Optional targetAccountId) { } public Builder targetAccountId(String targetAccountId) { - this.targetAccountId = Optional.of(targetAccountId); + this.targetAccountId = Optional.ofNullable(targetAccountId); return this; } @@ -611,7 +611,7 @@ public Builder sourceAccountName(Optional sourceAccountName) { } public Builder sourceAccountName(String sourceAccountName) { - this.sourceAccountName = Optional.of(sourceAccountName); + this.sourceAccountName = Optional.ofNullable(sourceAccountName); return this; } @@ -622,7 +622,7 @@ public Builder sourceAccountNumber(Optional sourceAccountNumber) { } public Builder sourceAccountNumber(String sourceAccountNumber) { - this.sourceAccountNumber = Optional.of(sourceAccountNumber); + this.sourceAccountNumber = Optional.ofNullable(sourceAccountNumber); return this; } @@ -633,7 +633,7 @@ public Builder targetAccountName(Optional targetAccountName) { } public Builder targetAccountName(String targetAccountName) { - this.targetAccountName = Optional.of(targetAccountName); + this.targetAccountName = Optional.ofNullable(targetAccountName); return this; } @@ -644,7 +644,7 @@ public Builder currency(Optional currency) { } public Builder currency(BankFeedAccountRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -655,7 +655,7 @@ public Builder feedStatus(Optional feedStatus) } public Builder feedStatus(BankFeedAccountRequestFeedStatus feedStatus) { - this.feedStatus = Optional.of(feedStatus); + this.feedStatus = Optional.ofNullable(feedStatus); return this; } @@ -666,7 +666,7 @@ public Builder feedStartDate(Optional feedStartDate) { } public Builder feedStartDate(OffsetDateTime feedStartDate) { - this.feedStartDate = Optional.of(feedStartDate); + this.feedStartDate = Optional.ofNullable(feedStartDate); return this; } @@ -677,7 +677,7 @@ public Builder sourceAccountBalance(Optional sourceAccountBalance) { } public Builder sourceAccountBalance(Double sourceAccountBalance) { - this.sourceAccountBalance = Optional.of(sourceAccountBalance); + this.sourceAccountBalance = Optional.ofNullable(sourceAccountBalance); return this; } @@ -688,7 +688,7 @@ public Builder accountType(Optional accountTy } public Builder accountType(BankFeedAccountRequestAccountType accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -699,7 +699,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -710,7 +710,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountResponse.java b/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountResponse.java index a26d8fa0c..6a76a6d2c 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/BankFeedAccountResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedAccountResponse.Builder.class) public final class BankFeedAccountResponse { private final BankFeedAccount model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(BankFeedAccount model); + _FinalStage model(@NotNull BankFeedAccount model); Builder from(BankFeedAccountResponse other); } @@ -149,14 +150,14 @@ public Builder from(BankFeedAccountResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(BankFeedAccount model) { + public _FinalStage model(@NotNull BankFeedAccount model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransaction.java b/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransaction.java index 93d3b8353..fe71aaff7 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransaction.java +++ b/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransaction.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedTransaction.Builder.class) public final class BankFeedTransaction { private final Optional id; @@ -330,7 +330,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -341,7 +341,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -352,7 +352,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -363,7 +363,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -374,7 +374,7 @@ public Builder bankFeedAccount(Optional bank } public Builder bankFeedAccount(BankFeedTransactionBankFeedAccount bankFeedAccount) { - this.bankFeedAccount = Optional.of(bankFeedAccount); + this.bankFeedAccount = Optional.ofNullable(bankFeedAccount); return this; } @@ -385,7 +385,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -396,7 +396,7 @@ public Builder postedDate(Optional postedDate) { } public Builder postedDate(OffsetDateTime postedDate) { - this.postedDate = Optional.of(postedDate); + this.postedDate = Optional.ofNullable(postedDate); return this; } @@ -407,7 +407,7 @@ public Builder amount(Optional amount) { } public Builder amount(Double amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -418,7 +418,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -429,7 +429,7 @@ public Builder transactionType(Optional transactionType) { } public Builder transactionType(String transactionType) { - this.transactionType = Optional.of(transactionType); + this.transactionType = Optional.ofNullable(transactionType); return this; } @@ -440,7 +440,7 @@ public Builder payee(Optional payee) { } public Builder payee(String payee) { - this.payee = Optional.of(payee); + this.payee = Optional.ofNullable(payee); return this; } @@ -451,7 +451,7 @@ public Builder creditOrDebit(Optional creditOr } public Builder creditOrDebit(BankFeedTransactionCreditOrDebit creditOrDebit) { - this.creditOrDebit = Optional.of(creditOrDebit); + this.creditOrDebit = Optional.ofNullable(creditOrDebit); return this; } @@ -462,7 +462,7 @@ public Builder sourceTransactionId(Optional sourceTransactionId) { } public Builder sourceTransactionId(String sourceTransactionId) { - this.sourceTransactionId = Optional.of(sourceTransactionId); + this.sourceTransactionId = Optional.ofNullable(sourceTransactionId); return this; } @@ -473,7 +473,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -484,7 +484,7 @@ public Builder isProcessed(Optional isProcessed) { } public Builder isProcessed(Boolean isProcessed) { - this.isProcessed = Optional.of(isProcessed); + this.isProcessed = Optional.ofNullable(isProcessed); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionRequestRequest.java b/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionRequestRequest.java index 3df8eae3d..66802f730 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionRequestRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionRequestRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedTransactionRequestRequest.Builder.class) public final class BankFeedTransactionRequestRequest { private final Optional bankFeedAccount; @@ -260,7 +260,7 @@ public Builder bankFeedAccount(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -282,7 +282,7 @@ public Builder postedDate(Optional postedDate) { } public Builder postedDate(OffsetDateTime postedDate) { - this.postedDate = Optional.of(postedDate); + this.postedDate = Optional.ofNullable(postedDate); return this; } @@ -293,7 +293,7 @@ public Builder amount(Optional amount) { } public Builder amount(Double amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -304,7 +304,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -315,7 +315,7 @@ public Builder transactionType(Optional transactionType) { } public Builder transactionType(String transactionType) { - this.transactionType = Optional.of(transactionType); + this.transactionType = Optional.ofNullable(transactionType); return this; } @@ -326,7 +326,7 @@ public Builder payee(Optional payee) { } public Builder payee(String payee) { - this.payee = Optional.of(payee); + this.payee = Optional.ofNullable(payee); return this; } @@ -337,7 +337,7 @@ public Builder creditOrDebit(Optional sourceTransactionId) { } public Builder sourceTransactionId(String sourceTransactionId) { - this.sourceTransactionId = Optional.of(sourceTransactionId); + this.sourceTransactionId = Optional.ofNullable(sourceTransactionId); return this; } @@ -359,7 +359,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -370,7 +370,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionResponse.java b/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionResponse.java index 39b6631e5..81dae1d7a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/BankFeedTransactionResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankFeedTransactionResponse.Builder.class) public final class BankFeedTransactionResponse { private final BankFeedTransaction model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(BankFeedTransaction model); + _FinalStage model(@NotNull BankFeedTransaction model); Builder from(BankFeedTransactionResponse other); } @@ -149,14 +150,14 @@ public Builder from(BankFeedTransactionResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(BankFeedTransaction model) { + public _FinalStage model(@NotNull BankFeedTransaction model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CashFlowStatement.java b/src/main/java/com/merge/api/resources/accounting/types/CashFlowStatement.java index 94c848ad6..506706222 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CashFlowStatement.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CashFlowStatement.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CashFlowStatement.Builder.class) public final class CashFlowStatement { private final Optional id; @@ -672,7 +672,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -683,7 +683,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -694,7 +694,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -705,7 +705,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -716,7 +716,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -727,7 +727,7 @@ public Builder currency(Optional currency) { } public Builder currency(CashFlowStatementCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -738,7 +738,7 @@ public Builder company(Optional company) { } public Builder company(CashFlowStatementCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -749,7 +749,7 @@ public Builder startPeriod(Optional startPeriod) { } public Builder startPeriod(OffsetDateTime startPeriod) { - this.startPeriod = Optional.of(startPeriod); + this.startPeriod = Optional.ofNullable(startPeriod); return this; } @@ -760,7 +760,7 @@ public Builder endPeriod(Optional endPeriod) { } public Builder endPeriod(OffsetDateTime endPeriod) { - this.endPeriod = Optional.of(endPeriod); + this.endPeriod = Optional.ofNullable(endPeriod); return this; } @@ -771,7 +771,7 @@ public Builder cashAtBeginningOfPeriod(Optional cashAtBeginningOfPeriod) } public Builder cashAtBeginningOfPeriod(Double cashAtBeginningOfPeriod) { - this.cashAtBeginningOfPeriod = Optional.of(cashAtBeginningOfPeriod); + this.cashAtBeginningOfPeriod = Optional.ofNullable(cashAtBeginningOfPeriod); return this; } @@ -782,7 +782,7 @@ public Builder cashAtEndOfPeriod(Optional cashAtEndOfPeriod) { } public Builder cashAtEndOfPeriod(Double cashAtEndOfPeriod) { - this.cashAtEndOfPeriod = Optional.of(cashAtEndOfPeriod); + this.cashAtEndOfPeriod = Optional.ofNullable(cashAtEndOfPeriod); return this; } @@ -793,7 +793,7 @@ public Builder operatingActivities(Optional> operatingActivitie } public Builder operatingActivities(List operatingActivities) { - this.operatingActivities = Optional.of(operatingActivities); + this.operatingActivities = Optional.ofNullable(operatingActivities); return this; } @@ -804,7 +804,7 @@ public Builder investingActivities(Optional> investingActivitie } public Builder investingActivities(List investingActivities) { - this.investingActivities = Optional.of(investingActivities); + this.investingActivities = Optional.ofNullable(investingActivities); return this; } @@ -815,7 +815,7 @@ public Builder financingActivities(Optional> financingActivitie } public Builder financingActivities(List financingActivities) { - this.financingActivities = Optional.of(financingActivities); + this.financingActivities = Optional.ofNullable(financingActivities); return this; } @@ -826,7 +826,7 @@ public Builder remoteGeneratedAt(Optional remoteGeneratedAt) { } public Builder remoteGeneratedAt(OffsetDateTime remoteGeneratedAt) { - this.remoteGeneratedAt = Optional.of(remoteGeneratedAt); + this.remoteGeneratedAt = Optional.ofNullable(remoteGeneratedAt); return this; } @@ -837,7 +837,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -848,7 +848,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -859,7 +859,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopeApi.java index 4c6b82779..4ccfc8849 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopeApi.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopeApi.Builder.class) public final class CommonModelScopeApi { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopesBodyRequest.java b/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopesBodyRequest.java index c4394dfcf..2d9bfc417 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopesBodyRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CommonModelScopesBodyRequest.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopesBodyRequest.Builder.class) public final class CommonModelScopesBodyRequest { private final String modelId; @@ -87,7 +88,7 @@ public static ModelIdStage builder() { } public interface ModelIdStage { - _FinalStage modelId(String modelId); + _FinalStage modelId(@NotNull String modelId); Builder from(CommonModelScopesBodyRequest other); } @@ -131,7 +132,7 @@ public Builder from(CommonModelScopesBodyRequest other) { @java.lang.Override @JsonSetter("model_id") - public _FinalStage modelId(String modelId) { + public _FinalStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CompanyInfo.java b/src/main/java/com/merge/api/resources/accounting/types/CompanyInfo.java index c2936467c..5f5c8467a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CompanyInfo.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CompanyInfo.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CompanyInfo.Builder.class) public final class CompanyInfo { private final Optional id; @@ -658,7 +658,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -669,7 +669,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -680,7 +680,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -691,7 +691,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -702,7 +702,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -713,7 +713,7 @@ public Builder legalName(Optional legalName) { } public Builder legalName(String legalName) { - this.legalName = Optional.of(legalName); + this.legalName = Optional.ofNullable(legalName); return this; } @@ -724,7 +724,7 @@ public Builder taxNumber(Optional taxNumber) { } public Builder taxNumber(String taxNumber) { - this.taxNumber = Optional.of(taxNumber); + this.taxNumber = Optional.ofNullable(taxNumber); return this; } @@ -735,7 +735,7 @@ public Builder fiscalYearEndMonth(Optional fiscalYearEndMonth) { } public Builder fiscalYearEndMonth(Integer fiscalYearEndMonth) { - this.fiscalYearEndMonth = Optional.of(fiscalYearEndMonth); + this.fiscalYearEndMonth = Optional.ofNullable(fiscalYearEndMonth); return this; } @@ -746,7 +746,7 @@ public Builder fiscalYearEndDay(Optional fiscalYearEndDay) { } public Builder fiscalYearEndDay(Integer fiscalYearEndDay) { - this.fiscalYearEndDay = Optional.of(fiscalYearEndDay); + this.fiscalYearEndDay = Optional.ofNullable(fiscalYearEndDay); return this; } @@ -757,7 +757,7 @@ public Builder currency(Optional currency) { } public Builder currency(CompanyInfoCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -768,7 +768,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -779,7 +779,7 @@ public Builder urls(Optional>> urls) { } public Builder urls(List> urls) { - this.urls = Optional.of(urls); + this.urls = Optional.ofNullable(urls); return this; } @@ -790,7 +790,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List
addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -801,7 +801,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -812,7 +812,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -823,7 +823,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -834,7 +834,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Contact.java b/src/main/java/com/merge/api/resources/accounting/types/Contact.java index 571f692f5..debefd4ec 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Contact.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Contact.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Contact.Builder.class) public final class Contact { private final Optional id; @@ -391,7 +391,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -402,7 +402,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -413,7 +413,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -424,7 +424,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -435,7 +435,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -446,7 +446,7 @@ public Builder isSupplier(Optional isSupplier) { } public Builder isSupplier(Boolean isSupplier) { - this.isSupplier = Optional.of(isSupplier); + this.isSupplier = Optional.ofNullable(isSupplier); return this; } @@ -457,7 +457,7 @@ public Builder isCustomer(Optional isCustomer) { } public Builder isCustomer(Boolean isCustomer) { - this.isCustomer = Optional.of(isCustomer); + this.isCustomer = Optional.ofNullable(isCustomer); return this; } @@ -468,7 +468,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -479,7 +479,7 @@ public Builder taxNumber(Optional taxNumber) { } public Builder taxNumber(String taxNumber) { - this.taxNumber = Optional.of(taxNumber); + this.taxNumber = Optional.ofNullable(taxNumber); return this; } @@ -490,7 +490,7 @@ public Builder status(Optional status) { } public Builder status(ContactStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -501,7 +501,7 @@ public Builder currency(Optional currency) { } public Builder currency(String currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -512,7 +512,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -523,7 +523,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -534,7 +534,7 @@ public Builder addresses(Optional>> addresse } public Builder addresses(List> addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -545,7 +545,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -556,7 +556,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -567,7 +567,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -578,7 +578,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -589,7 +589,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ContactRequest.java b/src/main/java/com/merge/api/resources/accounting/types/ContactRequest.java index 37f185fec..56fd570a1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ContactRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ContactRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactRequest.Builder.class) public final class ContactRequest { private final Optional name; @@ -291,7 +291,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -302,7 +302,7 @@ public Builder isSupplier(Optional isSupplier) { } public Builder isSupplier(Boolean isSupplier) { - this.isSupplier = Optional.of(isSupplier); + this.isSupplier = Optional.ofNullable(isSupplier); return this; } @@ -313,7 +313,7 @@ public Builder isCustomer(Optional isCustomer) { } public Builder isCustomer(Boolean isCustomer) { - this.isCustomer = Optional.of(isCustomer); + this.isCustomer = Optional.ofNullable(isCustomer); return this; } @@ -324,7 +324,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -335,7 +335,7 @@ public Builder taxNumber(Optional taxNumber) { } public Builder taxNumber(String taxNumber) { - this.taxNumber = Optional.of(taxNumber); + this.taxNumber = Optional.ofNullable(taxNumber); return this; } @@ -346,7 +346,7 @@ public Builder status(Optional status) { } public Builder status(ContactRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -357,7 +357,7 @@ public Builder currency(Optional currency) { } public Builder currency(String currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -368,7 +368,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -379,7 +379,7 @@ public Builder addresses(Optional>> a } public Builder addresses(List> addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -390,7 +390,7 @@ public Builder phoneNumbers(Optional> phoneNu } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -401,7 +401,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -412,7 +412,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -423,7 +423,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ContactResponse.java b/src/main/java/com/merge/api/resources/accounting/types/ContactResponse.java index 9fcf541aa..8f181a50f 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ContactResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ContactResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactResponse.Builder.class) public final class ContactResponse { private final Contact model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Contact model); + _FinalStage model(@NotNull Contact model); Builder from(ContactResponse other); } @@ -149,14 +150,14 @@ public Builder from(ContactResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Contact model) { + public _FinalStage model(@NotNull Contact model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNote.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNote.java index af7460f06..4666752e4 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNote.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNote.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNote.Builder.class) public final class CreditNote { private final Optional id; @@ -799,7 +799,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -810,7 +810,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -821,7 +821,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -832,7 +832,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -843,7 +843,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -854,7 +854,7 @@ public Builder status(Optional status) { } public Builder status(CreditNoteStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -865,7 +865,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -876,7 +876,7 @@ public Builder contact(Optional contact) { } public Builder contact(CreditNoteContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -887,7 +887,7 @@ public Builder company(Optional company) { } public Builder company(CreditNoteCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -898,7 +898,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -909,7 +909,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -920,7 +920,7 @@ public Builder remainingCredit(Optional remainingCredit) { } public Builder remainingCredit(Double remainingCredit) { - this.remainingCredit = Optional.of(remainingCredit); + this.remainingCredit = Optional.ofNullable(remainingCredit); return this; } @@ -931,7 +931,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -942,7 +942,7 @@ public Builder lineItems(Optional> lineItems) { } public Builder lineItems(List lineItems) { - this.lineItems = Optional.of(lineItems); + this.lineItems = Optional.ofNullable(lineItems); return this; } @@ -954,7 +954,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -965,7 +965,7 @@ public Builder currency(Optional currency) { } public Builder currency(CreditNoteCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -976,7 +976,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -987,7 +987,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -998,7 +998,7 @@ public Builder payments(Optional>> payment } public Builder payments(List> payments) { - this.payments = Optional.of(payments); + this.payments = Optional.ofNullable(payments); return this; } @@ -1009,7 +1009,7 @@ public Builder appliedPayments(Optional> appliedPayments) { - this.appliedPayments = Optional.of(appliedPayments); + this.appliedPayments = Optional.ofNullable(appliedPayments); return this; } @@ -1020,7 +1020,7 @@ public Builder accountingPeriod(Optional accountingP } public Builder accountingPeriod(CreditNoteAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -1031,7 +1031,7 @@ public Builder appliedToLines(Optional> a } public Builder appliedToLines(List appliedToLines) { - this.appliedToLines = Optional.of(appliedToLines); + this.appliedToLines = Optional.ofNullable(appliedToLines); return this; } @@ -1042,7 +1042,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -1053,7 +1053,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -1064,7 +1064,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNote.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNote.java index 86cf6dcaa..17d32e1aa 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNote.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNote.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteApplyLineForCreditNote.Builder.class) public final class CreditNoteApplyLineForCreditNote { private final Optional remoteId; @@ -190,7 +190,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -201,7 +201,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -212,7 +212,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -223,7 +223,7 @@ public Builder invoice(Optional invoice } public Builder invoice(CreditNoteApplyLineForCreditNoteInvoice invoice) { - this.invoice = Optional.of(invoice); + this.invoice = Optional.ofNullable(invoice); return this; } @@ -234,7 +234,7 @@ public Builder appliedDate(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -245,7 +245,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -256,7 +256,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java index c604994b7..85be33ab7 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForCreditNoteRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteApplyLineForCreditNoteRequest.Builder.class) public final class CreditNoteApplyLineForCreditNoteRequest { private final Optional remoteId; @@ -169,7 +169,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -180,7 +180,7 @@ public Builder invoice(Optional } public Builder invoice(CreditNoteApplyLineForCreditNoteRequestInvoice invoice) { - this.invoice = Optional.of(invoice); + this.invoice = Optional.ofNullable(invoice); return this; } @@ -191,7 +191,7 @@ public Builder appliedDate(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -202,7 +202,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -213,7 +213,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -224,7 +224,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForInvoice.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForInvoice.java index edb716b85..393c7de4a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForInvoice.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteApplyLineForInvoice.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteApplyLineForInvoice.Builder.class) public final class CreditNoteApplyLineForInvoice { private final Optional remoteId; @@ -190,7 +190,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -201,7 +201,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -212,7 +212,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -223,7 +223,7 @@ public Builder creditNote(Optional cred } public Builder creditNote(CreditNoteApplyLineForInvoiceCreditNote creditNote) { - this.creditNote = Optional.of(creditNote); + this.creditNote = Optional.ofNullable(creditNote); return this; } @@ -234,7 +234,7 @@ public Builder appliedDate(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -245,7 +245,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -256,7 +256,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItem.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItem.java index af4c5d76f..f901f7d29 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItem.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteLineItem.Builder.class) public final class CreditNoteLineItem { private final Optional id; @@ -358,7 +358,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -369,7 +369,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -380,7 +380,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -391,7 +391,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -402,7 +402,7 @@ public Builder item(Optional item) { } public Builder item(CreditNoteLineItemItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -413,7 +413,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -424,7 +424,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -435,7 +435,7 @@ public Builder quantity(Optional quantity) { } public Builder quantity(String quantity) { - this.quantity = Optional.of(quantity); + this.quantity = Optional.ofNullable(quantity); return this; } @@ -446,7 +446,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -457,7 +457,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(String unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -468,7 +468,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -479,7 +479,7 @@ public Builder totalLineAmount(Optional totalLineAmount) { } public Builder totalLineAmount(String totalLineAmount) { - this.totalLineAmount = Optional.of(totalLineAmount); + this.totalLineAmount = Optional.ofNullable(totalLineAmount); return this; } @@ -490,7 +490,7 @@ public Builder trackingCategory(Optional trackingCategory) { } public Builder trackingCategory(String trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -501,7 +501,7 @@ public Builder trackingCategories(Optional>> trackingCateg } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -512,7 +512,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -523,7 +523,7 @@ public Builder company(Optional company) { } public Builder company(CreditNoteLineItemCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -534,7 +534,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItemRequest.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItemRequest.java index 6f46ca74a..a8fe33a81 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItemRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteLineItemRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteLineItemRequest.Builder.class) public final class CreditNoteLineItemRequest { private final Optional remoteId; @@ -321,7 +321,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -332,7 +332,7 @@ public Builder item(Optional item) { } public Builder item(CreditNoteLineItemRequestItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -343,7 +343,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -354,7 +354,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -365,7 +365,7 @@ public Builder quantity(Optional quantity) { } public Builder quantity(String quantity) { - this.quantity = Optional.of(quantity); + this.quantity = Optional.ofNullable(quantity); return this; } @@ -376,7 +376,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -387,7 +387,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(String unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -398,7 +398,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -409,7 +409,7 @@ public Builder totalLineAmount(Optional totalLineAmount) { } public Builder totalLineAmount(String totalLineAmount) { - this.totalLineAmount = Optional.of(totalLineAmount); + this.totalLineAmount = Optional.ofNullable(totalLineAmount); return this; } @@ -420,7 +420,7 @@ public Builder trackingCategory(Optional trackingCategory) { } public Builder trackingCategory(String trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -431,7 +431,7 @@ public Builder trackingCategories(Optional>> trackingCateg } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -442,7 +442,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -453,7 +453,7 @@ public Builder company(Optional company) { } public Builder company(CreditNoteLineItemRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -464,7 +464,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -475,7 +475,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteRequest.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteRequest.java index 116103b92..2d5767360 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteRequest.Builder.class) public final class CreditNoteRequest { private final Optional transactionDate; @@ -683,7 +683,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -694,7 +694,7 @@ public Builder status(Optional status) { } public Builder status(CreditNoteRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -705,7 +705,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -716,7 +716,7 @@ public Builder contact(Optional contact) { } public Builder contact(CreditNoteRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -727,7 +727,7 @@ public Builder company(Optional company) { } public Builder company(CreditNoteRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -738,7 +738,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -749,7 +749,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -760,7 +760,7 @@ public Builder remainingCredit(Optional remainingCredit) { } public Builder remainingCredit(Double remainingCredit) { - this.remainingCredit = Optional.of(remainingCredit); + this.remainingCredit = Optional.ofNullable(remainingCredit); return this; } @@ -771,7 +771,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -782,7 +782,7 @@ public Builder lineItems(Optional> lineItem } public Builder lineItems(List lineItems) { - this.lineItems = Optional.of(lineItems); + this.lineItems = Optional.ofNullable(lineItems); return this; } @@ -794,7 +794,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -805,7 +805,7 @@ public Builder currency(Optional currency) { } public Builder currency(CreditNoteRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -816,7 +816,7 @@ public Builder payments(Optional>> } public Builder payments(List> payments) { - this.payments = Optional.of(payments); + this.payments = Optional.ofNullable(payments); return this; } @@ -827,7 +827,7 @@ public Builder appliedPayments(Optional> appliedPayments) { - this.appliedPayments = Optional.of(appliedPayments); + this.appliedPayments = Optional.ofNullable(appliedPayments); return this; } @@ -838,7 +838,7 @@ public Builder accountingPeriod(Optional acco } public Builder accountingPeriod(CreditNoteRequestAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -849,7 +849,7 @@ public Builder appliedToLines(Optional appliedToLines) { - this.appliedToLines = Optional.of(appliedToLines); + this.appliedToLines = Optional.ofNullable(appliedToLines); return this; } @@ -860,7 +860,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -871,7 +871,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteResponse.java b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteResponse.java index 559680daf..732780d2a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/CreditNoteResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/CreditNoteResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreditNoteResponse.Builder.class) public final class CreditNoteResponse { private final CreditNote model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(CreditNote model); + _FinalStage model(@NotNull CreditNote model); Builder from(CreditNoteResponse other); } @@ -149,14 +150,14 @@ public Builder from(CreditNoteResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(CreditNote model) { + public _FinalStage model(@NotNull CreditNote model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/resources/accounting/types/DataPassthroughRequest.java index 8a23a7628..42147674c 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/DataPassthroughRequest.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DataPassthroughRequest.Builder.class) public final class DataPassthroughRequest { private final MethodEnum method; @@ -164,13 +165,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(MethodEnum method); + PathStage method(@NotNull MethodEnum method); Builder from(DataPassthroughRequest other); } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); } public interface _FinalStage { @@ -239,7 +240,7 @@ public Builder from(DataPassthroughRequest other) { @java.lang.Override @JsonSetter("method") - public PathStage method(MethodEnum method) { + public PathStage method(@NotNull MethodEnum method) { this.method = method; return this; } @@ -250,7 +251,7 @@ public PathStage method(MethodEnum method) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @@ -261,7 +262,7 @@ public _FinalStage path(String path) { */ @java.lang.Override public _FinalStage normalizeResponse(Boolean normalizeResponse) { - this.normalizeResponse = Optional.of(normalizeResponse); + this.normalizeResponse = Optional.ofNullable(normalizeResponse); return this; } @@ -274,7 +275,7 @@ public _FinalStage normalizeResponse(Optional normalizeResponse) { @java.lang.Override public _FinalStage requestFormat(RequestFormatEnum requestFormat) { - this.requestFormat = Optional.of(requestFormat); + this.requestFormat = Optional.ofNullable(requestFormat); return this; } @@ -291,7 +292,7 @@ public _FinalStage requestFormat(Optional requestFormat) { */ @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -308,7 +309,7 @@ public _FinalStage headers(Optional> headers) { */ @java.lang.Override public _FinalStage multipartFormData(List multipartFormData) { - this.multipartFormData = Optional.of(multipartFormData); + this.multipartFormData = Optional.ofNullable(multipartFormData); return this; } @@ -325,7 +326,7 @@ public _FinalStage multipartFormData(Optional> m */ @java.lang.Override public _FinalStage data(String data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } @@ -342,7 +343,7 @@ public _FinalStage data(Optional data) { */ @java.lang.Override public _FinalStage baseUrlOverride(String baseUrlOverride) { - this.baseUrlOverride = Optional.of(baseUrlOverride); + this.baseUrlOverride = Optional.ofNullable(baseUrlOverride); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/DebugModeLog.java b/src/main/java/com/merge/api/resources/accounting/types/DebugModeLog.java index c99f9c60e..f9592ece0 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/DebugModeLog.java +++ b/src/main/java/com/merge/api/resources/accounting/types/DebugModeLog.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModeLog.Builder.class) public final class DebugModeLog { private final String logId; @@ -84,17 +85,17 @@ public static LogIdStage builder() { } public interface LogIdStage { - DashboardViewStage logId(String logId); + DashboardViewStage logId(@NotNull String logId); Builder from(DebugModeLog other); } public interface DashboardViewStage { - LogSummaryStage dashboardView(String dashboardView); + LogSummaryStage dashboardView(@NotNull String dashboardView); } public interface LogSummaryStage { - _FinalStage logSummary(DebugModelLogSummary logSummary); + _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary); } public interface _FinalStage { @@ -124,21 +125,21 @@ public Builder from(DebugModeLog other) { @java.lang.Override @JsonSetter("log_id") - public DashboardViewStage logId(String logId) { + public DashboardViewStage logId(@NotNull String logId) { this.logId = logId; return this; } @java.lang.Override @JsonSetter("dashboard_view") - public LogSummaryStage dashboardView(String dashboardView) { + public LogSummaryStage dashboardView(@NotNull String dashboardView) { this.dashboardView = dashboardView; return this; } @java.lang.Override @JsonSetter("log_summary") - public _FinalStage logSummary(DebugModelLogSummary logSummary) { + public _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary) { this.logSummary = logSummary; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/DebugModelLogSummary.java b/src/main/java/com/merge/api/resources/accounting/types/DebugModelLogSummary.java index 56ab1f099..f3114d448 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/DebugModelLogSummary.java +++ b/src/main/java/com/merge/api/resources/accounting/types/DebugModelLogSummary.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModelLogSummary.Builder.class) public final class DebugModelLogSummary { private final String url; @@ -78,13 +79,13 @@ public static UrlStage builder() { } public interface UrlStage { - MethodStage url(String url); + MethodStage url(@NotNull String url); Builder from(DebugModelLogSummary other); } public interface MethodStage { - StatusCodeStage method(String method); + StatusCodeStage method(@NotNull String method); } public interface StatusCodeStage { @@ -118,14 +119,14 @@ public Builder from(DebugModelLogSummary other) { @java.lang.Override @JsonSetter("url") - public MethodStage url(String url) { + public MethodStage url(@NotNull String url) { this.url = url; return this; } @java.lang.Override @JsonSetter("method") - public StatusCodeStage method(String method) { + public StatusCodeStage method(@NotNull String method) { this.method = method; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Employee.java b/src/main/java/com/merge/api/resources/accounting/types/Employee.java index 5eeeb417f..07278a659 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Employee.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Employee.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Employee.Builder.class) public final class Employee { private final Optional id; @@ -250,7 +251,7 @@ public static StatusStage builder() { } public interface StatusStage { - _FinalStage status(EmployeeStatus status); + _FinalStage status(@NotNull EmployeeStatus status); Builder from(Employee other); } @@ -375,14 +376,14 @@ public Builder from(Employee other) { */ @java.lang.Override @JsonSetter("status") - public _FinalStage status(EmployeeStatus status) { + public _FinalStage status(@NotNull EmployeeStatus status) { this.status = status; return this; } @java.lang.Override public _FinalStage remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -395,7 +396,7 @@ public _FinalStage remoteData(Optional> remoteData) { @java.lang.Override public _FinalStage fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -412,7 +413,7 @@ public _FinalStage fieldMappings(Optional> fieldMappings) */ @java.lang.Override public _FinalStage remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -429,7 +430,7 @@ public _FinalStage remoteWasDeleted(Optional remoteWasDeleted) { */ @java.lang.Override public _FinalStage company(EmployeeCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -446,7 +447,7 @@ public _FinalStage company(Optional company) { */ @java.lang.Override public _FinalStage emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -463,7 +464,7 @@ public _FinalStage emailAddress(Optional emailAddress) { */ @java.lang.Override public _FinalStage employeeNumber(String employeeNumber) { - this.employeeNumber = Optional.of(employeeNumber); + this.employeeNumber = Optional.ofNullable(employeeNumber); return this; } @@ -480,7 +481,7 @@ public _FinalStage employeeNumber(Optional employeeNumber) { */ @java.lang.Override public _FinalStage isContractor(Boolean isContractor) { - this.isContractor = Optional.of(isContractor); + this.isContractor = Optional.ofNullable(isContractor); return this; } @@ -497,7 +498,7 @@ public _FinalStage isContractor(Optional isContractor) { */ @java.lang.Override public _FinalStage lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -514,7 +515,7 @@ public _FinalStage lastName(Optional lastName) { */ @java.lang.Override public _FinalStage firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -531,7 +532,7 @@ public _FinalStage firstName(Optional firstName) { */ @java.lang.Override public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -548,7 +549,7 @@ public _FinalStage modifiedAt(Optional modifiedAt) { */ @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -565,7 +566,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -578,7 +579,7 @@ public _FinalStage remoteId(Optional remoteId) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ErrorValidationProblem.java b/src/main/java/com/merge/api/resources/accounting/types/ErrorValidationProblem.java index e19f82a4c..e4664e1ed 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ErrorValidationProblem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ErrorValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ErrorValidationProblem.Builder.class) public final class ErrorValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(ErrorValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(ErrorValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Expense.java b/src/main/java/com/merge/api/resources/accounting/types/Expense.java index cf7588f81..a92c2ebb9 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Expense.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Expense.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Expense.Builder.class) public final class Expense { private final Optional id; @@ -774,7 +774,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -785,7 +785,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -796,7 +796,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -807,7 +807,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -818,7 +818,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -829,7 +829,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -840,7 +840,7 @@ public Builder account(Optional account) { } public Builder account(ExpenseAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -851,7 +851,7 @@ public Builder contact(Optional contact) { } public Builder contact(ExpenseContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -862,7 +862,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -873,7 +873,7 @@ public Builder subTotal(Optional subTotal) { } public Builder subTotal(Double subTotal) { - this.subTotal = Optional.of(subTotal); + this.subTotal = Optional.ofNullable(subTotal); return this; } @@ -884,7 +884,7 @@ public Builder totalTaxAmount(Optional totalTaxAmount) { } public Builder totalTaxAmount(Double totalTaxAmount) { - this.totalTaxAmount = Optional.of(totalTaxAmount); + this.totalTaxAmount = Optional.ofNullable(totalTaxAmount); return this; } @@ -895,7 +895,7 @@ public Builder currency(Optional currency) { } public Builder currency(ExpenseCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -906,7 +906,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -917,7 +917,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -928,7 +928,7 @@ public Builder company(Optional company) { } public Builder company(ExpenseCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -939,7 +939,7 @@ public Builder employee(Optional employee) { } public Builder employee(ExpenseEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -950,7 +950,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -961,7 +961,7 @@ public Builder lines(Optional> lines) { } public Builder lines(List lines) { - this.lines = Optional.of(lines); + this.lines = Optional.ofNullable(lines); return this; } @@ -972,7 +972,7 @@ public Builder trackingCategories(Optional> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -983,7 +983,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -994,7 +994,7 @@ public Builder accountingPeriod(Optional accountingPeri } public Builder accountingPeriod(ExpenseAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -1005,7 +1005,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -1016,7 +1016,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -1027,7 +1027,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ExpenseLine.java b/src/main/java/com/merge/api/resources/accounting/types/ExpenseLine.java index 1a75b564d..cea0ed66e 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ExpenseLine.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ExpenseLine.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpenseLine.Builder.class) public final class ExpenseLine { private final Optional id; @@ -666,7 +666,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -677,7 +677,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -688,7 +688,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -699,7 +699,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -710,7 +710,7 @@ public Builder item(Optional item) { } public Builder item(ExpenseLineItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -721,7 +721,7 @@ public Builder netAmount(Optional netAmount) { } public Builder netAmount(Double netAmount) { - this.netAmount = Optional.of(netAmount); + this.netAmount = Optional.ofNullable(netAmount); return this; } @@ -732,7 +732,7 @@ public Builder trackingCategory(Optional trackingCa } public Builder trackingCategory(ExpenseLineTrackingCategory trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -744,7 +744,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -755,7 +755,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -766,7 +766,7 @@ public Builder employee(Optional employee) { } public Builder employee(ExpenseLineEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -777,7 +777,7 @@ public Builder currency(Optional currency) { } public Builder currency(ExpenseLineCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -788,7 +788,7 @@ public Builder account(Optional account) { } public Builder account(ExpenseLineAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -799,7 +799,7 @@ public Builder contact(Optional contact) { } public Builder contact(ExpenseLineContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -810,7 +810,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -821,7 +821,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -832,7 +832,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -843,7 +843,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ExpenseLineRequest.java b/src/main/java/com/merge/api/resources/accounting/types/ExpenseLineRequest.java index 200c7ef62..7b94fcca9 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ExpenseLineRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ExpenseLineRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpenseLineRequest.Builder.class) public final class ExpenseLineRequest { private final Optional remoteId; @@ -644,7 +644,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -655,7 +655,7 @@ public Builder item(Optional item) { } public Builder item(ExpenseLineRequestItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -666,7 +666,7 @@ public Builder netAmount(Optional netAmount) { } public Builder netAmount(Double netAmount) { - this.netAmount = Optional.of(netAmount); + this.netAmount = Optional.ofNullable(netAmount); return this; } @@ -677,7 +677,7 @@ public Builder trackingCategory(Optional tra } public Builder trackingCategory(ExpenseLineRequestTrackingCategory trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -689,7 +689,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -700,7 +700,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -711,7 +711,7 @@ public Builder employee(Optional employee) { } public Builder employee(ExpenseLineRequestEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -722,7 +722,7 @@ public Builder currency(Optional currency) { } public Builder currency(ExpenseLineRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -733,7 +733,7 @@ public Builder account(Optional account) { } public Builder account(ExpenseLineRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -744,7 +744,7 @@ public Builder contact(Optional contact) { } public Builder contact(ExpenseLineRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -755,7 +755,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -766,7 +766,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -777,7 +777,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -788,7 +788,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -799,7 +799,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -810,7 +810,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ExpenseRequest.java b/src/main/java/com/merge/api/resources/accounting/types/ExpenseRequest.java index f3862e2c0..d5d28d932 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ExpenseRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ExpenseRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpenseRequest.Builder.class) public final class ExpenseRequest { private final Optional transactionDate; @@ -675,7 +675,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -686,7 +686,7 @@ public Builder account(Optional account) { } public Builder account(ExpenseRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -697,7 +697,7 @@ public Builder contact(Optional contact) { } public Builder contact(ExpenseRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -708,7 +708,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -719,7 +719,7 @@ public Builder subTotal(Optional subTotal) { } public Builder subTotal(Double subTotal) { - this.subTotal = Optional.of(subTotal); + this.subTotal = Optional.ofNullable(subTotal); return this; } @@ -730,7 +730,7 @@ public Builder totalTaxAmount(Optional totalTaxAmount) { } public Builder totalTaxAmount(Double totalTaxAmount) { - this.totalTaxAmount = Optional.of(totalTaxAmount); + this.totalTaxAmount = Optional.ofNullable(totalTaxAmount); return this; } @@ -741,7 +741,7 @@ public Builder currency(Optional currency) { } public Builder currency(ExpenseRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -752,7 +752,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -763,7 +763,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -774,7 +774,7 @@ public Builder company(Optional company) { } public Builder company(ExpenseRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -785,7 +785,7 @@ public Builder employee(Optional employee) { } public Builder employee(ExpenseRequestEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -796,7 +796,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -807,7 +807,7 @@ public Builder lines(Optional> lines) { } public Builder lines(List lines) { - this.lines = Optional.of(lines); + this.lines = Optional.ofNullable(lines); return this; } @@ -819,7 +819,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -830,7 +830,7 @@ public Builder accountingPeriod(Optional account } public Builder accountingPeriod(ExpenseRequestAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -841,7 +841,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -852,7 +852,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -863,7 +863,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ExpenseResponse.java b/src/main/java/com/merge/api/resources/accounting/types/ExpenseResponse.java index b8882422f..dfb8a1ee5 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ExpenseResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ExpenseResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExpenseResponse.Builder.class) public final class ExpenseResponse { private final Expense model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Expense model); + _FinalStage model(@NotNull Expense model); Builder from(ExpenseResponse other); } @@ -149,14 +150,14 @@ public Builder from(ExpenseResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Expense model) { + public _FinalStage model(@NotNull Expense model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApi.java b/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApi.java index bb1cbe3f0..b6423eab8 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApi.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApi.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApi.Builder.class) public final class ExternalTargetFieldApi { private final Optional name; @@ -110,7 +110,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -121,7 +121,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -132,7 +132,7 @@ public Builder isMapped(Optional isMapped) { } public Builder isMapped(String isMapped) { - this.isMapped = Optional.of(isMapped); + this.isMapped = Optional.ofNullable(isMapped); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApiResponse.java b/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApiResponse.java index e249dc88f..462bd5f4c 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ExternalTargetFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApiResponse.Builder.class) public final class ExternalTargetFieldApiResponse { private final Optional> account; @@ -382,7 +382,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -393,7 +393,7 @@ public Builder accountingAttachment(Optional> accou } public Builder accountingAttachment(List accountingAttachment) { - this.accountingAttachment = Optional.of(accountingAttachment); + this.accountingAttachment = Optional.ofNullable(accountingAttachment); return this; } @@ -404,7 +404,7 @@ public Builder balanceSheet(Optional> balanceSheet) } public Builder balanceSheet(List balanceSheet) { - this.balanceSheet = Optional.of(balanceSheet); + this.balanceSheet = Optional.ofNullable(balanceSheet); return this; } @@ -415,7 +415,7 @@ public Builder cashFlowStatement(Optional> cashFlow } public Builder cashFlowStatement(List cashFlowStatement) { - this.cashFlowStatement = Optional.of(cashFlowStatement); + this.cashFlowStatement = Optional.ofNullable(cashFlowStatement); return this; } @@ -426,7 +426,7 @@ public Builder companyInfo(Optional> companyInfo) { } public Builder companyInfo(List companyInfo) { - this.companyInfo = Optional.of(companyInfo); + this.companyInfo = Optional.ofNullable(companyInfo); return this; } @@ -437,7 +437,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -448,7 +448,7 @@ public Builder incomeStatement(Optional> incomeStat } public Builder incomeStatement(List incomeStatement) { - this.incomeStatement = Optional.of(incomeStatement); + this.incomeStatement = Optional.ofNullable(incomeStatement); return this; } @@ -459,7 +459,7 @@ public Builder creditNote(Optional> creditNote) { } public Builder creditNote(List creditNote) { - this.creditNote = Optional.of(creditNote); + this.creditNote = Optional.ofNullable(creditNote); return this; } @@ -470,7 +470,7 @@ public Builder item(Optional> item) { } public Builder item(List item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -481,7 +481,7 @@ public Builder purchaseOrder(Optional> purchaseOrde } public Builder purchaseOrder(List purchaseOrder) { - this.purchaseOrder = Optional.of(purchaseOrder); + this.purchaseOrder = Optional.ofNullable(purchaseOrder); return this; } @@ -492,7 +492,7 @@ public Builder trackingCategory(Optional> trackingC } public Builder trackingCategory(List trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -503,7 +503,7 @@ public Builder journalEntry(Optional> journalEntry) } public Builder journalEntry(List journalEntry) { - this.journalEntry = Optional.of(journalEntry); + this.journalEntry = Optional.ofNullable(journalEntry); return this; } @@ -514,7 +514,7 @@ public Builder taxRate(Optional> taxRate) { } public Builder taxRate(List taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -525,7 +525,7 @@ public Builder invoice(Optional> invoice) { } public Builder invoice(List invoice) { - this.invoice = Optional.of(invoice); + this.invoice = Optional.ofNullable(invoice); return this; } @@ -536,7 +536,7 @@ public Builder payment(Optional> payment) { } public Builder payment(List payment) { - this.payment = Optional.of(payment); + this.payment = Optional.ofNullable(payment); return this; } @@ -547,7 +547,7 @@ public Builder expense(Optional> expense) { } public Builder expense(List expense) { - this.expense = Optional.of(expense); + this.expense = Optional.ofNullable(expense); return this; } @@ -558,7 +558,7 @@ public Builder vendorCredit(Optional> vendorCredit) } public Builder vendorCredit(List vendorCredit) { - this.vendorCredit = Optional.of(vendorCredit); + this.vendorCredit = Optional.ofNullable(vendorCredit); return this; } @@ -569,7 +569,7 @@ public Builder transaction(Optional> transaction) { } public Builder transaction(List transaction) { - this.transaction = Optional.of(transaction); + this.transaction = Optional.ofNullable(transaction); return this; } @@ -580,7 +580,7 @@ public Builder accountingPeriod(Optional> accountin } public Builder accountingPeriod(List accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -591,7 +591,7 @@ public Builder generalLedgerTransaction(Optional> g } public Builder generalLedgerTransaction(List generalLedgerTransaction) { - this.generalLedgerTransaction = Optional.of(generalLedgerTransaction); + this.generalLedgerTransaction = Optional.ofNullable(generalLedgerTransaction); return this; } @@ -602,7 +602,7 @@ public Builder bankFeedAccount(Optional> bankFeedAc } public Builder bankFeedAccount(List bankFeedAccount) { - this.bankFeedAccount = Optional.of(bankFeedAccount); + this.bankFeedAccount = Optional.ofNullable(bankFeedAccount); return this; } @@ -613,7 +613,7 @@ public Builder employee(Optional> employee) { } public Builder employee(List employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstance.java b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstance.java index f58c5f404..7d32300b4 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstance.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstance.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstance.Builder.class) public final class FieldMappingApiInstance { private final Optional id; @@ -125,7 +125,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -136,7 +136,7 @@ public Builder isIntegrationWide(Optional isIntegrationWide) { } public Builder isIntegrationWide(Boolean isIntegrationWide) { - this.isIntegrationWide = Optional.of(isIntegrationWide); + this.isIntegrationWide = Optional.ofNullable(isIntegrationWide); return this; } @@ -147,7 +147,7 @@ public Builder targetField(Optional targetFi } public Builder targetField(FieldMappingApiInstanceTargetField targetField) { - this.targetField = Optional.of(targetField); + this.targetField = Optional.ofNullable(targetField); return this; } @@ -158,7 +158,7 @@ public Builder remoteField(Optional remoteFi } public Builder remoteField(FieldMappingApiInstanceRemoteField remoteField) { - this.remoteField = Optional.of(remoteField); + this.remoteField = Optional.ofNullable(remoteField); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.java b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.java index d0f4f3cb4..9ca9a5524 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteField.Builder.class) public final class FieldMappingApiInstanceRemoteField { private final Optional remoteKeyName; @@ -88,7 +89,8 @@ public static RemoteEndpointInfoStage builder() { } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); Builder from(FieldMappingApiInstanceRemoteField other); } @@ -128,14 +130,15 @@ public Builder from(FieldMappingApiInstanceRemoteField other) { @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage schema(Map schema) { - this.schema = Optional.of(schema); + this.schema = Optional.ofNullable(schema); return this; } @@ -148,7 +151,7 @@ public _FinalStage schema(Optional> schema) { @java.lang.Override public _FinalStage remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java index 6683ceb3d..d6b2d33d6 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Builder.class) public final class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { private final Optional method; @@ -114,7 +114,7 @@ public Builder method(Optional method) { } public Builder method(String method) { - this.method = Optional.of(method); + this.method = Optional.ofNullable(method); return this; } @@ -125,7 +125,7 @@ public Builder urlPath(Optional urlPath) { } public Builder urlPath(String urlPath) { - this.urlPath = Optional.of(urlPath); + this.urlPath = Optional.ofNullable(urlPath); return this; } @@ -136,7 +136,7 @@ public Builder fieldTraversalPath(Optional> fieldTraversalPath) { } public Builder fieldTraversalPath(List fieldTraversalPath) { - this.fieldTraversalPath = Optional.of(fieldTraversalPath); + this.fieldTraversalPath = Optional.ofNullable(fieldTraversalPath); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceResponse.java b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceResponse.java index d79c61435..2888091a9 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceResponse.Builder.class) public final class FieldMappingApiInstanceResponse { private final Optional> account; @@ -382,7 +382,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -393,7 +393,7 @@ public Builder accountingAttachment(Optional> acco } public Builder accountingAttachment(List accountingAttachment) { - this.accountingAttachment = Optional.of(accountingAttachment); + this.accountingAttachment = Optional.ofNullable(accountingAttachment); return this; } @@ -404,7 +404,7 @@ public Builder balanceSheet(Optional> balanceSheet } public Builder balanceSheet(List balanceSheet) { - this.balanceSheet = Optional.of(balanceSheet); + this.balanceSheet = Optional.ofNullable(balanceSheet); return this; } @@ -415,7 +415,7 @@ public Builder cashFlowStatement(Optional> cashFlo } public Builder cashFlowStatement(List cashFlowStatement) { - this.cashFlowStatement = Optional.of(cashFlowStatement); + this.cashFlowStatement = Optional.ofNullable(cashFlowStatement); return this; } @@ -426,7 +426,7 @@ public Builder companyInfo(Optional> companyInfo) } public Builder companyInfo(List companyInfo) { - this.companyInfo = Optional.of(companyInfo); + this.companyInfo = Optional.ofNullable(companyInfo); return this; } @@ -437,7 +437,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -448,7 +448,7 @@ public Builder incomeStatement(Optional> incomeSta } public Builder incomeStatement(List incomeStatement) { - this.incomeStatement = Optional.of(incomeStatement); + this.incomeStatement = Optional.ofNullable(incomeStatement); return this; } @@ -459,7 +459,7 @@ public Builder creditNote(Optional> creditNote) { } public Builder creditNote(List creditNote) { - this.creditNote = Optional.of(creditNote); + this.creditNote = Optional.ofNullable(creditNote); return this; } @@ -470,7 +470,7 @@ public Builder item(Optional> item) { } public Builder item(List item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -481,7 +481,7 @@ public Builder purchaseOrder(Optional> purchaseOrd } public Builder purchaseOrder(List purchaseOrder) { - this.purchaseOrder = Optional.of(purchaseOrder); + this.purchaseOrder = Optional.ofNullable(purchaseOrder); return this; } @@ -492,7 +492,7 @@ public Builder trackingCategory(Optional> tracking } public Builder trackingCategory(List trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -503,7 +503,7 @@ public Builder journalEntry(Optional> journalEntry } public Builder journalEntry(List journalEntry) { - this.journalEntry = Optional.of(journalEntry); + this.journalEntry = Optional.ofNullable(journalEntry); return this; } @@ -514,7 +514,7 @@ public Builder taxRate(Optional> taxRate) { } public Builder taxRate(List taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -525,7 +525,7 @@ public Builder invoice(Optional> invoice) { } public Builder invoice(List invoice) { - this.invoice = Optional.of(invoice); + this.invoice = Optional.ofNullable(invoice); return this; } @@ -536,7 +536,7 @@ public Builder payment(Optional> payment) { } public Builder payment(List payment) { - this.payment = Optional.of(payment); + this.payment = Optional.ofNullable(payment); return this; } @@ -547,7 +547,7 @@ public Builder expense(Optional> expense) { } public Builder expense(List expense) { - this.expense = Optional.of(expense); + this.expense = Optional.ofNullable(expense); return this; } @@ -558,7 +558,7 @@ public Builder vendorCredit(Optional> vendorCredit } public Builder vendorCredit(List vendorCredit) { - this.vendorCredit = Optional.of(vendorCredit); + this.vendorCredit = Optional.ofNullable(vendorCredit); return this; } @@ -569,7 +569,7 @@ public Builder transaction(Optional> transaction) } public Builder transaction(List transaction) { - this.transaction = Optional.of(transaction); + this.transaction = Optional.ofNullable(transaction); return this; } @@ -580,7 +580,7 @@ public Builder accountingPeriod(Optional> accounti } public Builder accountingPeriod(List accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -591,7 +591,7 @@ public Builder generalLedgerTransaction(Optional> } public Builder generalLedgerTransaction(List generalLedgerTransaction) { - this.generalLedgerTransaction = Optional.of(generalLedgerTransaction); + this.generalLedgerTransaction = Optional.ofNullable(generalLedgerTransaction); return this; } @@ -602,7 +602,7 @@ public Builder bankFeedAccount(Optional> bankFeedA } public Builder bankFeedAccount(List bankFeedAccount) { - this.bankFeedAccount = Optional.of(bankFeedAccount); + this.bankFeedAccount = Optional.ofNullable(bankFeedAccount); return this; } @@ -613,7 +613,7 @@ public Builder employee(Optional> employee) { } public Builder employee(List employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceTargetField.java b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceTargetField.java index d7028301d..0a67aa14d 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceTargetField.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingApiInstanceTargetField.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceTargetField.Builder.class) public final class FieldMappingApiInstanceTargetField { private final String name; @@ -82,13 +83,13 @@ public static NameStage builder() { } public interface NameStage { - DescriptionStage name(String name); + DescriptionStage name(@NotNull String name); Builder from(FieldMappingApiInstanceTargetField other); } public interface DescriptionStage { - IsOrganizationWideStage description(String description); + IsOrganizationWideStage description(@NotNull String description); } public interface IsOrganizationWideStage { @@ -122,14 +123,14 @@ public Builder from(FieldMappingApiInstanceTargetField other) { @java.lang.Override @JsonSetter("name") - public DescriptionStage name(String name) { + public DescriptionStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("description") - public IsOrganizationWideStage description(String description) { + public IsOrganizationWideStage description(@NotNull String description) { this.description = description; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingInstanceResponse.java b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingInstanceResponse.java index dfdf9dc94..baf5d0c5b 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldMappingInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldMappingInstanceResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingInstanceResponse.Builder.class) public final class FieldMappingInstanceResponse { private final FieldMappingApiInstance model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FieldMappingApiInstance model); + _FinalStage model(@NotNull FieldMappingApiInstance model); Builder from(FieldMappingInstanceResponse other); } @@ -149,14 +150,14 @@ public Builder from(FieldMappingInstanceResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FieldMappingApiInstance model) { + public _FinalStage model(@NotNull FieldMappingApiInstance model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializer.java b/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializer.java index 84de156a9..205c7484c 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializer.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializer.Builder.class) public final class FieldPermissionDeserializer { private final Optional> enabledFields; @@ -100,7 +100,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -111,7 +111,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializerRequest.java index c32ae5a82..9adffd6e1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/FieldPermissionDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializerRequest.Builder.class) public final class FieldPermissionDeserializerRequest { private final Optional> enabledFields; @@ -101,7 +101,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -112,7 +112,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransaction.java b/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransaction.java index 3707db994..9bf7c2de1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransaction.java +++ b/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransaction.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GeneralLedgerTransaction.Builder.class) public final class GeneralLedgerTransaction { private final Optional id; @@ -350,7 +350,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -361,7 +361,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -372,7 +372,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -383,7 +383,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -394,7 +394,7 @@ public Builder underlyingTransactionRemoteId(Optional underlyingTransact } public Builder underlyingTransactionRemoteId(String underlyingTransactionRemoteId) { - this.underlyingTransactionRemoteId = Optional.of(underlyingTransactionRemoteId); + this.underlyingTransactionRemoteId = Optional.ofNullable(underlyingTransactionRemoteId); return this; } @@ -407,7 +407,7 @@ public Builder underlyingTransactionType( public Builder underlyingTransactionType( GeneralLedgerTransactionUnderlyingTransactionType underlyingTransactionType) { - this.underlyingTransactionType = Optional.of(underlyingTransactionType); + this.underlyingTransactionType = Optional.ofNullable(underlyingTransactionType); return this; } @@ -418,7 +418,7 @@ public Builder accountingPeriod(Optional company) { } public Builder company(GeneralLedgerTransactionCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -440,7 +440,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -451,7 +451,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -464,7 +464,7 @@ public Builder trackingCategories( public Builder trackingCategories( List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -475,7 +475,7 @@ public Builder postingDate(Optional postingDate) { } public Builder postingDate(OffsetDateTime postingDate) { - this.postingDate = Optional.of(postingDate); + this.postingDate = Optional.ofNullable(postingDate); return this; } @@ -489,7 +489,7 @@ public Builder generalLedgerTransactionLines( public Builder generalLedgerTransactionLines( List generalLedgerTransactionLines) { - this.generalLedgerTransactionLines = Optional.of(generalLedgerTransactionLines); + this.generalLedgerTransactionLines = Optional.ofNullable(generalLedgerTransactionLines); return this; } @@ -500,7 +500,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -511,7 +511,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -522,7 +522,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransactionLine.java b/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransactionLine.java index c929ae28a..dd95181e1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransactionLine.java +++ b/src/main/java/com/merge/api/resources/accounting/types/GeneralLedgerTransactionLine.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GeneralLedgerTransactionLine.Builder.class) public final class GeneralLedgerTransactionLine { private final Optional id; @@ -922,21 +923,21 @@ public static DebitAmountStage builder() { } public interface DebitAmountStage { - CreditAmountStage debitAmount(String debitAmount); + CreditAmountStage debitAmount(@NotNull String debitAmount); Builder from(GeneralLedgerTransactionLine other); } public interface CreditAmountStage { - ForeignDebitAmountStage creditAmount(String creditAmount); + ForeignDebitAmountStage creditAmount(@NotNull String creditAmount); } public interface ForeignDebitAmountStage { - ForeignCreditAmountStage foreignDebitAmount(String foreignDebitAmount); + ForeignCreditAmountStage foreignDebitAmount(@NotNull String foreignDebitAmount); } public interface ForeignCreditAmountStage { - _FinalStage foreignCreditAmount(String foreignCreditAmount); + _FinalStage foreignCreditAmount(@NotNull String foreignCreditAmount); } public interface _FinalStage { @@ -1086,35 +1087,35 @@ public Builder from(GeneralLedgerTransactionLine other) { @java.lang.Override @JsonSetter("debit_amount") - public CreditAmountStage debitAmount(String debitAmount) { + public CreditAmountStage debitAmount(@NotNull String debitAmount) { this.debitAmount = debitAmount; return this; } @java.lang.Override @JsonSetter("credit_amount") - public ForeignDebitAmountStage creditAmount(String creditAmount) { + public ForeignDebitAmountStage creditAmount(@NotNull String creditAmount) { this.creditAmount = creditAmount; return this; } @java.lang.Override @JsonSetter("foreign_debit_amount") - public ForeignCreditAmountStage foreignDebitAmount(String foreignDebitAmount) { + public ForeignCreditAmountStage foreignDebitAmount(@NotNull String foreignDebitAmount) { this.foreignDebitAmount = foreignDebitAmount; return this; } @java.lang.Override @JsonSetter("foreign_credit_amount") - public _FinalStage foreignCreditAmount(String foreignCreditAmount) { + public _FinalStage foreignCreditAmount(@NotNull String foreignCreditAmount) { this.foreignCreditAmount = foreignCreditAmount; return this; } @java.lang.Override public _FinalStage fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -1131,7 +1132,7 @@ public _FinalStage fieldMappings(Optional> fieldMappings) */ @java.lang.Override public _FinalStage remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -1144,7 +1145,7 @@ public _FinalStage remoteWasDeleted(Optional remoteWasDeleted) { @java.lang.Override public _FinalStage item(GeneralLedgerTransactionLineItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -1157,7 +1158,7 @@ public _FinalStage item(Optional item) { @java.lang.Override public _FinalStage trackingCategories(List trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -1174,7 +1175,7 @@ public _FinalStage trackingCategories(Optional> trackingC */ @java.lang.Override public _FinalStage description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -1191,7 +1192,7 @@ public _FinalStage description(Optional description) { */ @java.lang.Override public _FinalStage exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -1516,7 +1517,7 @@ public _FinalStage exchangeRate(Optional exchangeRate) { */ @java.lang.Override public _FinalStage transactionCurrency(GeneralLedgerTransactionLineTransactionCurrency transactionCurrency) { - this.transactionCurrency = Optional.of(transactionCurrency); + this.transactionCurrency = Optional.ofNullable(transactionCurrency); return this; } @@ -1842,7 +1843,7 @@ public _FinalStage transactionCurrency( */ @java.lang.Override public _FinalStage baseCurrency(GeneralLedgerTransactionLineBaseCurrency baseCurrency) { - this.baseCurrency = Optional.of(baseCurrency); + this.baseCurrency = Optional.ofNullable(baseCurrency); return this; } @@ -1855,7 +1856,7 @@ public _FinalStage baseCurrency(Optional contact @java.lang.Override public _FinalStage employee(GeneralLedgerTransactionLineEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -1885,7 +1886,7 @@ public _FinalStage employee(Optional emplo */ @java.lang.Override public _FinalStage company(GeneralLedgerTransactionLineCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -1898,7 +1899,7 @@ public _FinalStage company(Optional company @java.lang.Override public _FinalStage account(GeneralLedgerTransactionLineAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -1915,7 +1916,7 @@ public _FinalStage account(Optional account */ @java.lang.Override public _FinalStage modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -1932,7 +1933,7 @@ public _FinalStage modifiedAt(Optional modifiedAt) { */ @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -1949,7 +1950,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -1962,7 +1963,7 @@ public _FinalStage remoteId(Optional remoteId) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/IncomeStatement.java b/src/main/java/com/merge/api/resources/accounting/types/IncomeStatement.java index 1d39f8ae5..d9be0bf41 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/IncomeStatement.java +++ b/src/main/java/com/merge/api/resources/accounting/types/IncomeStatement.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IncomeStatement.Builder.class) public final class IncomeStatement { private final Optional id; @@ -686,7 +686,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -697,7 +697,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -708,7 +708,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -719,7 +719,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -730,7 +730,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -741,7 +741,7 @@ public Builder currency(Optional currency) { } public Builder currency(IncomeStatementCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -752,7 +752,7 @@ public Builder company(Optional company) { } public Builder company(IncomeStatementCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -763,7 +763,7 @@ public Builder startPeriod(Optional startPeriod) { } public Builder startPeriod(OffsetDateTime startPeriod) { - this.startPeriod = Optional.of(startPeriod); + this.startPeriod = Optional.ofNullable(startPeriod); return this; } @@ -774,7 +774,7 @@ public Builder endPeriod(Optional endPeriod) { } public Builder endPeriod(OffsetDateTime endPeriod) { - this.endPeriod = Optional.of(endPeriod); + this.endPeriod = Optional.ofNullable(endPeriod); return this; } @@ -785,7 +785,7 @@ public Builder income(Optional> income) { } public Builder income(List income) { - this.income = Optional.of(income); + this.income = Optional.ofNullable(income); return this; } @@ -796,7 +796,7 @@ public Builder costOfSales(Optional> costOfSales) { } public Builder costOfSales(List costOfSales) { - this.costOfSales = Optional.of(costOfSales); + this.costOfSales = Optional.ofNullable(costOfSales); return this; } @@ -807,7 +807,7 @@ public Builder grossProfit(Optional grossProfit) { } public Builder grossProfit(Double grossProfit) { - this.grossProfit = Optional.of(grossProfit); + this.grossProfit = Optional.ofNullable(grossProfit); return this; } @@ -818,7 +818,7 @@ public Builder operatingExpenses(Optional> operatingExpenses) { } public Builder operatingExpenses(List operatingExpenses) { - this.operatingExpenses = Optional.of(operatingExpenses); + this.operatingExpenses = Optional.ofNullable(operatingExpenses); return this; } @@ -829,7 +829,7 @@ public Builder netOperatingIncome(Optional netOperatingIncome) { } public Builder netOperatingIncome(Double netOperatingIncome) { - this.netOperatingIncome = Optional.of(netOperatingIncome); + this.netOperatingIncome = Optional.ofNullable(netOperatingIncome); return this; } @@ -840,7 +840,7 @@ public Builder nonOperatingExpenses(Optional> nonOperatingExpen } public Builder nonOperatingExpenses(List nonOperatingExpenses) { - this.nonOperatingExpenses = Optional.of(nonOperatingExpenses); + this.nonOperatingExpenses = Optional.ofNullable(nonOperatingExpenses); return this; } @@ -851,7 +851,7 @@ public Builder netIncome(Optional netIncome) { } public Builder netIncome(Double netIncome) { - this.netIncome = Optional.of(netIncome); + this.netIncome = Optional.ofNullable(netIncome); return this; } @@ -862,7 +862,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -873,7 +873,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -884,7 +884,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.java b/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.java index 8f5f66423..107c20ffe 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.java +++ b/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializer.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializer.Builder.class) public final class IndividualCommonModelScopeDeserializer { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializer other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializer other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializer fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional fieldP @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.java index ac0264ac0..a7480a755 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/IndividualCommonModelScopeDeserializerRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializerRequest.Builder.class) public final class IndividualCommonModelScopeDeserializerRequest { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializerRequest other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializerRequest other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializerRequest fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Invoice.java b/src/main/java/com/merge/api/resources/accounting/types/Invoice.java index c8cbbb46f..20dde74cb 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Invoice.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Invoice.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Invoice.Builder.class) public final class Invoice { private final Optional id; @@ -970,7 +970,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -981,7 +981,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -992,7 +992,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -1003,7 +1003,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -1014,7 +1014,7 @@ public Builder type(Optional type) { } public Builder type(InvoiceType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -1025,7 +1025,7 @@ public Builder contact(Optional contact) { } public Builder contact(InvoiceContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -1036,7 +1036,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -1047,7 +1047,7 @@ public Builder issueDate(Optional issueDate) { } public Builder issueDate(OffsetDateTime issueDate) { - this.issueDate = Optional.of(issueDate); + this.issueDate = Optional.ofNullable(issueDate); return this; } @@ -1058,7 +1058,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -1069,7 +1069,7 @@ public Builder paidOnDate(Optional paidOnDate) { } public Builder paidOnDate(OffsetDateTime paidOnDate) { - this.paidOnDate = Optional.of(paidOnDate); + this.paidOnDate = Optional.ofNullable(paidOnDate); return this; } @@ -1080,7 +1080,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -1091,7 +1091,7 @@ public Builder company(Optional company) { } public Builder company(InvoiceCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -1102,7 +1102,7 @@ public Builder employee(Optional employee) { } public Builder employee(InvoiceEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -1113,7 +1113,7 @@ public Builder currency(Optional currency) { } public Builder currency(InvoiceCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -1124,7 +1124,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -1135,7 +1135,7 @@ public Builder totalDiscount(Optional totalDiscount) { } public Builder totalDiscount(Double totalDiscount) { - this.totalDiscount = Optional.of(totalDiscount); + this.totalDiscount = Optional.ofNullable(totalDiscount); return this; } @@ -1146,7 +1146,7 @@ public Builder subTotal(Optional subTotal) { } public Builder subTotal(Double subTotal) { - this.subTotal = Optional.of(subTotal); + this.subTotal = Optional.ofNullable(subTotal); return this; } @@ -1157,7 +1157,7 @@ public Builder status(Optional status) { } public Builder status(InvoiceStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -1168,7 +1168,7 @@ public Builder totalTaxAmount(Optional totalTaxAmount) { } public Builder totalTaxAmount(Double totalTaxAmount) { - this.totalTaxAmount = Optional.of(totalTaxAmount); + this.totalTaxAmount = Optional.ofNullable(totalTaxAmount); return this; } @@ -1179,7 +1179,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -1190,7 +1190,7 @@ public Builder balance(Optional balance) { } public Builder balance(Double balance) { - this.balance = Optional.of(balance); + this.balance = Optional.ofNullable(balance); return this; } @@ -1201,7 +1201,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -1212,7 +1212,7 @@ public Builder trackingCategories(Optional> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -1223,7 +1223,7 @@ public Builder accountingPeriod(Optional accountingPeri } public Builder accountingPeriod(InvoiceAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -1234,7 +1234,7 @@ public Builder purchaseOrders(Optional> } public Builder purchaseOrders(List> purchaseOrders) { - this.purchaseOrders = Optional.of(purchaseOrders); + this.purchaseOrders = Optional.ofNullable(purchaseOrders); return this; } @@ -1245,7 +1245,7 @@ public Builder payments(Optional>> payments) } public Builder payments(List> payments) { - this.payments = Optional.of(payments); + this.payments = Optional.ofNullable(payments); return this; } @@ -1256,7 +1256,7 @@ public Builder appliedPayments(Optional> appliedPayments) { - this.appliedPayments = Optional.of(appliedPayments); + this.appliedPayments = Optional.ofNullable(appliedPayments); return this; } @@ -1267,7 +1267,7 @@ public Builder lineItems(Optional> lineItems) { } public Builder lineItems(List lineItems) { - this.lineItems = Optional.of(lineItems); + this.lineItems = Optional.ofNullable(lineItems); return this; } @@ -1278,7 +1278,7 @@ public Builder appliedCreditNotes(Optional> } public Builder appliedCreditNotes(List appliedCreditNotes) { - this.appliedCreditNotes = Optional.of(appliedCreditNotes); + this.appliedCreditNotes = Optional.ofNullable(appliedCreditNotes); return this; } @@ -1289,7 +1289,7 @@ public Builder appliedVendorCredits(Optional appliedVendorCredits) { - this.appliedVendorCredits = Optional.of(appliedVendorCredits); + this.appliedVendorCredits = Optional.ofNullable(appliedVendorCredits); return this; } @@ -1300,7 +1300,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -1311,7 +1311,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -1322,7 +1322,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -1333,7 +1333,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -1344,7 +1344,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItem.java b/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItem.java index da8799ed5..8a4571e27 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItem.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoiceLineItem.Builder.class) public final class InvoiceLineItem { private final Optional id; @@ -706,7 +706,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -717,7 +717,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -728,7 +728,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -739,7 +739,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -750,7 +750,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -761,7 +761,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(Double unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -772,7 +772,7 @@ public Builder quantity(Optional quantity) { } public Builder quantity(Double quantity) { - this.quantity = Optional.of(quantity); + this.quantity = Optional.ofNullable(quantity); return this; } @@ -783,7 +783,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -794,7 +794,7 @@ public Builder employee(Optional employee) { } public Builder employee(InvoiceLineItemEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -805,7 +805,7 @@ public Builder currency(Optional currency) { } public Builder currency(InvoiceLineItemCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -816,7 +816,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -827,7 +827,7 @@ public Builder item(Optional item) { } public Builder item(InvoiceLineItemItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -838,7 +838,7 @@ public Builder account(Optional account) { } public Builder account(InvoiceLineItemAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -849,7 +849,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -860,7 +860,7 @@ public Builder trackingCategory(Optional tracki } public Builder trackingCategory(InvoiceLineItemTrackingCategory trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -872,7 +872,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -883,7 +883,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -894,7 +894,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -905,7 +905,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -916,7 +916,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItemRequest.java b/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItemRequest.java index 54fbf7057..23a54607d 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItemRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/InvoiceLineItemRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoiceLineItemRequest.Builder.class) public final class InvoiceLineItemRequest { private final Optional remoteId; @@ -655,7 +655,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -666,7 +666,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -677,7 +677,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(Double unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -688,7 +688,7 @@ public Builder quantity(Optional quantity) { } public Builder quantity(Double quantity) { - this.quantity = Optional.of(quantity); + this.quantity = Optional.ofNullable(quantity); return this; } @@ -699,7 +699,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -710,7 +710,7 @@ public Builder employee(Optional employee) { } public Builder employee(InvoiceLineItemRequestEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -721,7 +721,7 @@ public Builder currency(Optional currency) { } public Builder currency(InvoiceLineItemRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -732,7 +732,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -743,7 +743,7 @@ public Builder item(Optional item) { } public Builder item(InvoiceLineItemRequestItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -754,7 +754,7 @@ public Builder account(Optional account) { } public Builder account(InvoiceLineItemRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -765,7 +765,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -776,7 +776,7 @@ public Builder trackingCategory(Optional } public Builder trackingCategory(InvoiceLineItemRequestTrackingCategory trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -789,7 +789,7 @@ public Builder trackingCategories( public Builder trackingCategories( List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -800,7 +800,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -811,7 +811,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -822,7 +822,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -833,7 +833,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/InvoiceRequest.java b/src/main/java/com/merge/api/resources/accounting/types/InvoiceRequest.java index e8c1825f9..75f95574b 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/InvoiceRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/InvoiceRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoiceRequest.Builder.class) public final class InvoiceRequest { private final Optional type; @@ -803,7 +803,7 @@ public Builder type(Optional type) { } public Builder type(InvoiceRequestType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -814,7 +814,7 @@ public Builder contact(Optional contact) { } public Builder contact(InvoiceRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -825,7 +825,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -836,7 +836,7 @@ public Builder issueDate(Optional issueDate) { } public Builder issueDate(OffsetDateTime issueDate) { - this.issueDate = Optional.of(issueDate); + this.issueDate = Optional.ofNullable(issueDate); return this; } @@ -847,7 +847,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -858,7 +858,7 @@ public Builder paidOnDate(Optional paidOnDate) { } public Builder paidOnDate(OffsetDateTime paidOnDate) { - this.paidOnDate = Optional.of(paidOnDate); + this.paidOnDate = Optional.ofNullable(paidOnDate); return this; } @@ -869,7 +869,7 @@ public Builder employee(Optional employee) { } public Builder employee(InvoiceRequestEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -880,7 +880,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -891,7 +891,7 @@ public Builder status(Optional status) { } public Builder status(InvoiceRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -902,7 +902,7 @@ public Builder company(Optional company) { } public Builder company(InvoiceRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -913,7 +913,7 @@ public Builder currency(Optional currency) { } public Builder currency(InvoiceRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -924,7 +924,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -935,7 +935,7 @@ public Builder totalDiscount(Optional totalDiscount) { } public Builder totalDiscount(Double totalDiscount) { - this.totalDiscount = Optional.of(totalDiscount); + this.totalDiscount = Optional.ofNullable(totalDiscount); return this; } @@ -946,7 +946,7 @@ public Builder subTotal(Optional subTotal) { } public Builder subTotal(Double subTotal) { - this.subTotal = Optional.of(subTotal); + this.subTotal = Optional.ofNullable(subTotal); return this; } @@ -957,7 +957,7 @@ public Builder totalTaxAmount(Optional totalTaxAmount) { } public Builder totalTaxAmount(Double totalTaxAmount) { - this.totalTaxAmount = Optional.of(totalTaxAmount); + this.totalTaxAmount = Optional.ofNullable(totalTaxAmount); return this; } @@ -968,7 +968,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -979,7 +979,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -990,7 +990,7 @@ public Builder balance(Optional balance) { } public Builder balance(Double balance) { - this.balance = Optional.of(balance); + this.balance = Optional.ofNullable(balance); return this; } @@ -1001,7 +1001,7 @@ public Builder payments(Optional>> pay } public Builder payments(List> payments) { - this.payments = Optional.of(payments); + this.payments = Optional.ofNullable(payments); return this; } @@ -1013,7 +1013,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -1024,7 +1024,7 @@ public Builder lineItems(Optional> lineItems) { } public Builder lineItems(List lineItems) { - this.lineItems = Optional.of(lineItems); + this.lineItems = Optional.ofNullable(lineItems); return this; } @@ -1035,7 +1035,7 @@ public Builder purchaseOrders(Optional> purchaseOrders) { - this.purchaseOrders = Optional.of(purchaseOrders); + this.purchaseOrders = Optional.ofNullable(purchaseOrders); return this; } @@ -1046,7 +1046,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -1057,7 +1057,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -1068,7 +1068,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/InvoiceResponse.java b/src/main/java/com/merge/api/resources/accounting/types/InvoiceResponse.java index 49069279a..a099e4439 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/InvoiceResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/InvoiceResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InvoiceResponse.Builder.class) public final class InvoiceResponse { private final Invoice model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Invoice model); + _FinalStage model(@NotNull Invoice model); Builder from(InvoiceResponse other); } @@ -149,14 +150,14 @@ public Builder from(InvoiceResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Invoice model) { + public _FinalStage model(@NotNull Invoice model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Issue.java b/src/main/java/com/merge/api/resources/accounting/types/Issue.java index 79ec1e17a..380d42135 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Issue.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Issue.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Issue.Builder.class) public final class Issue { private final Optional id; @@ -154,7 +155,7 @@ public static ErrorDescriptionStage builder() { } public interface ErrorDescriptionStage { - _FinalStage errorDescription(String errorDescription); + _FinalStage errorDescription(@NotNull String errorDescription); Builder from(Issue other); } @@ -229,14 +230,14 @@ public Builder from(Issue other) { @java.lang.Override @JsonSetter("error_description") - public _FinalStage errorDescription(String errorDescription) { + public _FinalStage errorDescription(@NotNull String errorDescription) { this.errorDescription = errorDescription; return this; } @java.lang.Override public _FinalStage errorDetails(List errorDetails) { - this.errorDetails = Optional.of(errorDetails); + this.errorDetails = Optional.ofNullable(errorDetails); return this; } @@ -249,7 +250,7 @@ public _FinalStage errorDetails(Optional> errorDetails) { @java.lang.Override public _FinalStage isMuted(Boolean isMuted) { - this.isMuted = Optional.of(isMuted); + this.isMuted = Optional.ofNullable(isMuted); return this; } @@ -262,7 +263,7 @@ public _FinalStage isMuted(Optional isMuted) { @java.lang.Override public _FinalStage lastIncidentTime(OffsetDateTime lastIncidentTime) { - this.lastIncidentTime = Optional.of(lastIncidentTime); + this.lastIncidentTime = Optional.ofNullable(lastIncidentTime); return this; } @@ -275,7 +276,7 @@ public _FinalStage lastIncidentTime(Optional lastIncidentTime) { @java.lang.Override public _FinalStage firstIncidentTime(OffsetDateTime firstIncidentTime) { - this.firstIncidentTime = Optional.of(firstIncidentTime); + this.firstIncidentTime = Optional.ofNullable(firstIncidentTime); return this; } @@ -288,7 +289,7 @@ public _FinalStage firstIncidentTime(Optional firstIncidentTime) @java.lang.Override public _FinalStage endUser(Map endUser) { - this.endUser = Optional.of(endUser); + this.endUser = Optional.ofNullable(endUser); return this; } @@ -309,7 +310,7 @@ public _FinalStage endUser(Optional> endUser) { */ @java.lang.Override public _FinalStage status(IssueStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -322,7 +323,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Item.java b/src/main/java/com/merge/api/resources/accounting/types/Item.java index 90c58716c..6371309fe 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Item.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Item.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Item.Builder.class) public final class Item { private final Optional id; @@ -360,7 +360,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -382,7 +382,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -393,7 +393,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -404,7 +404,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -415,7 +415,7 @@ public Builder status(Optional status) { } public Builder status(ItemStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -426,7 +426,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(Double unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -437,7 +437,7 @@ public Builder purchasePrice(Optional purchasePrice) { } public Builder purchasePrice(Double purchasePrice) { - this.purchasePrice = Optional.of(purchasePrice); + this.purchasePrice = Optional.ofNullable(purchasePrice); return this; } @@ -448,7 +448,7 @@ public Builder purchaseAccount(Optional purchaseAccount) { } public Builder purchaseAccount(ItemPurchaseAccount purchaseAccount) { - this.purchaseAccount = Optional.of(purchaseAccount); + this.purchaseAccount = Optional.ofNullable(purchaseAccount); return this; } @@ -459,7 +459,7 @@ public Builder salesAccount(Optional salesAccount) { } public Builder salesAccount(ItemSalesAccount salesAccount) { - this.salesAccount = Optional.of(salesAccount); + this.salesAccount = Optional.ofNullable(salesAccount); return this; } @@ -470,7 +470,7 @@ public Builder company(Optional company) { } public Builder company(ItemCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -481,7 +481,7 @@ public Builder purchaseTaxRate(Optional purchaseTaxRate) { } public Builder purchaseTaxRate(ItemPurchaseTaxRate purchaseTaxRate) { - this.purchaseTaxRate = Optional.of(purchaseTaxRate); + this.purchaseTaxRate = Optional.ofNullable(purchaseTaxRate); return this; } @@ -492,7 +492,7 @@ public Builder salesTaxRate(Optional salesTaxRate) { } public Builder salesTaxRate(ItemSalesTaxRate salesTaxRate) { - this.salesTaxRate = Optional.of(salesTaxRate); + this.salesTaxRate = Optional.ofNullable(salesTaxRate); return this; } @@ -503,7 +503,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -514,7 +514,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -525,7 +525,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -536,7 +536,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ItemSchema.java b/src/main/java/com/merge/api/resources/accounting/types/ItemSchema.java index 6c41dde6d..cc278b8a5 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ItemSchema.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ItemSchema.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ItemSchema.Builder.class) public final class ItemSchema { private final Optional itemType; @@ -113,7 +113,7 @@ public Builder itemType(Optional itemType) { } public Builder itemType(ItemTypeEnum itemType) { - this.itemType = Optional.of(itemType); + this.itemType = Optional.ofNullable(itemType); return this; } @@ -124,7 +124,7 @@ public Builder itemFormat(Optional itemFormat) { } public Builder itemFormat(ItemFormatEnum itemFormat) { - this.itemFormat = Optional.of(itemFormat); + this.itemFormat = Optional.ofNullable(itemFormat); return this; } @@ -135,7 +135,7 @@ public Builder itemChoices(Optional> itemChoices) { } public Builder itemChoices(List itemChoices) { - this.itemChoices = Optional.of(itemChoices); + this.itemChoices = Optional.ofNullable(itemChoices); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/JournalEntry.java b/src/main/java/com/merge/api/resources/accounting/types/JournalEntry.java index 531db805d..9f95858e4 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/JournalEntry.java +++ b/src/main/java/com/merge/api/resources/accounting/types/JournalEntry.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntry.Builder.class) public final class JournalEntry { private final Optional id; @@ -761,7 +761,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -772,7 +772,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -783,7 +783,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -794,7 +794,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -805,7 +805,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -816,7 +816,7 @@ public Builder payments(Optional>> payme } public Builder payments(List> payments) { - this.payments = Optional.of(payments); + this.payments = Optional.ofNullable(payments); return this; } @@ -827,7 +827,7 @@ public Builder appliedPayments(Optional> appliedPayments) { - this.appliedPayments = Optional.of(appliedPayments); + this.appliedPayments = Optional.ofNullable(appliedPayments); return this; } @@ -838,7 +838,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -849,7 +849,7 @@ public Builder currency(Optional currency) { } public Builder currency(JournalEntryCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -860,7 +860,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -871,7 +871,7 @@ public Builder company(Optional company) { } public Builder company(JournalEntryCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -882,7 +882,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -893,7 +893,7 @@ public Builder lines(Optional> lines) { } public Builder lines(List lines) { - this.lines = Optional.of(lines); + this.lines = Optional.ofNullable(lines); return this; } @@ -904,7 +904,7 @@ public Builder journalNumber(Optional journalNumber) { } public Builder journalNumber(String journalNumber) { - this.journalNumber = Optional.of(journalNumber); + this.journalNumber = Optional.ofNullable(journalNumber); return this; } @@ -916,7 +916,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -927,7 +927,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -938,7 +938,7 @@ public Builder postingStatus(Optional postingStatus) } public Builder postingStatus(JournalEntryPostingStatus postingStatus) { - this.postingStatus = Optional.of(postingStatus); + this.postingStatus = Optional.ofNullable(postingStatus); return this; } @@ -949,7 +949,7 @@ public Builder accountingPeriod(Optional accountin } public Builder accountingPeriod(JournalEntryAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -960,7 +960,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -971,7 +971,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -982,7 +982,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -993,7 +993,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -1004,7 +1004,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/JournalEntryRequest.java b/src/main/java/com/merge/api/resources/accounting/types/JournalEntryRequest.java index 1adc3997b..ac43bbd64 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/JournalEntryRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/JournalEntryRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntryRequest.Builder.class) public final class JournalEntryRequest { private final Optional transactionDate; @@ -612,7 +612,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -623,7 +623,7 @@ public Builder payments(Optional> } public Builder payments(List> payments) { - this.payments = Optional.of(payments); + this.payments = Optional.ofNullable(payments); return this; } @@ -634,7 +634,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -645,7 +645,7 @@ public Builder currency(Optional currency) { } public Builder currency(JournalEntryRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -656,7 +656,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -667,7 +667,7 @@ public Builder company(Optional company) { } public Builder company(JournalEntryRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -680,7 +680,7 @@ public Builder trackingCategories( public Builder trackingCategories( List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -691,7 +691,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -702,7 +702,7 @@ public Builder lines(Optional> lines) { } public Builder lines(List lines) { - this.lines = Optional.of(lines); + this.lines = Optional.ofNullable(lines); return this; } @@ -713,7 +713,7 @@ public Builder journalNumber(Optional journalNumber) { } public Builder journalNumber(String journalNumber) { - this.journalNumber = Optional.of(journalNumber); + this.journalNumber = Optional.ofNullable(journalNumber); return this; } @@ -724,7 +724,7 @@ public Builder postingStatus(Optional postingS } public Builder postingStatus(JournalEntryRequestPostingStatus postingStatus) { - this.postingStatus = Optional.of(postingStatus); + this.postingStatus = Optional.ofNullable(postingStatus); return this; } @@ -735,7 +735,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -746,7 +746,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -757,7 +757,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/JournalEntryResponse.java b/src/main/java/com/merge/api/resources/accounting/types/JournalEntryResponse.java index 177185f7d..f613f9873 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/JournalEntryResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/JournalEntryResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalEntryResponse.Builder.class) public final class JournalEntryResponse { private final JournalEntry model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(JournalEntry model); + _FinalStage model(@NotNull JournalEntry model); Builder from(JournalEntryResponse other); } @@ -149,14 +150,14 @@ public Builder from(JournalEntryResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(JournalEntry model) { + public _FinalStage model(@NotNull JournalEntry model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/JournalLine.java b/src/main/java/com/merge/api/resources/accounting/types/JournalLine.java index fedcfa90e..ea624c181 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/JournalLine.java +++ b/src/main/java/com/merge/api/resources/accounting/types/JournalLine.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalLine.Builder.class) public final class JournalLine { private final Optional id; @@ -654,7 +654,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -665,7 +665,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -676,7 +676,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -687,7 +687,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -698,7 +698,7 @@ public Builder account(Optional account) { } public Builder account(JournalLineAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -709,7 +709,7 @@ public Builder netAmount(Optional netAmount) { } public Builder netAmount(Double netAmount) { - this.netAmount = Optional.of(netAmount); + this.netAmount = Optional.ofNullable(netAmount); return this; } @@ -720,7 +720,7 @@ public Builder trackingCategory(Optional trackingCa } public Builder trackingCategory(JournalLineTrackingCategory trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -732,7 +732,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -743,7 +743,7 @@ public Builder currency(Optional currency) { } public Builder currency(JournalLineCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -754,7 +754,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -765,7 +765,7 @@ public Builder employee(Optional employee) { } public Builder employee(String employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -776,7 +776,7 @@ public Builder contact(Optional contact) { } public Builder contact(String contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -787,7 +787,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -798,7 +798,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -809,7 +809,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -820,7 +820,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -831,7 +831,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/JournalLineRequest.java b/src/main/java/com/merge/api/resources/accounting/types/JournalLineRequest.java index 2566de0ba..40bb844a1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/JournalLineRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/JournalLineRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JournalLineRequest.Builder.class) public final class JournalLineRequest { private final Optional remoteId; @@ -618,7 +618,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -629,7 +629,7 @@ public Builder account(Optional account) { } public Builder account(JournalLineRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -640,7 +640,7 @@ public Builder netAmount(Optional netAmount) { } public Builder netAmount(Double netAmount) { - this.netAmount = Optional.of(netAmount); + this.netAmount = Optional.ofNullable(netAmount); return this; } @@ -651,7 +651,7 @@ public Builder trackingCategory(Optional tra } public Builder trackingCategory(JournalLineRequestTrackingCategory trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -663,7 +663,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -674,7 +674,7 @@ public Builder currency(Optional currency) { } public Builder currency(JournalLineRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -685,7 +685,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -696,7 +696,7 @@ public Builder employee(Optional employee) { } public Builder employee(String employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -707,7 +707,7 @@ public Builder contact(Optional contact) { } public Builder contact(String contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -718,7 +718,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -729,7 +729,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -740,7 +740,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -751,7 +751,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -762,7 +762,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -773,7 +773,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/LinkToken.java b/src/main/java/com/merge/api/resources/accounting/types/LinkToken.java index 697935971..435eb572a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/LinkToken.java +++ b/src/main/java/com/merge/api/resources/accounting/types/LinkToken.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkToken.Builder.class) public final class LinkToken { private final String linkToken; @@ -86,7 +87,7 @@ public static LinkTokenStage builder() { } public interface LinkTokenStage { - _FinalStage linkToken(String linkToken); + _FinalStage linkToken(@NotNull String linkToken); Builder from(LinkToken other); } @@ -126,14 +127,14 @@ public Builder from(LinkToken other) { @java.lang.Override @JsonSetter("link_token") - public _FinalStage linkToken(String linkToken) { + public _FinalStage linkToken(@NotNull String linkToken) { this.linkToken = linkToken; return this; } @java.lang.Override public _FinalStage magicLinkUrl(String magicLinkUrl) { - this.magicLinkUrl = Optional.of(magicLinkUrl); + this.magicLinkUrl = Optional.ofNullable(magicLinkUrl); return this; } @@ -146,7 +147,7 @@ public _FinalStage magicLinkUrl(Optional magicLinkUrl) { @java.lang.Override public _FinalStage integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/LinkedAccountStatus.java b/src/main/java/com/merge/api/resources/accounting/types/LinkedAccountStatus.java index 36d9f7608..a195bee17 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/LinkedAccountStatus.java +++ b/src/main/java/com/merge/api/resources/accounting/types/LinkedAccountStatus.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountStatus.Builder.class) public final class LinkedAccountStatus { private final String linkedAccountStatus; @@ -71,7 +72,7 @@ public static LinkedAccountStatusStage builder() { } public interface LinkedAccountStatusStage { - CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus); + CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus); Builder from(LinkedAccountStatus other); } @@ -104,7 +105,7 @@ public Builder from(LinkedAccountStatus other) { @java.lang.Override @JsonSetter("linked_account_status") - public CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus) { + public CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus) { this.linkedAccountStatus = linkedAccountStatus; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/MetaResponse.java b/src/main/java/com/merge/api/resources/accounting/types/MetaResponse.java index c8a946965..9c93a961b 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/MetaResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/MetaResponse.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MetaResponse.Builder.class) public final class MetaResponse { private final Map requestSchema; @@ -184,7 +184,7 @@ public _FinalStage hasRequiredLinkedAccountParams(boolean hasRequiredLinkedAccou @java.lang.Override public _FinalStage status(LinkedAccountStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -197,7 +197,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage remoteFieldClasses(Map remoteFieldClasses) { - this.remoteFieldClasses = Optional.of(remoteFieldClasses); + this.remoteFieldClasses = Optional.ofNullable(remoteFieldClasses); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ModelOperation.java b/src/main/java/com/merge/api/resources/accounting/types/ModelOperation.java index 231c876cb..d9d3a6a36 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ModelOperation.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ModelOperation.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelOperation.Builder.class) public final class ModelOperation { private final String modelName; @@ -98,7 +99,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(ModelOperation other); } @@ -151,7 +152,7 @@ public Builder from(ModelOperation other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializer.java b/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializer.java index cc9606b46..f4cde24c4 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializer.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializer.Builder.class) public final class ModelPermissionDeserializer { private final Optional isEnabled; @@ -84,7 +84,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializerRequest.java index 52e80d6e8..b06e84942 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ModelPermissionDeserializerRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializerRequest.Builder.class) public final class ModelPermissionDeserializerRequest { private final Optional isEnabled; @@ -85,7 +85,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/resources/accounting/types/MultipartFormFieldRequest.java index e8a22e23b..3d8afe414 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/MultipartFormFieldRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MultipartFormFieldRequest.Builder.class) public final class MultipartFormFieldRequest { private final String name; @@ -126,13 +127,13 @@ public static NameStage builder() { } public interface NameStage { - DataStage name(String name); + DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { - _FinalStage data(String data); + _FinalStage data(@NotNull String data); } public interface _FinalStage { @@ -184,7 +185,7 @@ public Builder from(MultipartFormFieldRequest other) { */ @java.lang.Override @JsonSetter("name") - public DataStage name(String name) { + public DataStage name(@NotNull String name) { this.name = name; return this; } @@ -195,7 +196,7 @@ public DataStage name(String name) { */ @java.lang.Override @JsonSetter("data") - public _FinalStage data(String data) { + public _FinalStage data(@NotNull String data) { this.data = data; return this; } @@ -206,7 +207,7 @@ public _FinalStage data(String data) { */ @java.lang.Override public _FinalStage contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -223,7 +224,7 @@ public _FinalStage contentType(Optional contentType) { */ @java.lang.Override public _FinalStage fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -245,7 +246,7 @@ public _FinalStage fileName(Optional fileName) { */ @java.lang.Override public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { - this.encoding = Optional.of(encoding); + this.encoding = Optional.ofNullable(encoding); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.java index fffd43660..4673137bf 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountDetailsAndActionsList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountDetailsAndActionsList.Builder.class) public final class PaginatedAccountDetailsAndActionsList { private final Optional next; @@ -112,7 +112,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -123,7 +123,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -134,7 +134,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountList.java index 3a5958c80..a40e25c77 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountList.Builder.class) public final class PaginatedAccountList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingAttachmentList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingAttachmentList.java index 40ee2d6f7..232da42b9 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingAttachmentList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingAttachmentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountingAttachmentList.Builder.class) public final class PaginatedAccountingAttachmentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingPeriodList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingPeriodList.java index 329769897..844b047ad 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingPeriodList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAccountingPeriodList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountingPeriodList.Builder.class) public final class PaginatedAccountingPeriodList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAuditLogEventList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAuditLogEventList.java index d36f5dd9e..c253317ec 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedAuditLogEventList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedAuditLogEventList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAuditLogEventList.Builder.class) public final class PaginatedAuditLogEventList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedBalanceSheetList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedBalanceSheetList.java index 705a5f3d2..302877405 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedBalanceSheetList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedBalanceSheetList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedBalanceSheetList.Builder.class) public final class PaginatedBalanceSheetList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedAccountList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedAccountList.java index 3cb4313e0..64b14f36e 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedAccountList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedAccountList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedBankFeedAccountList.Builder.class) public final class PaginatedBankFeedAccountList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedTransactionList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedTransactionList.java index 48ebf092e..906a64d86 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedTransactionList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedBankFeedTransactionList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedBankFeedTransactionList.Builder.class) public final class PaginatedBankFeedTransactionList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedCashFlowStatementList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedCashFlowStatementList.java index f21fe19db..fe38803b1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedCashFlowStatementList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedCashFlowStatementList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCashFlowStatementList.Builder.class) public final class PaginatedCashFlowStatementList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedCompanyInfoList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedCompanyInfoList.java index c65ecab93..f54121a67 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedCompanyInfoList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedCompanyInfoList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCompanyInfoList.Builder.class) public final class PaginatedCompanyInfoList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedContactList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedContactList.java index cd44b51ee..a5334d7f5 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedContactList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedContactList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedContactList.Builder.class) public final class PaginatedContactList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedCreditNoteList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedCreditNoteList.java index 7a5e24213..cf4884b88 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedCreditNoteList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedCreditNoteList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCreditNoteList.Builder.class) public final class PaginatedCreditNoteList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedEmployeeList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedEmployeeList.java index be936fb3e..02bed49f9 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedEmployeeList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedEmployeeList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEmployeeList.Builder.class) public final class PaginatedEmployeeList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedExpenseList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedExpenseList.java index f67a8e758..b3c4f6aa6 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedExpenseList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedExpenseList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedExpenseList.Builder.class) public final class PaginatedExpenseList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedGeneralLedgerTransactionList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedGeneralLedgerTransactionList.java index 563e1002e..e1ecb6352 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedGeneralLedgerTransactionList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedGeneralLedgerTransactionList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedGeneralLedgerTransactionList.Builder.class) public final class PaginatedGeneralLedgerTransactionList { private final Optional next; @@ -112,7 +112,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -123,7 +123,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -134,7 +134,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedIncomeStatementList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedIncomeStatementList.java index 52b5b74fc..4d4d5570d 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedIncomeStatementList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedIncomeStatementList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedIncomeStatementList.Builder.class) public final class PaginatedIncomeStatementList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedInvoiceList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedInvoiceList.java index db602ac6a..f7ae030af 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedInvoiceList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedInvoiceList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedInvoiceList.Builder.class) public final class PaginatedInvoiceList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedIssueList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedIssueList.java index bcba24f4a..23b4bc584 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedIssueList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedIssueList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedIssueList.Builder.class) public final class PaginatedIssueList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedItemList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedItemList.java index 653e4b667..f8b064cf3 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedItemList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedItemList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedItemList.Builder.class) public final class PaginatedItemList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedJournalEntryList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedJournalEntryList.java index 6d7b06291..57cb99dbf 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedJournalEntryList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedJournalEntryList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedJournalEntryList.Builder.class) public final class PaginatedJournalEntryList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedPaymentList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedPaymentList.java index 6c8da411f..0a2928603 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedPaymentList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedPaymentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedPaymentList.Builder.class) public final class PaginatedPaymentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedPurchaseOrderList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedPurchaseOrderList.java index e7cb32105..6824b75e5 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedPurchaseOrderList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedPurchaseOrderList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedPurchaseOrderList.Builder.class) public final class PaginatedPurchaseOrderList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedRemoteFieldClassList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedRemoteFieldClassList.java index 6739ae4d6..92b6d9936 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedRemoteFieldClassList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedRemoteFieldClassList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedRemoteFieldClassList.Builder.class) public final class PaginatedRemoteFieldClassList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedSyncStatusList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedSyncStatusList.java index 649a1920d..9e4aaa526 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedSyncStatusList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedSyncStatusList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedSyncStatusList.Builder.class) public final class PaginatedSyncStatusList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedTaxRateList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedTaxRateList.java index f01e678ff..aab33892b 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedTaxRateList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedTaxRateList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTaxRateList.Builder.class) public final class PaginatedTaxRateList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedTrackingCategoryList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedTrackingCategoryList.java index 27581d246..2af161033 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedTrackingCategoryList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedTrackingCategoryList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTrackingCategoryList.Builder.class) public final class PaginatedTrackingCategoryList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedTransactionList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedTransactionList.java index 1bfee85b4..161711986 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedTransactionList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedTransactionList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTransactionList.Builder.class) public final class PaginatedTransactionList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaginatedVendorCreditList.java b/src/main/java/com/merge/api/resources/accounting/types/PaginatedVendorCreditList.java index cf7901d0a..f6f98b618 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaginatedVendorCreditList.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaginatedVendorCreditList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedVendorCreditList.Builder.class) public final class PaginatedVendorCreditList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PatchedPaymentRequest.java b/src/main/java/com/merge/api/resources/accounting/types/PatchedPaymentRequest.java index 944d4fb95..c0995751f 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PatchedPaymentRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PatchedPaymentRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedPaymentRequest.Builder.class) public final class PatchedPaymentRequest { private final Optional transactionDate; @@ -615,7 +615,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -626,7 +626,7 @@ public Builder contact(Optional contact) { } public Builder contact(PatchedPaymentRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -637,7 +637,7 @@ public Builder account(Optional account) { } public Builder account(PatchedPaymentRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -648,7 +648,7 @@ public Builder currency(Optional currency) { } public Builder currency(PatchedPaymentRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -659,7 +659,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -670,7 +670,7 @@ public Builder company(Optional company) { } public Builder company(PatchedPaymentRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -681,7 +681,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -692,7 +692,7 @@ public Builder type(Optional type) { } public Builder type(PatchedPaymentRequestType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -705,7 +705,7 @@ public Builder trackingCategories( public Builder trackingCategories( List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -716,7 +716,7 @@ public Builder accountingPeriod(Optional } public Builder accountingPeriod(PatchedPaymentRequestAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -727,7 +727,7 @@ public Builder appliedToLines(Optional appliedToLines) { - this.appliedToLines = Optional.of(appliedToLines); + this.appliedToLines = Optional.ofNullable(appliedToLines); return this; } @@ -738,7 +738,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -749,7 +749,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -760,7 +760,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Payment.java b/src/main/java/com/merge/api/resources/accounting/types/Payment.java index e6dfec67e..61a786e14 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Payment.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Payment.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Payment.Builder.class) public final class Payment { private final Optional id; @@ -713,7 +713,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -724,7 +724,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -735,7 +735,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -746,7 +746,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -757,7 +757,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -768,7 +768,7 @@ public Builder contact(Optional contact) { } public Builder contact(PaymentContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -779,7 +779,7 @@ public Builder account(Optional account) { } public Builder account(PaymentAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -790,7 +790,7 @@ public Builder currency(Optional currency) { } public Builder currency(PaymentCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -801,7 +801,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -812,7 +812,7 @@ public Builder company(Optional company) { } public Builder company(PaymentCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -823,7 +823,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -834,7 +834,7 @@ public Builder type(Optional type) { } public Builder type(PaymentType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -845,7 +845,7 @@ public Builder trackingCategories(Optional> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -856,7 +856,7 @@ public Builder accountingPeriod(Optional accountingPeri } public Builder accountingPeriod(PaymentAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -867,7 +867,7 @@ public Builder appliedToLines(Optional> appliedT } public Builder appliedToLines(List appliedToLines) { - this.appliedToLines = Optional.of(appliedToLines); + this.appliedToLines = Optional.ofNullable(appliedToLines); return this; } @@ -878,7 +878,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -889,7 +889,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -900,7 +900,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -911,7 +911,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -922,7 +922,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItem.java b/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItem.java index 64bc2d617..0b7fafa1e 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItem.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentLineItem.Builder.class) public final class PaymentLineItem { private final Optional id; @@ -207,7 +207,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -218,7 +218,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -229,7 +229,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -240,7 +240,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -251,7 +251,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -262,7 +262,7 @@ public Builder appliedDate(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -273,7 +273,7 @@ public Builder relatedObjectId(Optional relatedObjectId) { } public Builder relatedObjectId(String relatedObjectId) { - this.relatedObjectId = Optional.of(relatedObjectId); + this.relatedObjectId = Optional.ofNullable(relatedObjectId); return this; } @@ -284,7 +284,7 @@ public Builder relatedObjectType(Optional relatedObjectType) { } public Builder relatedObjectType(String relatedObjectType) { - this.relatedObjectType = Optional.of(relatedObjectType); + this.relatedObjectType = Optional.ofNullable(relatedObjectType); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItemRequest.java b/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItemRequest.java index a9df98160..1a97f75ac 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItemRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaymentLineItemRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentLineItemRequest.Builder.class) public final class PaymentLineItemRequest { private final Optional remoteId; @@ -203,7 +203,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -214,7 +214,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -225,7 +225,7 @@ public Builder appliedDate(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -236,7 +236,7 @@ public Builder relatedObjectId(Optional relatedObjectId) { } public Builder relatedObjectId(String relatedObjectId) { - this.relatedObjectId = Optional.of(relatedObjectId); + this.relatedObjectId = Optional.ofNullable(relatedObjectId); return this; } @@ -247,7 +247,7 @@ public Builder relatedObjectType(Optional relatedObjectType) { } public Builder relatedObjectType(String relatedObjectType) { - this.relatedObjectType = Optional.of(relatedObjectType); + this.relatedObjectType = Optional.ofNullable(relatedObjectType); return this; } @@ -258,7 +258,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -269,7 +269,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -280,7 +280,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaymentRequest.java b/src/main/java/com/merge/api/resources/accounting/types/PaymentRequest.java index 59a0eed7e..2862d6ffe 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaymentRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaymentRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentRequest.Builder.class) public final class PaymentRequest { private final Optional transactionDate; @@ -614,7 +614,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -625,7 +625,7 @@ public Builder contact(Optional contact) { } public Builder contact(PaymentRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -636,7 +636,7 @@ public Builder account(Optional account) { } public Builder account(PaymentRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -647,7 +647,7 @@ public Builder currency(Optional currency) { } public Builder currency(PaymentRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -658,7 +658,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -669,7 +669,7 @@ public Builder company(Optional company) { } public Builder company(PaymentRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -680,7 +680,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -691,7 +691,7 @@ public Builder type(Optional type) { } public Builder type(PaymentRequestType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -703,7 +703,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -714,7 +714,7 @@ public Builder accountingPeriod(Optional account } public Builder accountingPeriod(PaymentRequestAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -725,7 +725,7 @@ public Builder appliedToLines(Optional> a } public Builder appliedToLines(List appliedToLines) { - this.appliedToLines = Optional.of(appliedToLines); + this.appliedToLines = Optional.ofNullable(appliedToLines); return this; } @@ -736,7 +736,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -747,7 +747,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -758,7 +758,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PaymentResponse.java b/src/main/java/com/merge/api/resources/accounting/types/PaymentResponse.java index ba361e60d..7cb4ed9d1 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PaymentResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PaymentResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaymentResponse.Builder.class) public final class PaymentResponse { private final Payment model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Payment model); + _FinalStage model(@NotNull Payment model); Builder from(PaymentResponse other); } @@ -149,14 +150,14 @@ public Builder from(PaymentResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Payment model) { + public _FinalStage model(@NotNull Payment model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrder.java b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrder.java index 88fe65c01..bbdf7c3f3 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrder.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrder.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrder.Builder.class) public final class PurchaseOrder { private final Optional id; @@ -815,7 +815,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -826,7 +826,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -837,7 +837,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -848,7 +848,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -859,7 +859,7 @@ public Builder status(Optional status) { } public Builder status(PurchaseOrderStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -870,7 +870,7 @@ public Builder issueDate(Optional issueDate) { } public Builder issueDate(OffsetDateTime issueDate) { - this.issueDate = Optional.of(issueDate); + this.issueDate = Optional.ofNullable(issueDate); return this; } @@ -881,7 +881,7 @@ public Builder purchaseOrderNumber(Optional purchaseOrderNumber) { } public Builder purchaseOrderNumber(String purchaseOrderNumber) { - this.purchaseOrderNumber = Optional.of(purchaseOrderNumber); + this.purchaseOrderNumber = Optional.ofNullable(purchaseOrderNumber); return this; } @@ -892,7 +892,7 @@ public Builder deliveryDate(Optional deliveryDate) { } public Builder deliveryDate(OffsetDateTime deliveryDate) { - this.deliveryDate = Optional.of(deliveryDate); + this.deliveryDate = Optional.ofNullable(deliveryDate); return this; } @@ -903,7 +903,7 @@ public Builder deliveryAddress(Optional deliveryAd } public Builder deliveryAddress(PurchaseOrderDeliveryAddress deliveryAddress) { - this.deliveryAddress = Optional.of(deliveryAddress); + this.deliveryAddress = Optional.ofNullable(deliveryAddress); return this; } @@ -914,7 +914,7 @@ public Builder customer(Optional customer) { } public Builder customer(String customer) { - this.customer = Optional.of(customer); + this.customer = Optional.ofNullable(customer); return this; } @@ -925,7 +925,7 @@ public Builder vendor(Optional vendor) { } public Builder vendor(PurchaseOrderVendor vendor) { - this.vendor = Optional.of(vendor); + this.vendor = Optional.ofNullable(vendor); return this; } @@ -936,7 +936,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -947,7 +947,7 @@ public Builder company(Optional company) { } public Builder company(PurchaseOrderCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -958,7 +958,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -969,7 +969,7 @@ public Builder currency(Optional currency) { } public Builder currency(PurchaseOrderCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -980,7 +980,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -991,7 +991,7 @@ public Builder lineItems(Optional> lineItems) { } public Builder lineItems(List lineItems) { - this.lineItems = Optional.of(lineItems); + this.lineItems = Optional.ofNullable(lineItems); return this; } @@ -1002,7 +1002,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -1014,7 +1014,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -1025,7 +1025,7 @@ public Builder accountingPeriod(Optional accounti } public Builder accountingPeriod(PurchaseOrderAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -1036,7 +1036,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -1047,7 +1047,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -1058,7 +1058,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -1069,7 +1069,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -1080,7 +1080,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -1091,7 +1091,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItem.java b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItem.java index 8501dfb00..2577514fe 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItem.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrderLineItem.Builder.class) public final class PurchaseOrderLineItem { private final Optional id; @@ -697,7 +697,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -708,7 +708,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -719,7 +719,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -730,7 +730,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -741,7 +741,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -752,7 +752,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(Double unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -763,7 +763,7 @@ public Builder quantity(Optional quantity) { } public Builder quantity(Double quantity) { - this.quantity = Optional.of(quantity); + this.quantity = Optional.ofNullable(quantity); return this; } @@ -774,7 +774,7 @@ public Builder item(Optional item) { } public Builder item(PurchaseOrderLineItemItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -785,7 +785,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -796,7 +796,7 @@ public Builder trackingCategory(Optional trackingCategory) { } public Builder trackingCategory(String trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -807,7 +807,7 @@ public Builder trackingCategories(Optional>> trackingCateg } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -818,7 +818,7 @@ public Builder taxAmount(Optional taxAmount) { } public Builder taxAmount(String taxAmount) { - this.taxAmount = Optional.of(taxAmount); + this.taxAmount = Optional.ofNullable(taxAmount); return this; } @@ -829,7 +829,7 @@ public Builder totalLineAmount(Optional totalLineAmount) { } public Builder totalLineAmount(String totalLineAmount) { - this.totalLineAmount = Optional.of(totalLineAmount); + this.totalLineAmount = Optional.ofNullable(totalLineAmount); return this; } @@ -840,7 +840,7 @@ public Builder currency(Optional currency) { } public Builder currency(PurchaseOrderLineItemCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -851,7 +851,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -862,7 +862,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -873,7 +873,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -884,7 +884,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -895,7 +895,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItemRequest.java b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItemRequest.java index d146f212d..7729fb6b6 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItemRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderLineItemRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrderLineItemRequest.Builder.class) public final class PurchaseOrderLineItemRequest { private final Optional remoteId; @@ -660,7 +660,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -671,7 +671,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -682,7 +682,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(Double unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -693,7 +693,7 @@ public Builder quantity(Optional quantity) { } public Builder quantity(Double quantity) { - this.quantity = Optional.of(quantity); + this.quantity = Optional.ofNullable(quantity); return this; } @@ -704,7 +704,7 @@ public Builder item(Optional item) { } public Builder item(PurchaseOrderLineItemRequestItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -715,7 +715,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -726,7 +726,7 @@ public Builder trackingCategory(Optional trackingCategory) { } public Builder trackingCategory(String trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -737,7 +737,7 @@ public Builder trackingCategories(Optional>> trackingCateg } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -748,7 +748,7 @@ public Builder taxAmount(Optional taxAmount) { } public Builder taxAmount(String taxAmount) { - this.taxAmount = Optional.of(taxAmount); + this.taxAmount = Optional.ofNullable(taxAmount); return this; } @@ -759,7 +759,7 @@ public Builder totalLineAmount(Optional totalLineAmount) { } public Builder totalLineAmount(String totalLineAmount) { - this.totalLineAmount = Optional.of(totalLineAmount); + this.totalLineAmount = Optional.ofNullable(totalLineAmount); return this; } @@ -770,7 +770,7 @@ public Builder currency(Optional currency) } public Builder currency(PurchaseOrderLineItemRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -781,7 +781,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -792,7 +792,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -803,7 +803,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -814,7 +814,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -825,7 +825,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -836,7 +836,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderRequest.java b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderRequest.java index 70044f76e..db2131866 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrderRequest.Builder.class) public final class PurchaseOrderRequest { private final Optional status; @@ -666,7 +666,7 @@ public Builder status(Optional status) { } public Builder status(PurchaseOrderRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -677,7 +677,7 @@ public Builder issueDate(Optional issueDate) { } public Builder issueDate(OffsetDateTime issueDate) { - this.issueDate = Optional.of(issueDate); + this.issueDate = Optional.ofNullable(issueDate); return this; } @@ -688,7 +688,7 @@ public Builder deliveryDate(Optional deliveryDate) { } public Builder deliveryDate(OffsetDateTime deliveryDate) { - this.deliveryDate = Optional.of(deliveryDate); + this.deliveryDate = Optional.ofNullable(deliveryDate); return this; } @@ -699,7 +699,7 @@ public Builder deliveryAddress(Optional del } public Builder deliveryAddress(PurchaseOrderRequestDeliveryAddress deliveryAddress) { - this.deliveryAddress = Optional.of(deliveryAddress); + this.deliveryAddress = Optional.ofNullable(deliveryAddress); return this; } @@ -710,7 +710,7 @@ public Builder customer(Optional customer) { } public Builder customer(String customer) { - this.customer = Optional.of(customer); + this.customer = Optional.ofNullable(customer); return this; } @@ -721,7 +721,7 @@ public Builder vendor(Optional vendor) { } public Builder vendor(PurchaseOrderRequestVendor vendor) { - this.vendor = Optional.of(vendor); + this.vendor = Optional.ofNullable(vendor); return this; } @@ -732,7 +732,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -743,7 +743,7 @@ public Builder company(Optional company) { } public Builder company(PurchaseOrderRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -754,7 +754,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -765,7 +765,7 @@ public Builder currency(Optional currency) { } public Builder currency(PurchaseOrderRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -776,7 +776,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -787,7 +787,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -800,7 +800,7 @@ public Builder trackingCategories( public Builder trackingCategories( List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -811,7 +811,7 @@ public Builder lineItems(Optional> lineItems) } public Builder lineItems(List lineItems) { - this.lineItems = Optional.of(lineItems); + this.lineItems = Optional.ofNullable(lineItems); return this; } @@ -822,7 +822,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -833,7 +833,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -844,7 +844,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderResponse.java b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderResponse.java index 1cbb0a8f6..a9ec3c52c 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/PurchaseOrderResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PurchaseOrderResponse.Builder.class) public final class PurchaseOrderResponse { private final PurchaseOrder model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PurchaseOrder model); + _FinalStage model(@NotNull PurchaseOrder model); Builder from(PurchaseOrderResponse other); } @@ -149,14 +150,14 @@ public Builder from(PurchaseOrderResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PurchaseOrder model) { + public _FinalStage model(@NotNull PurchaseOrder model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteData.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteData.java index 98d72c6da..cea015def 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteData.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteData.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteData.Builder.class) public final class RemoteData { private final String path; @@ -76,7 +77,7 @@ public static PathStage builder() { } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); Builder from(RemoteData other); } @@ -113,14 +114,14 @@ public Builder from(RemoteData other) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @java.lang.Override public _FinalStage data(JsonNode data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteEndpointInfo.java index 06edf4f99..d74da50c4 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteEndpointInfo.java @@ -18,8 +18,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteEndpointInfo.Builder.class) public final class RemoteEndpointInfo { private final String method; @@ -88,13 +89,13 @@ public static MethodStage builder() { } public interface MethodStage { - UrlPathStage method(String method); + UrlPathStage method(@NotNull String method); Builder from(RemoteEndpointInfo other); } public interface UrlPathStage { - _FinalStage urlPath(String urlPath); + _FinalStage urlPath(@NotNull String urlPath); } public interface _FinalStage { @@ -130,14 +131,14 @@ public Builder from(RemoteEndpointInfo other) { @java.lang.Override @JsonSetter("method") - public UrlPathStage method(String method) { + public UrlPathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("url_path") - public _FinalStage urlPath(String urlPath) { + public _FinalStage urlPath(@NotNull String urlPath) { this.urlPath = urlPath; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteField.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteField.java index 0502f5e42..eb532fd60 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteField.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteField.Builder.class) public final class RemoteField { private final RemoteFieldClass remoteFieldClass; @@ -76,7 +77,7 @@ public static RemoteFieldClassStage builder() { } public interface RemoteFieldClassStage { - _FinalStage remoteFieldClass(RemoteFieldClass remoteFieldClass); + _FinalStage remoteFieldClass(@NotNull RemoteFieldClass remoteFieldClass); Builder from(RemoteField other); } @@ -109,14 +110,14 @@ public Builder from(RemoteField other) { @java.lang.Override @JsonSetter("remote_field_class") - public _FinalStage remoteFieldClass(RemoteFieldClass remoteFieldClass) { + public _FinalStage remoteFieldClass(@NotNull RemoteFieldClass remoteFieldClass) { this.remoteFieldClass = remoteFieldClass; return this; } @java.lang.Override public _FinalStage value(Map value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApi.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApi.java index 9746eac1a..cae2d9ed6 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApi.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApi.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApi.Builder.class) public final class RemoteFieldApi { private final Map schema; @@ -125,13 +126,13 @@ public static RemoteKeyNameStage builder() { } public interface RemoteKeyNameStage { - RemoteEndpointInfoStage remoteKeyName(String remoteKeyName); + RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName); Builder from(RemoteFieldApi other); } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo); } public interface _FinalStage { @@ -188,21 +189,21 @@ public Builder from(RemoteFieldApi other) { @java.lang.Override @JsonSetter("remote_key_name") - public RemoteEndpointInfoStage remoteKeyName(String remoteKeyName) { + public RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName) { this.remoteKeyName = remoteKeyName; return this; } @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage coverage(RemoteFieldApiCoverage coverage) { - this.coverage = Optional.of(coverage); + this.coverage = Optional.ofNullable(coverage); return this; } @@ -215,7 +216,7 @@ public _FinalStage coverage(Optional coverage) { @java.lang.Override public _FinalStage advancedMetadata(AdvancedMetadata advancedMetadata) { - this.advancedMetadata = Optional.of(advancedMetadata); + this.advancedMetadata = Optional.ofNullable(advancedMetadata); return this; } @@ -228,7 +229,7 @@ public _FinalStage advancedMetadata(Optional advancedMetadata) @java.lang.Override public _FinalStage exampleValues(List exampleValues) { - this.exampleValues = Optional.of(exampleValues); + this.exampleValues = Optional.ofNullable(exampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApiResponse.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApiResponse.java index 62bc6a09f..9cab949ae 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApiResponse.Builder.class) public final class RemoteFieldApiResponse { private final Optional> account; @@ -382,7 +382,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -393,7 +393,7 @@ public Builder accountingAttachment(Optional> accountingAtt } public Builder accountingAttachment(List accountingAttachment) { - this.accountingAttachment = Optional.of(accountingAttachment); + this.accountingAttachment = Optional.ofNullable(accountingAttachment); return this; } @@ -404,7 +404,7 @@ public Builder balanceSheet(Optional> balanceSheet) { } public Builder balanceSheet(List balanceSheet) { - this.balanceSheet = Optional.of(balanceSheet); + this.balanceSheet = Optional.ofNullable(balanceSheet); return this; } @@ -415,7 +415,7 @@ public Builder cashFlowStatement(Optional> cashFlowStatemen } public Builder cashFlowStatement(List cashFlowStatement) { - this.cashFlowStatement = Optional.of(cashFlowStatement); + this.cashFlowStatement = Optional.ofNullable(cashFlowStatement); return this; } @@ -426,7 +426,7 @@ public Builder companyInfo(Optional> companyInfo) { } public Builder companyInfo(List companyInfo) { - this.companyInfo = Optional.of(companyInfo); + this.companyInfo = Optional.ofNullable(companyInfo); return this; } @@ -437,7 +437,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -448,7 +448,7 @@ public Builder incomeStatement(Optional> incomeStatement) { } public Builder incomeStatement(List incomeStatement) { - this.incomeStatement = Optional.of(incomeStatement); + this.incomeStatement = Optional.ofNullable(incomeStatement); return this; } @@ -459,7 +459,7 @@ public Builder creditNote(Optional> creditNote) { } public Builder creditNote(List creditNote) { - this.creditNote = Optional.of(creditNote); + this.creditNote = Optional.ofNullable(creditNote); return this; } @@ -470,7 +470,7 @@ public Builder item(Optional> item) { } public Builder item(List item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -481,7 +481,7 @@ public Builder purchaseOrder(Optional> purchaseOrder) { } public Builder purchaseOrder(List purchaseOrder) { - this.purchaseOrder = Optional.of(purchaseOrder); + this.purchaseOrder = Optional.ofNullable(purchaseOrder); return this; } @@ -492,7 +492,7 @@ public Builder trackingCategory(Optional> trackingCategory) } public Builder trackingCategory(List trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -503,7 +503,7 @@ public Builder journalEntry(Optional> journalEntry) { } public Builder journalEntry(List journalEntry) { - this.journalEntry = Optional.of(journalEntry); + this.journalEntry = Optional.ofNullable(journalEntry); return this; } @@ -514,7 +514,7 @@ public Builder taxRate(Optional> taxRate) { } public Builder taxRate(List taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -525,7 +525,7 @@ public Builder invoice(Optional> invoice) { } public Builder invoice(List invoice) { - this.invoice = Optional.of(invoice); + this.invoice = Optional.ofNullable(invoice); return this; } @@ -536,7 +536,7 @@ public Builder payment(Optional> payment) { } public Builder payment(List payment) { - this.payment = Optional.of(payment); + this.payment = Optional.ofNullable(payment); return this; } @@ -547,7 +547,7 @@ public Builder expense(Optional> expense) { } public Builder expense(List expense) { - this.expense = Optional.of(expense); + this.expense = Optional.ofNullable(expense); return this; } @@ -558,7 +558,7 @@ public Builder vendorCredit(Optional> vendorCredit) { } public Builder vendorCredit(List vendorCredit) { - this.vendorCredit = Optional.of(vendorCredit); + this.vendorCredit = Optional.ofNullable(vendorCredit); return this; } @@ -569,7 +569,7 @@ public Builder transaction(Optional> transaction) { } public Builder transaction(List transaction) { - this.transaction = Optional.of(transaction); + this.transaction = Optional.ofNullable(transaction); return this; } @@ -580,7 +580,7 @@ public Builder accountingPeriod(Optional> accountingPeriod) } public Builder accountingPeriod(List accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -591,7 +591,7 @@ public Builder generalLedgerTransaction(Optional> generalLe } public Builder generalLedgerTransaction(List generalLedgerTransaction) { - this.generalLedgerTransaction = Optional.of(generalLedgerTransaction); + this.generalLedgerTransaction = Optional.ofNullable(generalLedgerTransaction); return this; } @@ -602,7 +602,7 @@ public Builder bankFeedAccount(Optional> bankFeedAccount) { } public Builder bankFeedAccount(List bankFeedAccount) { - this.bankFeedAccount = Optional.of(bankFeedAccount); + this.bankFeedAccount = Optional.ofNullable(bankFeedAccount); return this; } @@ -613,7 +613,7 @@ public Builder employee(Optional> employee) { } public Builder employee(List employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldClass.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldClass.java index d34b6d7d4..d065290ef 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldClass.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldClass.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldClass.Builder.class) public final class RemoteFieldClass { private final Optional id; @@ -214,7 +214,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -225,7 +225,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } @@ -236,7 +236,7 @@ public Builder remoteKeyName(Optional remoteKeyName) { } public Builder remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } @@ -247,7 +247,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -258,7 +258,7 @@ public Builder isCustom(Optional isCustom) { } public Builder isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -269,7 +269,7 @@ public Builder isRequired(Optional isRequired) { } public Builder isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -280,7 +280,7 @@ public Builder fieldType(Optional fieldType) { } public Builder fieldType(FieldTypeEnum fieldType) { - this.fieldType = Optional.of(fieldType); + this.fieldType = Optional.ofNullable(fieldType); return this; } @@ -291,7 +291,7 @@ public Builder fieldFormat(Optional fieldFormat) { } public Builder fieldFormat(FieldFormatEnum fieldFormat) { - this.fieldFormat = Optional.of(fieldFormat); + this.fieldFormat = Optional.ofNullable(fieldFormat); return this; } @@ -302,7 +302,7 @@ public Builder fieldChoices(Optional> fieldChoices) { } public Builder fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -313,7 +313,7 @@ public Builder itemSchema(Optional itemSchema) { } public Builder itemSchema(ItemSchema itemSchema) { - this.itemSchema = Optional.of(itemSchema); + this.itemSchema = Optional.ofNullable(itemSchema); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldRequest.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldRequest.java index 6bbc8c2b6..fe2e8f4da 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteFieldRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldRequest.Builder.class) public final class RemoteFieldRequest { private final RemoteFieldRequestRemoteFieldClass remoteFieldClass; @@ -76,7 +77,7 @@ public static RemoteFieldClassStage builder() { } public interface RemoteFieldClassStage { - _FinalStage remoteFieldClass(RemoteFieldRequestRemoteFieldClass remoteFieldClass); + _FinalStage remoteFieldClass(@NotNull RemoteFieldRequestRemoteFieldClass remoteFieldClass); Builder from(RemoteFieldRequest other); } @@ -109,14 +110,14 @@ public Builder from(RemoteFieldRequest other) { @java.lang.Override @JsonSetter("remote_field_class") - public _FinalStage remoteFieldClass(RemoteFieldRequestRemoteFieldClass remoteFieldClass) { + public _FinalStage remoteFieldClass(@NotNull RemoteFieldRequestRemoteFieldClass remoteFieldClass) { this.remoteFieldClass = remoteFieldClass; return this; } @java.lang.Override public _FinalStage value(JsonNode value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteKey.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteKey.java index f52c5c929..2d84f1ec3 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteKey.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteKey.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKey.Builder.class) public final class RemoteKey { private final String name; @@ -70,13 +71,13 @@ public static NameStage builder() { } public interface NameStage { - KeyStage name(String name); + KeyStage name(@NotNull String name); Builder from(RemoteKey other); } public interface KeyStage { - _FinalStage key(String key); + _FinalStage key(@NotNull String key); } public interface _FinalStage { @@ -103,14 +104,14 @@ public Builder from(RemoteKey other) { @java.lang.Override @JsonSetter("name") - public KeyStage name(String name) { + public KeyStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("key") - public _FinalStage key(String key) { + public _FinalStage key(@NotNull String key) { this.key = key; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/RemoteResponse.java b/src/main/java/com/merge/api/resources/accounting/types/RemoteResponse.java index 8dbd748ca..7e137405e 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/RemoteResponse.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteResponse.Builder.class) public final class RemoteResponse { private final String method; @@ -134,13 +135,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(String method); + PathStage method(@NotNull String method); Builder from(RemoteResponse other); } public interface PathStage { - StatusStage path(String path); + StatusStage path(@NotNull String path); } public interface StatusStage { @@ -148,7 +149,7 @@ public interface StatusStage { } public interface ResponseStage { - _FinalStage response(JsonNode response); + _FinalStage response(@NotNull JsonNode response); } public interface _FinalStage { @@ -202,14 +203,14 @@ public Builder from(RemoteResponse other) { @java.lang.Override @JsonSetter("method") - public PathStage method(String method) { + public PathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("path") - public StatusStage path(String path) { + public StatusStage path(@NotNull String path) { this.path = path; return this; } @@ -223,14 +224,14 @@ public ResponseStage status(int status) { @java.lang.Override @JsonSetter("response") - public _FinalStage response(JsonNode response) { + public _FinalStage response(@NotNull JsonNode response) { this.response = response; return this; } @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -243,7 +244,7 @@ public _FinalStage headers(Optional> headers) { @java.lang.Override public _FinalStage responseType(ResponseTypeEnum responseType) { - this.responseType = Optional.of(responseType); + this.responseType = Optional.ofNullable(responseType); return this; } @@ -256,7 +257,7 @@ public _FinalStage responseType(Optional responseType) { @java.lang.Override public _FinalStage responseHeaders(Map responseHeaders) { - this.responseHeaders = Optional.of(responseHeaders); + this.responseHeaders = Optional.ofNullable(responseHeaders); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ReportItem.java b/src/main/java/com/merge/api/resources/accounting/types/ReportItem.java index 0a52c483d..8dd7dc03a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ReportItem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ReportItem.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ReportItem.Builder.class) public final class ReportItem { private final Optional remoteId; @@ -209,7 +209,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -220,7 +220,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -231,7 +231,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -242,7 +242,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -253,7 +253,7 @@ public Builder value(Optional value) { } public Builder value(Double value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -264,7 +264,7 @@ public Builder subItems(Optional>> subItems) { } public Builder subItems(List> subItems) { - this.subItems = Optional.of(subItems); + this.subItems = Optional.ofNullable(subItems); return this; } @@ -275,7 +275,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -286,7 +286,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/SyncStatus.java b/src/main/java/com/merge/api/resources/accounting/types/SyncStatus.java index 59f08a954..df51b5798 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/SyncStatus.java +++ b/src/main/java/com/merge/api/resources/accounting/types/SyncStatus.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatus.Builder.class) public final class SyncStatus { private final String modelName; @@ -134,17 +135,17 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - ModelIdStage modelName(String modelName); + ModelIdStage modelName(@NotNull String modelName); Builder from(SyncStatus other); } public interface ModelIdStage { - StatusStage modelId(String modelId); + StatusStage modelId(@NotNull String modelId); } public interface StatusStage { - IsInitialSyncStage status(SyncStatusStatusEnum status); + IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status); } public interface IsInitialSyncStage { @@ -205,21 +206,21 @@ public Builder from(SyncStatus other) { @java.lang.Override @JsonSetter("model_name") - public ModelIdStage modelName(String modelName) { + public ModelIdStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override @JsonSetter("model_id") - public StatusStage modelId(String modelId) { + public StatusStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(SyncStatusStatusEnum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status) { this.status = status; return this; } @@ -234,7 +235,7 @@ public _FinalStage isInitialSync(boolean isInitialSync) { @java.lang.Override public _FinalStage selectiveSyncConfigurationsUsage( SelectiveSyncConfigurationsUsageEnum selectiveSyncConfigurationsUsage) { - this.selectiveSyncConfigurationsUsage = Optional.of(selectiveSyncConfigurationsUsage); + this.selectiveSyncConfigurationsUsage = Optional.ofNullable(selectiveSyncConfigurationsUsage); return this; } @@ -248,7 +249,7 @@ public _FinalStage selectiveSyncConfigurationsUsage( @java.lang.Override public _FinalStage nextSyncStart(OffsetDateTime nextSyncStart) { - this.nextSyncStart = Optional.of(nextSyncStart); + this.nextSyncStart = Optional.ofNullable(nextSyncStart); return this; } @@ -261,7 +262,7 @@ public _FinalStage nextSyncStart(Optional nextSyncStart) { @java.lang.Override public _FinalStage lastSyncStart(OffsetDateTime lastSyncStart) { - this.lastSyncStart = Optional.of(lastSyncStart); + this.lastSyncStart = Optional.ofNullable(lastSyncStart); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/TaxComponent.java b/src/main/java/com/merge/api/resources/accounting/types/TaxComponent.java index 42f24b6bb..72c5b4be6 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/TaxComponent.java +++ b/src/main/java/com/merge/api/resources/accounting/types/TaxComponent.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TaxComponent.Builder.class) public final class TaxComponent { private final Optional id; @@ -228,7 +228,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -239,7 +239,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -250,7 +250,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -261,7 +261,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -272,7 +272,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -283,7 +283,7 @@ public Builder rate(Optional rate) { } public Builder rate(String rate) { - this.rate = Optional.of(rate); + this.rate = Optional.ofNullable(rate); return this; } @@ -294,7 +294,7 @@ public Builder isCompound(Optional isCompound) { } public Builder isCompound(Boolean isCompound) { - this.isCompound = Optional.of(isCompound); + this.isCompound = Optional.ofNullable(isCompound); return this; } @@ -305,7 +305,7 @@ public Builder componentType(Optional componentType) } public Builder componentType(TaxComponentComponentType componentType) { - this.componentType = Optional.of(componentType); + this.componentType = Optional.ofNullable(componentType); return this; } @@ -316,7 +316,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/TaxRate.java b/src/main/java/com/merge/api/resources/accounting/types/TaxRate.java index 88634ecb8..67362252a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/TaxRate.java +++ b/src/main/java/com/merge/api/resources/accounting/types/TaxRate.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TaxRate.Builder.class) public final class TaxRate { private final Optional id; @@ -343,7 +343,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -354,7 +354,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -365,7 +365,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -376,7 +376,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -387,7 +387,7 @@ public Builder company(Optional company) { } public Builder company(TaxRateCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -398,7 +398,7 @@ public Builder code(Optional code) { } public Builder code(String code) { - this.code = Optional.of(code); + this.code = Optional.ofNullable(code); return this; } @@ -409,7 +409,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -420,7 +420,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -431,7 +431,7 @@ public Builder status(Optional status) { } public Builder status(TaxRateStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -442,7 +442,7 @@ public Builder country(Optional country) { } public Builder country(String country) { - this.country = Optional.of(country); + this.country = Optional.ofNullable(country); return this; } @@ -453,7 +453,7 @@ public Builder totalTaxRate(Optional totalTaxRate) { } public Builder totalTaxRate(Double totalTaxRate) { - this.totalTaxRate = Optional.of(totalTaxRate); + this.totalTaxRate = Optional.ofNullable(totalTaxRate); return this; } @@ -464,7 +464,7 @@ public Builder effectiveTaxRate(Optional effectiveTaxRate) { } public Builder effectiveTaxRate(Double effectiveTaxRate) { - this.effectiveTaxRate = Optional.of(effectiveTaxRate); + this.effectiveTaxRate = Optional.ofNullable(effectiveTaxRate); return this; } @@ -475,7 +475,7 @@ public Builder taxComponents(Optional> taxCompone } public Builder taxComponents(List taxComponents) { - this.taxComponents = Optional.of(taxComponents); + this.taxComponents = Optional.ofNullable(taxComponents); return this; } @@ -486,7 +486,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -497,7 +497,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -508,7 +508,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/TrackingCategory.java b/src/main/java/com/merge/api/resources/accounting/types/TrackingCategory.java index 5abac5dbc..c0583385a 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/TrackingCategory.java +++ b/src/main/java/com/merge/api/resources/accounting/types/TrackingCategory.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TrackingCategory.Builder.class) public final class TrackingCategory { private final Optional id; @@ -261,7 +261,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -272,7 +272,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -283,7 +283,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -294,7 +294,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -305,7 +305,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -316,7 +316,7 @@ public Builder status(Optional status) { } public Builder status(TrackingCategoryStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -327,7 +327,7 @@ public Builder categoryType(Optional categoryType) } public Builder categoryType(TrackingCategoryCategoryType categoryType) { - this.categoryType = Optional.of(categoryType); + this.categoryType = Optional.ofNullable(categoryType); return this; } @@ -338,7 +338,7 @@ public Builder parentCategory(Optional parentCategory) { } public Builder parentCategory(String parentCategory) { - this.parentCategory = Optional.of(parentCategory); + this.parentCategory = Optional.ofNullable(parentCategory); return this; } @@ -349,7 +349,7 @@ public Builder company(Optional company) { } public Builder company(TrackingCategoryCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -360,7 +360,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -371,7 +371,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/Transaction.java b/src/main/java/com/merge/api/resources/accounting/types/Transaction.java index e6a02049b..ac5ca3814 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/Transaction.java +++ b/src/main/java/com/merge/api/resources/accounting/types/Transaction.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Transaction.Builder.class) public final class Transaction { private final Optional id; @@ -709,7 +709,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -720,7 +720,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -731,7 +731,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -742,7 +742,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -753,7 +753,7 @@ public Builder transactionType(Optional transactionType) { } public Builder transactionType(String transactionType) { - this.transactionType = Optional.of(transactionType); + this.transactionType = Optional.ofNullable(transactionType); return this; } @@ -764,7 +764,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -775,7 +775,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -786,7 +786,7 @@ public Builder account(Optional account) { } public Builder account(TransactionAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -797,7 +797,7 @@ public Builder contact(Optional contact) { } public Builder contact(TransactionContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -808,7 +808,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -819,7 +819,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(String totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -830,7 +830,7 @@ public Builder currency(Optional currency) { } public Builder currency(TransactionCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -841,7 +841,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -852,7 +852,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -864,7 +864,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -875,7 +875,7 @@ public Builder lineItems(Optional> lineItems) { } public Builder lineItems(List lineItems) { - this.lineItems = Optional.of(lineItems); + this.lineItems = Optional.ofNullable(lineItems); return this; } @@ -886,7 +886,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -897,7 +897,7 @@ public Builder accountingPeriod(Optional accounting } public Builder accountingPeriod(TransactionAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -908,7 +908,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -919,7 +919,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/TransactionLineItem.java b/src/main/java/com/merge/api/resources/accounting/types/TransactionLineItem.java index 8229ceb1a..4ca05a09f 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/TransactionLineItem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/TransactionLineItem.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TransactionLineItem.Builder.class) public final class TransactionLineItem { private final Optional id; @@ -666,7 +666,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -677,7 +677,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -688,7 +688,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -699,7 +699,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -710,7 +710,7 @@ public Builder memo(Optional memo) { } public Builder memo(String memo) { - this.memo = Optional.of(memo); + this.memo = Optional.ofNullable(memo); return this; } @@ -721,7 +721,7 @@ public Builder unitPrice(Optional unitPrice) { } public Builder unitPrice(String unitPrice) { - this.unitPrice = Optional.of(unitPrice); + this.unitPrice = Optional.ofNullable(unitPrice); return this; } @@ -732,7 +732,7 @@ public Builder quantity(Optional quantity) { } public Builder quantity(String quantity) { - this.quantity = Optional.of(quantity); + this.quantity = Optional.ofNullable(quantity); return this; } @@ -743,7 +743,7 @@ public Builder item(Optional item) { } public Builder item(TransactionLineItemItem item) { - this.item = Optional.of(item); + this.item = Optional.ofNullable(item); return this; } @@ -754,7 +754,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -765,7 +765,7 @@ public Builder trackingCategory(Optional trackingCategory) { } public Builder trackingCategory(String trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -776,7 +776,7 @@ public Builder trackingCategories(Optional>> trackingCateg } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -787,7 +787,7 @@ public Builder totalLineAmount(Optional totalLineAmount) { } public Builder totalLineAmount(String totalLineAmount) { - this.totalLineAmount = Optional.of(totalLineAmount); + this.totalLineAmount = Optional.ofNullable(totalLineAmount); return this; } @@ -798,7 +798,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -809,7 +809,7 @@ public Builder currency(Optional currency) { } public Builder currency(TransactionLineItemCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -820,7 +820,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -831,7 +831,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -842,7 +842,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/ValidationProblemSource.java b/src/main/java/com/merge/api/resources/accounting/types/ValidationProblemSource.java index 1bb0b2fb6..76b0a1ab0 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/ValidationProblemSource.java +++ b/src/main/java/com/merge/api/resources/accounting/types/ValidationProblemSource.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ValidationProblemSource.Builder.class) public final class ValidationProblemSource { private final String pointer; @@ -62,7 +63,7 @@ public static PointerStage builder() { } public interface PointerStage { - _FinalStage pointer(String pointer); + _FinalStage pointer(@NotNull String pointer); Builder from(ValidationProblemSource other); } @@ -88,7 +89,7 @@ public Builder from(ValidationProblemSource other) { @java.lang.Override @JsonSetter("pointer") - public _FinalStage pointer(String pointer) { + public _FinalStage pointer(@NotNull String pointer) { this.pointer = pointer; return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCredit.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCredit.java index b504219b2..e774ca551 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCredit.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCredit.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCredit.Builder.class) public final class VendorCredit { private final Optional id; @@ -692,7 +692,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -703,7 +703,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -714,7 +714,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -725,7 +725,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -736,7 +736,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -747,7 +747,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -758,7 +758,7 @@ public Builder vendor(Optional vendor) { } public Builder vendor(VendorCreditVendor vendor) { - this.vendor = Optional.of(vendor); + this.vendor = Optional.ofNullable(vendor); return this; } @@ -769,7 +769,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -780,7 +780,7 @@ public Builder currency(Optional currency) { } public Builder currency(VendorCreditCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -791,7 +791,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -802,7 +802,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -813,7 +813,7 @@ public Builder company(Optional company) { } public Builder company(VendorCreditCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -824,7 +824,7 @@ public Builder lines(Optional> lines) { } public Builder lines(List lines) { - this.lines = Optional.of(lines); + this.lines = Optional.ofNullable(lines); return this; } @@ -836,7 +836,7 @@ public Builder trackingCategories( } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -847,7 +847,7 @@ public Builder appliedToLines(Optional appliedToLines) { - this.appliedToLines = Optional.of(appliedToLines); + this.appliedToLines = Optional.ofNullable(appliedToLines); return this; } @@ -858,7 +858,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -869,7 +869,7 @@ public Builder accountingPeriod(Optional accountin } public Builder accountingPeriod(VendorCreditAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -880,7 +880,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -891,7 +891,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForInvoice.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForInvoice.java index 6147fc1b9..9775763ee 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForInvoice.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForInvoice.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditApplyLineForInvoice.Builder.class) public final class VendorCreditApplyLineForInvoice { private final Optional remoteId; @@ -190,7 +190,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -201,7 +201,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -212,7 +212,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -223,7 +223,7 @@ public Builder vendorCredit(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -245,7 +245,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -256,7 +256,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCredit.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCredit.java index 6674e44f4..e58670cec 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCredit.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCredit.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditApplyLineForVendorCredit.Builder.class) public final class VendorCreditApplyLineForVendorCredit { private final Optional remoteId; @@ -191,7 +191,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -202,7 +202,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -213,7 +213,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -224,7 +224,7 @@ public Builder invoice(Optional inv } public Builder invoice(VendorCreditApplyLineForVendorCreditInvoice invoice) { - this.invoice = Optional.of(invoice); + this.invoice = Optional.ofNullable(invoice); return this; } @@ -235,7 +235,7 @@ public Builder appliedDate(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -246,7 +246,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -257,7 +257,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java index 555143cf9..047fbe034 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditApplyLineForVendorCreditRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditApplyLineForVendorCreditRequest.Builder.class) public final class VendorCreditApplyLineForVendorCreditRequest { private final Optional remoteId; @@ -169,7 +169,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -180,7 +180,7 @@ public Builder invoice(Optional appliedDate) { } public Builder appliedDate(OffsetDateTime appliedDate) { - this.appliedDate = Optional.of(appliedDate); + this.appliedDate = Optional.ofNullable(appliedDate); return this; } @@ -202,7 +202,7 @@ public Builder appliedAmount(Optional appliedAmount) { } public Builder appliedAmount(String appliedAmount) { - this.appliedAmount = Optional.of(appliedAmount); + this.appliedAmount = Optional.ofNullable(appliedAmount); return this; } @@ -213,7 +213,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -224,7 +224,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLine.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLine.java index 9b926d818..827155513 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLine.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLine.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditLine.Builder.class) public final class VendorCreditLine { private final Optional id; @@ -293,7 +293,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -304,7 +304,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -315,7 +315,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -326,7 +326,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -337,7 +337,7 @@ public Builder netAmount(Optional netAmount) { } public Builder netAmount(Double netAmount) { - this.netAmount = Optional.of(netAmount); + this.netAmount = Optional.ofNullable(netAmount); return this; } @@ -348,7 +348,7 @@ public Builder trackingCategory(Optional trackingCategory) { } public Builder trackingCategory(String trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -359,7 +359,7 @@ public Builder trackingCategories(Optional>> trackingCateg } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -370,7 +370,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -381,7 +381,7 @@ public Builder account(Optional account) { } public Builder account(VendorCreditLineAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -392,7 +392,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -403,7 +403,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -414,7 +414,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -425,7 +425,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLineRequest.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLineRequest.java index cb4c65c50..ad39cca1d 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLineRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditLineRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditLineRequest.Builder.class) public final class VendorCreditLineRequest { private final Optional remoteId; @@ -256,7 +256,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -267,7 +267,7 @@ public Builder netAmount(Optional netAmount) { } public Builder netAmount(Double netAmount) { - this.netAmount = Optional.of(netAmount); + this.netAmount = Optional.ofNullable(netAmount); return this; } @@ -278,7 +278,7 @@ public Builder trackingCategory(Optional trackingCategory) { } public Builder trackingCategory(String trackingCategory) { - this.trackingCategory = Optional.of(trackingCategory); + this.trackingCategory = Optional.ofNullable(trackingCategory); return this; } @@ -289,7 +289,7 @@ public Builder trackingCategories(Optional>> trackingCateg } public Builder trackingCategories(List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -300,7 +300,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -311,7 +311,7 @@ public Builder account(Optional account) { } public Builder account(VendorCreditLineRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -322,7 +322,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -333,7 +333,7 @@ public Builder taxRate(Optional taxRate) { } public Builder taxRate(String taxRate) { - this.taxRate = Optional.of(taxRate); + this.taxRate = Optional.ofNullable(taxRate); return this; } @@ -344,7 +344,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -355,7 +355,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -366,7 +366,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditRequest.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditRequest.java index 55acb1ac0..597b319e6 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditRequest.Builder.class) public final class VendorCreditRequest { private final Optional number; @@ -597,7 +597,7 @@ public Builder number(Optional number) { } public Builder number(String number) { - this.number = Optional.of(number); + this.number = Optional.ofNullable(number); return this; } @@ -608,7 +608,7 @@ public Builder transactionDate(Optional transactionDate) { } public Builder transactionDate(OffsetDateTime transactionDate) { - this.transactionDate = Optional.of(transactionDate); + this.transactionDate = Optional.ofNullable(transactionDate); return this; } @@ -619,7 +619,7 @@ public Builder vendor(Optional vendor) { } public Builder vendor(VendorCreditRequestVendor vendor) { - this.vendor = Optional.of(vendor); + this.vendor = Optional.ofNullable(vendor); return this; } @@ -630,7 +630,7 @@ public Builder totalAmount(Optional totalAmount) { } public Builder totalAmount(Double totalAmount) { - this.totalAmount = Optional.of(totalAmount); + this.totalAmount = Optional.ofNullable(totalAmount); return this; } @@ -641,7 +641,7 @@ public Builder currency(Optional currency) { } public Builder currency(VendorCreditRequestCurrency currency) { - this.currency = Optional.of(currency); + this.currency = Optional.ofNullable(currency); return this; } @@ -652,7 +652,7 @@ public Builder exchangeRate(Optional exchangeRate) { } public Builder exchangeRate(String exchangeRate) { - this.exchangeRate = Optional.of(exchangeRate); + this.exchangeRate = Optional.ofNullable(exchangeRate); return this; } @@ -663,7 +663,7 @@ public Builder inclusiveOfTax(Optional inclusiveOfTax) { } public Builder inclusiveOfTax(Boolean inclusiveOfTax) { - this.inclusiveOfTax = Optional.of(inclusiveOfTax); + this.inclusiveOfTax = Optional.ofNullable(inclusiveOfTax); return this; } @@ -674,7 +674,7 @@ public Builder company(Optional company) { } public Builder company(VendorCreditRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -687,7 +687,7 @@ public Builder trackingCategories( public Builder trackingCategories( List> trackingCategories) { - this.trackingCategories = Optional.of(trackingCategories); + this.trackingCategories = Optional.ofNullable(trackingCategories); return this; } @@ -698,7 +698,7 @@ public Builder appliedToLines(Optional appliedToLines) { - this.appliedToLines = Optional.of(appliedToLines); + this.appliedToLines = Optional.ofNullable(appliedToLines); return this; } @@ -709,7 +709,7 @@ public Builder accountingPeriod(Optional ac } public Builder accountingPeriod(VendorCreditRequestAccountingPeriod accountingPeriod) { - this.accountingPeriod = Optional.of(accountingPeriod); + this.accountingPeriod = Optional.ofNullable(accountingPeriod); return this; } @@ -720,7 +720,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -731,7 +731,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditResponse.java b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditResponse.java index a64f2eca4..99b464b14 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/VendorCreditResponse.java +++ b/src/main/java/com/merge/api/resources/accounting/types/VendorCreditResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditResponse.Builder.class) public final class VendorCreditResponse { private final VendorCredit model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(VendorCredit model); + _FinalStage model(@NotNull VendorCredit model); Builder from(VendorCreditResponse other); } @@ -149,14 +150,14 @@ public Builder from(VendorCreditResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(VendorCredit model) { + public _FinalStage model(@NotNull VendorCredit model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/WarningValidationProblem.java b/src/main/java/com/merge/api/resources/accounting/types/WarningValidationProblem.java index d23f14f72..6d4fdc6cc 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/WarningValidationProblem.java +++ b/src/main/java/com/merge/api/resources/accounting/types/WarningValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WarningValidationProblem.Builder.class) public final class WarningValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(WarningValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(WarningValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/types/WebhookReceiver.java b/src/main/java/com/merge/api/resources/accounting/types/WebhookReceiver.java index 8dd6f6889..3c39345bb 100644 --- a/src/main/java/com/merge/api/resources/accounting/types/WebhookReceiver.java +++ b/src/main/java/com/merge/api/resources/accounting/types/WebhookReceiver.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiver.Builder.class) public final class WebhookReceiver { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiver other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiver other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/vendorcredits/VendorCreditsClient.java b/src/main/java/com/merge/api/resources/accounting/vendorcredits/VendorCreditsClient.java index 326e8dd40..592117109 100644 --- a/src/main/java/com/merge/api/resources/accounting/vendorcredits/VendorCreditsClient.java +++ b/src/main/java/com/merge/api/resources/accounting/vendorcredits/VendorCreditsClient.java @@ -113,7 +113,8 @@ public PaginatedVendorCreditList list(VendorCreditsListRequest request, RequestO .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -168,7 +169,8 @@ public VendorCreditResponse create(VendorCreditEndpointRequest request, RequestO .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -189,13 +191,6 @@ public VendorCreditResponse create(VendorCreditEndpointRequest request, RequestO } } - /** - * Returns a VendorCredit object with the given id. - */ - public VendorCredit retrieve(String id) { - return retrieve(id, VendorCreditsRetrieveRequest.builder().build()); - } - /** * Returns a VendorCredit object with the given id. */ @@ -222,7 +217,8 @@ public VendorCredit retrieve(String id, VendorCreditsRetrieveRequest request, Re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -263,6 +259,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditEndpointRequest.java b/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditEndpointRequest.java index a7e701b8b..b77863f9d 100644 --- a/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditEndpointRequest.Builder.class) public final class VendorCreditEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(VendorCreditRequest model); + _FinalStage model(@NotNull VendorCreditRequest model); Builder from(VendorCreditEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(VendorCreditEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(VendorCreditRequest model) { + public _FinalStage model(@NotNull VendorCreditRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(VendorCreditRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsListRequest.java b/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsListRequest.java index a2f2697d9..418e12fac 100644 --- a/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsListRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditsListRequest.Builder.class) public final class VendorCreditsListRequest { private final Optional companyId; @@ -313,7 +313,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -324,7 +324,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -335,7 +335,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -346,7 +346,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -357,7 +357,7 @@ public Builder expand(Optional expand) { } public Builder expand(VendorCreditsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -368,7 +368,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -379,7 +379,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -390,7 +390,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -401,7 +401,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -412,7 +412,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -423,7 +423,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -434,7 +434,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -445,7 +445,7 @@ public Builder transactionDateAfter(Optional transactionDateAfte } public Builder transactionDateAfter(OffsetDateTime transactionDateAfter) { - this.transactionDateAfter = Optional.of(transactionDateAfter); + this.transactionDateAfter = Optional.ofNullable(transactionDateAfter); return this; } @@ -456,7 +456,7 @@ public Builder transactionDateBefore(Optional transactionDateBef } public Builder transactionDateBefore(OffsetDateTime transactionDateBefore) { - this.transactionDateBefore = Optional.of(transactionDateBefore); + this.transactionDateBefore = Optional.ofNullable(transactionDateBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsRetrieveRequest.java b/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsRetrieveRequest.java index 6778ef8b3..8354c2885 100644 --- a/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/vendorcredits/requests/VendorCreditsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = VendorCreditsRetrieveRequest.Builder.class) public final class VendorCreditsRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(VendorCreditsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/accounting/webhookreceivers/WebhookReceiversClient.java b/src/main/java/com/merge/api/resources/accounting/webhookreceivers/WebhookReceiversClient.java index b65968ef2..565302c25 100644 --- a/src/main/java/com/merge/api/resources/accounting/webhookreceivers/WebhookReceiversClient.java +++ b/src/main/java/com/merge/api/resources/accounting/webhookreceivers/WebhookReceiversClient.java @@ -50,6 +50,7 @@ public List list(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,6 +99,7 @@ public WebhookReceiver create(WebhookReceiverRequest request, RequestOptions req .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/accounting/webhookreceivers/requests/WebhookReceiverRequest.java b/src/main/java/com/merge/api/resources/accounting/webhookreceivers/requests/WebhookReceiverRequest.java index a00c3af62..870b709db 100644 --- a/src/main/java/com/merge/api/resources/accounting/webhookreceivers/requests/WebhookReceiverRequest.java +++ b/src/main/java/com/merge/api/resources/accounting/webhookreceivers/requests/WebhookReceiverRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiverRequest.Builder.class) public final class WebhookReceiverRequest { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiverRequest other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiverRequest other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/accountdetails/AccountDetailsClient.java b/src/main/java/com/merge/api/resources/ats/accountdetails/AccountDetailsClient.java index 850f11e6f..7def09db5 100644 --- a/src/main/java/com/merge/api/resources/ats/accountdetails/AccountDetailsClient.java +++ b/src/main/java/com/merge/api/resources/ats/accountdetails/AccountDetailsClient.java @@ -44,6 +44,7 @@ public AccountDetails retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/accounttoken/AccountTokenClient.java b/src/main/java/com/merge/api/resources/ats/accounttoken/AccountTokenClient.java index 73e91fb0b..742d78a6c 100644 --- a/src/main/java/com/merge/api/resources/ats/accounttoken/AccountTokenClient.java +++ b/src/main/java/com/merge/api/resources/ats/accounttoken/AccountTokenClient.java @@ -45,6 +45,7 @@ public AccountToken retrieve(String publicToken, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/activities/ActivitiesClient.java b/src/main/java/com/merge/api/resources/ats/activities/ActivitiesClient.java index ddb3a20d5..a33666cc6 100644 --- a/src/main/java/com/merge/api/resources/ats/activities/ActivitiesClient.java +++ b/src/main/java/com/merge/api/resources/ats/activities/ActivitiesClient.java @@ -111,7 +111,8 @@ public PaginatedActivityList list(ActivitiesListRequest request, RequestOptions .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -167,7 +168,8 @@ public ActivityResponse create(ActivityEndpointRequest request, RequestOptions r .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -188,13 +190,6 @@ public ActivityResponse create(ActivityEndpointRequest request, RequestOptions r } } - /** - * Returns an Activity object with the given id. - */ - public Activity retrieve(String id) { - return retrieve(id, ActivitiesRetrieveRequest.builder().build()); - } - /** * Returns an Activity object with the given id. */ @@ -229,7 +224,8 @@ public Activity retrieve(String id, ActivitiesRetrieveRequest request, RequestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -270,6 +266,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesListRequest.java b/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesListRequest.java index ffd13c1b7..bfbd731b4 100644 --- a/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesListRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ActivitiesListRequest.Builder.class) public final class ActivitiesListRequest { private final Optional createdAfter; @@ -314,7 +314,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -325,7 +325,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -336,7 +336,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -347,7 +347,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -358,7 +358,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -369,7 +369,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -380,7 +380,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -391,7 +391,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -402,7 +402,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -413,7 +413,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -424,7 +424,7 @@ public Builder remoteFields(Optional remoteFi } public Builder remoteFields(ActivitiesListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -435,7 +435,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -446,7 +446,7 @@ public Builder showEnumOrigins(Optional sh } public Builder showEnumOrigins(ActivitiesListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -457,7 +457,7 @@ public Builder userId(Optional userId) { } public Builder userId(String userId) { - this.userId = Optional.of(userId); + this.userId = Optional.ofNullable(userId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesRetrieveRequest.java index e7ca3fae1..673d7fba5 100644 --- a/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/activities/requests/ActivitiesRetrieveRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ActivitiesRetrieveRequest.Builder.class) public final class ActivitiesRetrieveRequest { private final Optional expand; @@ -139,7 +139,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -150,7 +150,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -161,7 +161,7 @@ public Builder remoteFields(Optional remo } public Builder remoteFields(ActivitiesRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -172,7 +172,7 @@ public Builder showEnumOrigins(Optional isDebugMode; @@ -103,13 +104,13 @@ public static ModelStage builder() { } public interface ModelStage { - RemoteUserIdStage model(ActivityRequest model); + RemoteUserIdStage model(@NotNull ActivityRequest model); Builder from(ActivityEndpointRequest other); } public interface RemoteUserIdStage { - _FinalStage remoteUserId(String remoteUserId); + _FinalStage remoteUserId(@NotNull String remoteUserId); } public interface _FinalStage { @@ -150,14 +151,14 @@ public Builder from(ActivityEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public RemoteUserIdStage model(ActivityRequest model) { + public RemoteUserIdStage model(@NotNull ActivityRequest model) { this.model = model; return this; } @java.lang.Override @JsonSetter("remote_user_id") - public _FinalStage remoteUserId(String remoteUserId) { + public _FinalStage remoteUserId(@NotNull String remoteUserId) { this.remoteUserId = remoteUserId; return this; } @@ -168,7 +169,7 @@ public _FinalStage remoteUserId(String remoteUserId) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -185,7 +186,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/applications/ApplicationsClient.java b/src/main/java/com/merge/api/resources/ats/applications/ApplicationsClient.java index f0763c52e..febe088d1 100644 --- a/src/main/java/com/merge/api/resources/ats/applications/ApplicationsClient.java +++ b/src/main/java/com/merge/api/resources/ats/applications/ApplicationsClient.java @@ -123,7 +123,8 @@ public PaginatedApplicationList list(ApplicationsListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -183,7 +184,8 @@ public ApplicationResponse create(ApplicationEndpointRequest request, RequestOpt .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -204,13 +206,6 @@ public ApplicationResponse create(ApplicationEndpointRequest request, RequestOpt } } - /** - * Returns an Application object with the given id. - */ - public Application retrieve(String id) { - return retrieve(id, ApplicationsRetrieveRequest.builder().build()); - } - /** * Returns an Application object with the given id. */ @@ -237,7 +232,8 @@ public Application retrieve(String id, ApplicationsRetrieveRequest request, Requ .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -258,13 +254,6 @@ public Application retrieve(String id, ApplicationsRetrieveRequest request, Requ } } - /** - * Updates the current_stage field of an Application object - */ - public ApplicationResponse changeStageCreate(String id) { - return changeStageCreate(id, UpdateApplicationStageRequest.builder().build()); - } - /** * Updates the current_stage field of an Application object */ @@ -307,7 +296,8 @@ public ApplicationResponse changeStageCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -358,7 +348,8 @@ public MetaResponse metaPostRetrieve(ApplicationsMetaPostRetrieveRequest request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationEndpointRequest.java b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationEndpointRequest.java index 93dc2c441..a1c3863c3 100644 --- a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ApplicationEndpointRequest.Builder.class) public final class ApplicationEndpointRequest { private final Optional isDebugMode; @@ -103,13 +104,13 @@ public static ModelStage builder() { } public interface ModelStage { - RemoteUserIdStage model(ApplicationRequest model); + RemoteUserIdStage model(@NotNull ApplicationRequest model); Builder from(ApplicationEndpointRequest other); } public interface RemoteUserIdStage { - _FinalStage remoteUserId(String remoteUserId); + _FinalStage remoteUserId(@NotNull String remoteUserId); } public interface _FinalStage { @@ -150,14 +151,14 @@ public Builder from(ApplicationEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public RemoteUserIdStage model(ApplicationRequest model) { + public RemoteUserIdStage model(@NotNull ApplicationRequest model) { this.model = model; return this; } @java.lang.Override @JsonSetter("remote_user_id") - public _FinalStage remoteUserId(String remoteUserId) { + public _FinalStage remoteUserId(@NotNull String remoteUserId) { this.remoteUserId = remoteUserId; return this; } @@ -168,7 +169,7 @@ public _FinalStage remoteUserId(String remoteUserId) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -185,7 +186,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsListRequest.java b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsListRequest.java index 6e742b9e3..f7c6b0975 100644 --- a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ApplicationsListRequest.Builder.class) public final class ApplicationsListRequest { private final Optional candidateId; @@ -364,7 +364,7 @@ public Builder candidateId(Optional candidateId) { } public Builder candidateId(String candidateId) { - this.candidateId = Optional.of(candidateId); + this.candidateId = Optional.ofNullable(candidateId); return this; } @@ -375,7 +375,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -386,7 +386,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -397,7 +397,7 @@ public Builder creditedToId(Optional creditedToId) { } public Builder creditedToId(String creditedToId) { - this.creditedToId = Optional.of(creditedToId); + this.creditedToId = Optional.ofNullable(creditedToId); return this; } @@ -408,7 +408,7 @@ public Builder currentStageId(Optional currentStageId) { } public Builder currentStageId(String currentStageId) { - this.currentStageId = Optional.of(currentStageId); + this.currentStageId = Optional.ofNullable(currentStageId); return this; } @@ -419,7 +419,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -430,7 +430,7 @@ public Builder expand(Optional expand) { } public Builder expand(ApplicationsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -441,7 +441,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -452,7 +452,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -463,7 +463,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -474,7 +474,7 @@ public Builder jobId(Optional jobId) { } public Builder jobId(String jobId) { - this.jobId = Optional.of(jobId); + this.jobId = Optional.ofNullable(jobId); return this; } @@ -485,7 +485,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -496,7 +496,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -507,7 +507,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -518,7 +518,7 @@ public Builder rejectReasonId(Optional rejectReasonId) { } public Builder rejectReasonId(String rejectReasonId) { - this.rejectReasonId = Optional.of(rejectReasonId); + this.rejectReasonId = Optional.ofNullable(rejectReasonId); return this; } @@ -529,7 +529,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -540,7 +540,7 @@ public Builder source(Optional source) { } public Builder source(String source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsMetaPostRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsMetaPostRetrieveRequest.java index d551539bc..7bb373c3d 100644 --- a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsMetaPostRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsMetaPostRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ApplicationsMetaPostRetrieveRequest.Builder.class) public final class ApplicationsMetaPostRetrieveRequest { private final Optional applicationRemoteTemplateId; @@ -89,7 +89,7 @@ public Builder applicationRemoteTemplateId(Optional applicationRemoteTem } public Builder applicationRemoteTemplateId(String applicationRemoteTemplateId) { - this.applicationRemoteTemplateId = Optional.of(applicationRemoteTemplateId); + this.applicationRemoteTemplateId = Optional.ofNullable(applicationRemoteTemplateId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsRetrieveRequest.java index 3ae510c4b..835565218 100644 --- a/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/applications/requests/ApplicationsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ApplicationsRetrieveRequest.Builder.class) public final class ApplicationsRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(ApplicationsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/applications/requests/UpdateApplicationStageRequest.java b/src/main/java/com/merge/api/resources/ats/applications/requests/UpdateApplicationStageRequest.java index 824688307..33a51f4d2 100644 --- a/src/main/java/com/merge/api/resources/ats/applications/requests/UpdateApplicationStageRequest.java +++ b/src/main/java/com/merge/api/resources/ats/applications/requests/UpdateApplicationStageRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UpdateApplicationStageRequest.Builder.class) public final class UpdateApplicationStageRequest { private final Optional isDebugMode; @@ -134,7 +134,7 @@ public Builder isDebugMode(Optional isDebugMode) { } public Builder isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } @@ -145,7 +145,7 @@ public Builder runAsync(Optional runAsync) { } public Builder runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -156,7 +156,7 @@ public Builder jobInterviewStage(Optional jobInterviewStage) { } public Builder jobInterviewStage(String jobInterviewStage) { - this.jobInterviewStage = Optional.of(jobInterviewStage); + this.jobInterviewStage = Optional.ofNullable(jobInterviewStage); return this; } @@ -167,7 +167,7 @@ public Builder remoteUserId(Optional remoteUserId) { } public Builder remoteUserId(String remoteUserId) { - this.remoteUserId = Optional.of(remoteUserId); + this.remoteUserId = Optional.ofNullable(remoteUserId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/asyncpassthrough/AsyncPassthroughClient.java b/src/main/java/com/merge/api/resources/ats/asyncpassthrough/AsyncPassthroughClient.java index 348080054..30fb918fc 100644 --- a/src/main/java/com/merge/api/resources/ats/asyncpassthrough/AsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/resources/ats/asyncpassthrough/AsyncPassthroughClient.java @@ -97,6 +97,7 @@ public AsyncPassthroughRetrieveResponse retrieve(String asyncPassthroughReceiptI .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/attachments/AttachmentsClient.java b/src/main/java/com/merge/api/resources/ats/attachments/AttachmentsClient.java index 74f661e0d..d5c24e50d 100644 --- a/src/main/java/com/merge/api/resources/ats/attachments/AttachmentsClient.java +++ b/src/main/java/com/merge/api/resources/ats/attachments/AttachmentsClient.java @@ -110,7 +110,8 @@ public PaginatedAttachmentList list(AttachmentsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -166,7 +167,8 @@ public AttachmentResponse create(AttachmentEndpointRequest request, RequestOptio .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -187,13 +189,6 @@ public AttachmentResponse create(AttachmentEndpointRequest request, RequestOptio } } - /** - * Returns an Attachment object with the given id. - */ - public Attachment retrieve(String id) { - return retrieve(id, AttachmentsRetrieveRequest.builder().build()); - } - /** * Returns an Attachment object with the given id. */ @@ -227,7 +222,8 @@ public Attachment retrieve(String id, AttachmentsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -268,6 +264,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentEndpointRequest.java b/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentEndpointRequest.java index 83af47dd6..142098d92 100644 --- a/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentEndpointRequest.Builder.class) public final class AttachmentEndpointRequest { private final Optional isDebugMode; @@ -103,13 +104,13 @@ public static ModelStage builder() { } public interface ModelStage { - RemoteUserIdStage model(AttachmentRequest model); + RemoteUserIdStage model(@NotNull AttachmentRequest model); Builder from(AttachmentEndpointRequest other); } public interface RemoteUserIdStage { - _FinalStage remoteUserId(String remoteUserId); + _FinalStage remoteUserId(@NotNull String remoteUserId); } public interface _FinalStage { @@ -150,14 +151,14 @@ public Builder from(AttachmentEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public RemoteUserIdStage model(AttachmentRequest model) { + public RemoteUserIdStage model(@NotNull AttachmentRequest model) { this.model = model; return this; } @java.lang.Override @JsonSetter("remote_user_id") - public _FinalStage remoteUserId(String remoteUserId) { + public _FinalStage remoteUserId(@NotNull String remoteUserId) { this.remoteUserId = remoteUserId; return this; } @@ -168,7 +169,7 @@ public _FinalStage remoteUserId(String remoteUserId) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -185,7 +186,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsListRequest.java b/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsListRequest.java index 14023a255..25a4158d6 100644 --- a/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentsListRequest.Builder.class) public final class AttachmentsListRequest { private final Optional candidateId; @@ -312,7 +312,7 @@ public Builder candidateId(Optional candidateId) { } public Builder candidateId(String candidateId) { - this.candidateId = Optional.of(candidateId); + this.candidateId = Optional.ofNullable(candidateId); return this; } @@ -323,7 +323,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -334,7 +334,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -345,7 +345,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -356,7 +356,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -367,7 +367,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -378,7 +378,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -389,7 +389,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -400,7 +400,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -411,7 +411,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -444,7 +444,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -455,7 +455,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsRetrieveRequest.java index c92121bda..d4c64ee9d 100644 --- a/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/attachments/requests/AttachmentsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentsRetrieveRequest.Builder.class) public final class AttachmentsRetrieveRequest { private final Optional expand; @@ -137,7 +137,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -148,7 +148,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -159,7 +159,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -170,7 +170,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/audittrail/AuditTrailClient.java b/src/main/java/com/merge/api/resources/ats/audittrail/AuditTrailClient.java index c819170cc..f664bcb86 100644 --- a/src/main/java/com/merge/api/resources/ats/audittrail/AuditTrailClient.java +++ b/src/main/java/com/merge/api/resources/ats/audittrail/AuditTrailClient.java @@ -68,7 +68,8 @@ public PaginatedAuditLogEventList list(AuditTrailListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/audittrail/requests/AuditTrailListRequest.java b/src/main/java/com/merge/api/resources/ats/audittrail/requests/AuditTrailListRequest.java index 1f37557ce..930558b93 100644 --- a/src/main/java/com/merge/api/resources/ats/audittrail/requests/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/audittrail/requests/AuditTrailListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditTrailListRequest.Builder.class) public final class AuditTrailListRequest { private final Optional cursor; @@ -169,7 +169,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -180,7 +180,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -191,7 +191,7 @@ public Builder eventType(Optional eventType) { } public Builder eventType(String eventType) { - this.eventType = Optional.of(eventType); + this.eventType = Optional.ofNullable(eventType); return this; } @@ -202,7 +202,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -213,7 +213,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -224,7 +224,7 @@ public Builder userEmail(Optional userEmail) { } public Builder userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/availableactions/AvailableActionsClient.java b/src/main/java/com/merge/api/resources/ats/availableactions/AvailableActionsClient.java index c773e02dc..f8daac9b3 100644 --- a/src/main/java/com/merge/api/resources/ats/availableactions/AvailableActionsClient.java +++ b/src/main/java/com/merge/api/resources/ats/availableactions/AvailableActionsClient.java @@ -44,6 +44,7 @@ public AvailableActions retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/candidates/CandidatesClient.java b/src/main/java/com/merge/api/resources/ats/candidates/CandidatesClient.java index 20037fe22..4a99ec50c 100644 --- a/src/main/java/com/merge/api/resources/ats/candidates/CandidatesClient.java +++ b/src/main/java/com/merge/api/resources/ats/candidates/CandidatesClient.java @@ -116,7 +116,8 @@ public PaginatedCandidateList list(CandidatesListRequest request, RequestOptions .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -172,7 +173,8 @@ public CandidateResponse create(CandidateEndpointRequest request, RequestOptions .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -193,13 +195,6 @@ public CandidateResponse create(CandidateEndpointRequest request, RequestOptions } } - /** - * Returns a Candidate object with the given id. - */ - public Candidate retrieve(String id) { - return retrieve(id, CandidatesRetrieveRequest.builder().build()); - } - /** * Returns a Candidate object with the given id. */ @@ -226,7 +221,8 @@ public Candidate retrieve(String id, CandidatesRetrieveRequest request, RequestO .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -284,7 +280,8 @@ public CandidateResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -374,6 +371,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -414,6 +412,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidateEndpointRequest.java b/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidateEndpointRequest.java index 4db004425..cc7be53f9 100644 --- a/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidateEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidateEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CandidateEndpointRequest.Builder.class) public final class CandidateEndpointRequest { private final Optional isDebugMode; @@ -103,13 +104,13 @@ public static ModelStage builder() { } public interface ModelStage { - RemoteUserIdStage model(CandidateRequest model); + RemoteUserIdStage model(@NotNull CandidateRequest model); Builder from(CandidateEndpointRequest other); } public interface RemoteUserIdStage { - _FinalStage remoteUserId(String remoteUserId); + _FinalStage remoteUserId(@NotNull String remoteUserId); } public interface _FinalStage { @@ -150,14 +151,14 @@ public Builder from(CandidateEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public RemoteUserIdStage model(CandidateRequest model) { + public RemoteUserIdStage model(@NotNull CandidateRequest model) { this.model = model; return this; } @java.lang.Override @JsonSetter("remote_user_id") - public _FinalStage remoteUserId(String remoteUserId) { + public _FinalStage remoteUserId(@NotNull String remoteUserId) { this.remoteUserId = remoteUserId; return this; } @@ -168,7 +169,7 @@ public _FinalStage remoteUserId(String remoteUserId) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -185,7 +186,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesListRequest.java b/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesListRequest.java index a638317dd..fadbc5732 100644 --- a/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CandidatesListRequest.Builder.class) public final class CandidatesListRequest { private final Optional createdAfter; @@ -330,7 +330,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -341,7 +341,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -352,7 +352,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -363,7 +363,7 @@ public Builder emailAddresses(Optional emailAddresses) { } public Builder emailAddresses(String emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -374,7 +374,7 @@ public Builder expand(Optional expand) { } public Builder expand(CandidatesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -385,7 +385,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -396,7 +396,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -407,7 +407,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -418,7 +418,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -429,7 +429,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -440,7 +440,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -451,7 +451,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -462,7 +462,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -473,7 +473,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -484,7 +484,7 @@ public Builder tags(Optional tags) { } public Builder tags(String tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesRetrieveRequest.java index 582631801..a4c19131a 100644 --- a/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/candidates/requests/CandidatesRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CandidatesRetrieveRequest.Builder.class) public final class CandidatesRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(CandidatesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/candidates/requests/IgnoreCommonModelRequest.java b/src/main/java/com/merge/api/resources/ats/candidates/requests/IgnoreCommonModelRequest.java index f6f889ce6..43579cecc 100644 --- a/src/main/java/com/merge/api/resources/ats/candidates/requests/IgnoreCommonModelRequest.java +++ b/src/main/java/com/merge/api/resources/ats/candidates/requests/IgnoreCommonModelRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IgnoreCommonModelRequest.Builder.class) public final class IgnoreCommonModelRequest { private final ReasonEnum reason; @@ -74,7 +75,7 @@ public static ReasonStage builder() { } public interface ReasonStage { - _FinalStage reason(ReasonEnum reason); + _FinalStage reason(@NotNull ReasonEnum reason); Builder from(IgnoreCommonModelRequest other); } @@ -107,14 +108,14 @@ public Builder from(IgnoreCommonModelRequest other) { @java.lang.Override @JsonSetter("reason") - public _FinalStage reason(ReasonEnum reason) { + public _FinalStage reason(@NotNull ReasonEnum reason) { this.reason = reason; return this; } @java.lang.Override public _FinalStage message(String message) { - this.message = Optional.of(message); + this.message = Optional.ofNullable(message); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/candidates/requests/PatchedCandidateEndpointRequest.java b/src/main/java/com/merge/api/resources/ats/candidates/requests/PatchedCandidateEndpointRequest.java index 40d8a37de..87e9ef42f 100644 --- a/src/main/java/com/merge/api/resources/ats/candidates/requests/PatchedCandidateEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ats/candidates/requests/PatchedCandidateEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedCandidateEndpointRequest.Builder.class) public final class PatchedCandidateEndpointRequest { private final Optional isDebugMode; @@ -103,13 +104,13 @@ public static ModelStage builder() { } public interface ModelStage { - RemoteUserIdStage model(PatchedCandidateRequest model); + RemoteUserIdStage model(@NotNull PatchedCandidateRequest model); Builder from(PatchedCandidateEndpointRequest other); } public interface RemoteUserIdStage { - _FinalStage remoteUserId(String remoteUserId); + _FinalStage remoteUserId(@NotNull String remoteUserId); } public interface _FinalStage { @@ -150,14 +151,14 @@ public Builder from(PatchedCandidateEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public RemoteUserIdStage model(PatchedCandidateRequest model) { + public RemoteUserIdStage model(@NotNull PatchedCandidateRequest model) { this.model = model; return this; } @java.lang.Override @JsonSetter("remote_user_id") - public _FinalStage remoteUserId(String remoteUserId) { + public _FinalStage remoteUserId(@NotNull String remoteUserId) { this.remoteUserId = remoteUserId; return this; } @@ -168,7 +169,7 @@ public _FinalStage remoteUserId(String remoteUserId) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -185,7 +186,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/departments/DepartmentsClient.java b/src/main/java/com/merge/api/resources/ats/departments/DepartmentsClient.java index f8fbfe42d..57d062d0b 100644 --- a/src/main/java/com/merge/api/resources/ats/departments/DepartmentsClient.java +++ b/src/main/java/com/merge/api/resources/ats/departments/DepartmentsClient.java @@ -90,7 +90,8 @@ public PaginatedDepartmentList list(DepartmentsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedDepartmentList list(DepartmentsListRequest request, RequestOptio } } - /** - * Returns a Department object with the given id. - */ - public Department retrieve(String id) { - return retrieve(id, DepartmentsRetrieveRequest.builder().build()); - } - /** * Returns a Department object with the given id. */ @@ -141,7 +135,8 @@ public Department retrieve(String id, DepartmentsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsListRequest.java b/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsListRequest.java index 6abf31e8d..aafa0e6b3 100644 --- a/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DepartmentsListRequest.Builder.class) public final class DepartmentsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsRetrieveRequest.java index 24f40dc4c..4d6e12a29 100644 --- a/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/departments/requests/DepartmentsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DepartmentsRetrieveRequest.Builder.class) public final class DepartmentsRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/eeocs/EeocsClient.java b/src/main/java/com/merge/api/resources/ats/eeocs/EeocsClient.java index 37fb3577e..ace003259 100644 --- a/src/main/java/com/merge/api/resources/ats/eeocs/EeocsClient.java +++ b/src/main/java/com/merge/api/resources/ats/eeocs/EeocsClient.java @@ -104,7 +104,8 @@ public PaginatedEeocList list(EeocsListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -125,13 +126,6 @@ public PaginatedEeocList list(EeocsListRequest request, RequestOptions requestOp } } - /** - * Returns an EEOC object with the given id. - */ - public Eeoc retrieve(String id) { - return retrieve(id, EeocsRetrieveRequest.builder().build()); - } - /** * Returns an EEOC object with the given id. */ @@ -166,7 +160,8 @@ public Eeoc retrieve(String id, EeocsRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsListRequest.java b/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsListRequest.java index c6bff13e4..2da87e38d 100644 --- a/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsListRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EeocsListRequest.Builder.class) public final class EeocsListRequest { private final Optional candidateId; @@ -314,7 +314,7 @@ public Builder candidateId(Optional candidateId) { } public Builder candidateId(String candidateId) { - this.candidateId = Optional.of(candidateId); + this.candidateId = Optional.ofNullable(candidateId); return this; } @@ -325,7 +325,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -336,7 +336,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -347,7 +347,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -358,7 +358,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -369,7 +369,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -380,7 +380,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -391,7 +391,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -402,7 +402,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -413,7 +413,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -424,7 +424,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -435,7 +435,7 @@ public Builder remoteFields(Optional remoteFields) } public Builder remoteFields(EeocsListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -446,7 +446,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -457,7 +457,7 @@ public Builder showEnumOrigins(Optional showEnu } public Builder showEnumOrigins(EeocsListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsRetrieveRequest.java index 9ac295f1c..38f71d42d 100644 --- a/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/eeocs/requests/EeocsRetrieveRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EeocsRetrieveRequest.Builder.class) public final class EeocsRetrieveRequest { private final Optional expand; @@ -139,7 +139,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -150,7 +150,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -161,7 +161,7 @@ public Builder remoteFields(Optional remoteFie } public Builder remoteFields(EeocsRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -172,7 +172,7 @@ public Builder showEnumOrigins(Optional sho } public Builder showEnumOrigins(EeocsRetrieveRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/fieldmapping/FieldMappingClient.java b/src/main/java/com/merge/api/resources/ats/fieldmapping/FieldMappingClient.java index 73757bf9e..977ff01e8 100644 --- a/src/main/java/com/merge/api/resources/ats/fieldmapping/FieldMappingClient.java +++ b/src/main/java/com/merge/api/resources/ats/fieldmapping/FieldMappingClient.java @@ -67,7 +67,8 @@ public FieldMappingApiInstanceResponse fieldMappingsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -127,7 +128,8 @@ public FieldMappingInstanceResponse fieldMappingsCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,6 +171,7 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, .method("DELETE", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -189,14 +192,6 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, } } - /** - * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. - */ - public FieldMappingInstanceResponse fieldMappingsPartialUpdate(String fieldMappingId) { - return fieldMappingsPartialUpdate( - fieldMappingId, PatchedEditFieldMappingRequest.builder().build()); - } - /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. */ @@ -227,6 +222,7 @@ public FieldMappingInstanceResponse fieldMappingsPartialUpdate( .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,7 +276,8 @@ public RemoteFieldApiResponse remoteFieldsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -321,6 +318,7 @@ public ExternalTargetFieldApiResponse targetFieldsRetrieve(RequestOptions reques .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/CreateFieldMappingRequest.java index eb4fe5f72..a5e3a97da 100644 --- a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/CreateFieldMappingRequest.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateFieldMappingRequest.Builder.class) public final class CreateFieldMappingRequest { private final Optional excludeRemoteFieldMetadata; @@ -157,25 +158,25 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { - TargetFieldDescriptionStage targetFieldName(String targetFieldName); + TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { - RemoteMethodStage targetFieldDescription(String targetFieldDescription); + RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { - RemoteUrlPathStage remoteMethod(String remoteMethod); + RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { - CommonModelNameStage remoteUrlPath(String remoteUrlPath); + CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { - _FinalStage commonModelName(String commonModelName); + _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { @@ -237,7 +238,7 @@ public Builder from(CreateFieldMappingRequest other) { */ @java.lang.Override @JsonSetter("target_field_name") - public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { + public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName) { this.targetFieldName = targetFieldName; return this; } @@ -248,7 +249,7 @@ public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { */ @java.lang.Override @JsonSetter("target_field_description") - public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { + public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription) { this.targetFieldDescription = targetFieldDescription; return this; } @@ -259,7 +260,7 @@ public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { */ @java.lang.Override @JsonSetter("remote_method") - public RemoteUrlPathStage remoteMethod(String remoteMethod) { + public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { this.remoteMethod = remoteMethod; return this; } @@ -270,7 +271,7 @@ public RemoteUrlPathStage remoteMethod(String remoteMethod) { */ @java.lang.Override @JsonSetter("remote_url_path") - public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { + public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; return this; } @@ -281,7 +282,7 @@ public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { */ @java.lang.Override @JsonSetter("common_model_name") - public _FinalStage commonModelName(String commonModelName) { + public _FinalStage commonModelName(@NotNull String commonModelName) { this.commonModelName = commonModelName; return this; } @@ -320,7 +321,7 @@ public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalP */ @java.lang.Override public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/FieldMappingsRetrieveRequest.java index f333e0ac2..01ea35d88 100644 --- a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/FieldMappingsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingsRetrieveRequest.Builder.class) public final class FieldMappingsRetrieveRequest { private final Optional excludeRemoteFieldMetadata; @@ -88,7 +88,7 @@ public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMe } public Builder excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/PatchedEditFieldMappingRequest.java index 962596c28..59a653d7e 100644 --- a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/PatchedEditFieldMappingRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEditFieldMappingRequest.Builder.class) public final class PatchedEditFieldMappingRequest { private final Optional> remoteFieldTraversalPath; @@ -123,7 +123,7 @@ public Builder remoteFieldTraversalPath(Optional> remoteFieldTrav } public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) { - this.remoteFieldTraversalPath = Optional.of(remoteFieldTraversalPath); + this.remoteFieldTraversalPath = Optional.ofNullable(remoteFieldTraversalPath); return this; } @@ -134,7 +134,7 @@ public Builder remoteMethod(Optional remoteMethod) { } public Builder remoteMethod(String remoteMethod) { - this.remoteMethod = Optional.of(remoteMethod); + this.remoteMethod = Optional.ofNullable(remoteMethod); return this; } @@ -145,7 +145,7 @@ public Builder remoteUrlPath(Optional remoteUrlPath) { } public Builder remoteUrlPath(String remoteUrlPath) { - this.remoteUrlPath = Optional.of(remoteUrlPath); + this.remoteUrlPath = Optional.ofNullable(remoteUrlPath); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/RemoteFieldsRetrieveRequest.java index f0336b405..cf489101a 100644 --- a/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/fieldmapping/requests/RemoteFieldsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldsRetrieveRequest.Builder.class) public final class RemoteFieldsRetrieveRequest { private final Optional commonModels; @@ -104,7 +104,7 @@ public Builder commonModels(Optional commonModels) { } public Builder commonModels(String commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -115,7 +115,7 @@ public Builder includeExampleValues(Optional includeExampleValues) { } public Builder includeExampleValues(String includeExampleValues) { - this.includeExampleValues = Optional.of(includeExampleValues); + this.includeExampleValues = Optional.ofNullable(includeExampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/forceresync/ForceResyncClient.java b/src/main/java/com/merge/api/resources/ats/forceresync/ForceResyncClient.java index 06633ca85..7a15ae0c2 100644 --- a/src/main/java/com/merge/api/resources/ats/forceresync/ForceResyncClient.java +++ b/src/main/java/com/merge/api/resources/ats/forceresync/ForceResyncClient.java @@ -47,6 +47,7 @@ public List syncStatusResyncCreate(RequestOptions requestOptions) { .method("POST", RequestBody.create("", null)) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/generatekey/GenerateKeyClient.java b/src/main/java/com/merge/api/resources/ats/generatekey/GenerateKeyClient.java index c3fdb91e9..9ae57d105 100644 --- a/src/main/java/com/merge/api/resources/ats/generatekey/GenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/ats/generatekey/GenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(GenerateRemoteKeyRequest request, RequestOptions request .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/generatekey/requests/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/resources/ats/generatekey/requests/GenerateRemoteKeyRequest.java index f0de2e0cd..dd106a555 100644 --- a/src/main/java/com/merge/api/resources/ats/generatekey/requests/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/resources/ats/generatekey/requests/GenerateRemoteKeyRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GenerateRemoteKeyRequest.Builder.class) public final class GenerateRemoteKeyRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); } @@ -95,7 +96,7 @@ public Builder from(GenerateRemoteKeyRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/interviews/InterviewsClient.java b/src/main/java/com/merge/api/resources/ats/interviews/InterviewsClient.java index a3e1041ff..3f5fbf29d 100644 --- a/src/main/java/com/merge/api/resources/ats/interviews/InterviewsClient.java +++ b/src/main/java/com/merge/api/resources/ats/interviews/InterviewsClient.java @@ -121,7 +121,8 @@ public PaginatedScheduledInterviewList list(InterviewsListRequest request, Reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -178,7 +179,8 @@ public ScheduledInterviewResponse create(ScheduledInterviewEndpointRequest reque .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -199,13 +201,6 @@ public ScheduledInterviewResponse create(ScheduledInterviewEndpointRequest reque } } - /** - * Returns a ScheduledInterview object with the given id. - */ - public ScheduledInterview retrieve(String id) { - return retrieve(id, InterviewsRetrieveRequest.builder().build()); - } - /** * Returns a ScheduledInterview object with the given id. */ @@ -239,7 +234,8 @@ public ScheduledInterview retrieve(String id, InterviewsRetrieveRequest request, .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,6 +276,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsListRequest.java b/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsListRequest.java index ea65ce075..0296b8a99 100644 --- a/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InterviewsListRequest.Builder.class) public final class InterviewsListRequest { private final Optional applicationId; @@ -364,7 +364,7 @@ public Builder applicationId(Optional applicationId) { } public Builder applicationId(String applicationId) { - this.applicationId = Optional.of(applicationId); + this.applicationId = Optional.ofNullable(applicationId); return this; } @@ -375,7 +375,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -386,7 +386,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -397,7 +397,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -408,7 +408,7 @@ public Builder expand(Optional expand) { } public Builder expand(InterviewsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -419,7 +419,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -430,7 +430,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -441,7 +441,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -452,7 +452,7 @@ public Builder jobId(Optional jobId) { } public Builder jobId(String jobId) { - this.jobId = Optional.of(jobId); + this.jobId = Optional.ofNullable(jobId); return this; } @@ -463,7 +463,7 @@ public Builder jobInterviewStageId(Optional jobInterviewStageId) { } public Builder jobInterviewStageId(String jobInterviewStageId) { - this.jobInterviewStageId = Optional.of(jobInterviewStageId); + this.jobInterviewStageId = Optional.ofNullable(jobInterviewStageId); return this; } @@ -474,7 +474,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -485,7 +485,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -496,7 +496,7 @@ public Builder organizerId(Optional organizerId) { } public Builder organizerId(String organizerId) { - this.organizerId = Optional.of(organizerId); + this.organizerId = Optional.ofNullable(organizerId); return this; } @@ -507,7 +507,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -518,7 +518,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -529,7 +529,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -540,7 +540,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsRetrieveRequest.java index 0bc923f2c..5444be32f 100644 --- a/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/interviews/requests/InterviewsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = InterviewsRetrieveRequest.Builder.class) public final class InterviewsRetrieveRequest { private final Optional expand; @@ -138,7 +138,7 @@ public Builder expand(Optional expand) { } public Builder expand(InterviewsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -149,7 +149,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -160,7 +160,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -171,7 +171,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/interviews/requests/ScheduledInterviewEndpointRequest.java b/src/main/java/com/merge/api/resources/ats/interviews/requests/ScheduledInterviewEndpointRequest.java index 1bae777df..b761f42b8 100644 --- a/src/main/java/com/merge/api/resources/ats/interviews/requests/ScheduledInterviewEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ats/interviews/requests/ScheduledInterviewEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScheduledInterviewEndpointRequest.Builder.class) public final class ScheduledInterviewEndpointRequest { private final Optional isDebugMode; @@ -103,13 +104,13 @@ public static ModelStage builder() { } public interface ModelStage { - RemoteUserIdStage model(ScheduledInterviewRequest model); + RemoteUserIdStage model(@NotNull ScheduledInterviewRequest model); Builder from(ScheduledInterviewEndpointRequest other); } public interface RemoteUserIdStage { - _FinalStage remoteUserId(String remoteUserId); + _FinalStage remoteUserId(@NotNull String remoteUserId); } public interface _FinalStage { @@ -150,14 +151,14 @@ public Builder from(ScheduledInterviewEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public RemoteUserIdStage model(ScheduledInterviewRequest model) { + public RemoteUserIdStage model(@NotNull ScheduledInterviewRequest model) { this.model = model; return this; } @java.lang.Override @JsonSetter("remote_user_id") - public _FinalStage remoteUserId(String remoteUserId) { + public _FinalStage remoteUserId(@NotNull String remoteUserId) { this.remoteUserId = remoteUserId; return this; } @@ -168,7 +169,7 @@ public _FinalStage remoteUserId(String remoteUserId) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -185,7 +186,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/issues/IssuesClient.java b/src/main/java/com/merge/api/resources/ats/issues/IssuesClient.java index f6721becd..38ba10ac0 100644 --- a/src/main/java/com/merge/api/resources/ats/issues/IssuesClient.java +++ b/src/main/java/com/merge/api/resources/ats/issues/IssuesClient.java @@ -105,7 +105,8 @@ public PaginatedIssueList list(IssuesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -147,6 +148,7 @@ public Issue retrieve(String id, RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/issues/requests/IssuesListRequest.java b/src/main/java/com/merge/api/resources/ats/issues/requests/IssuesListRequest.java index f4864fc79..a356d42d9 100644 --- a/src/main/java/com/merge/api/resources/ats/issues/requests/IssuesListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/issues/requests/IssuesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IssuesListRequest.Builder.class) public final class IssuesListRequest { private final Optional accountToken; @@ -308,7 +308,7 @@ public Builder accountToken(Optional accountToken) { } public Builder accountToken(String accountToken) { - this.accountToken = Optional.of(accountToken); + this.accountToken = Optional.ofNullable(accountToken); return this; } @@ -319,7 +319,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -330,7 +330,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -341,7 +341,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -352,7 +352,7 @@ public Builder firstIncidentTimeAfter(Optional firstIncidentTime } public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { - this.firstIncidentTimeAfter = Optional.of(firstIncidentTimeAfter); + this.firstIncidentTimeAfter = Optional.ofNullable(firstIncidentTimeAfter); return this; } @@ -363,7 +363,7 @@ public Builder firstIncidentTimeBefore(Optional firstIncidentTim } public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { - this.firstIncidentTimeBefore = Optional.of(firstIncidentTimeBefore); + this.firstIncidentTimeBefore = Optional.ofNullable(firstIncidentTimeBefore); return this; } @@ -374,7 +374,7 @@ public Builder includeMuted(Optional includeMuted) { } public Builder includeMuted(String includeMuted) { - this.includeMuted = Optional.of(includeMuted); + this.includeMuted = Optional.ofNullable(includeMuted); return this; } @@ -385,7 +385,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -396,7 +396,7 @@ public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAf } public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { - this.lastIncidentTimeAfter = Optional.of(lastIncidentTimeAfter); + this.lastIncidentTimeAfter = Optional.ofNullable(lastIncidentTimeAfter); return this; } @@ -407,7 +407,7 @@ public Builder lastIncidentTimeBefore(Optional lastIncidentTimeB } public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { - this.lastIncidentTimeBefore = Optional.of(lastIncidentTimeBefore); + this.lastIncidentTimeBefore = Optional.ofNullable(lastIncidentTimeBefore); return this; } @@ -418,7 +418,7 @@ public Builder linkedAccountId(Optional linkedAccountId) { } public Builder linkedAccountId(String linkedAccountId) { - this.linkedAccountId = Optional.of(linkedAccountId); + this.linkedAccountId = Optional.ofNullable(linkedAccountId); return this; } @@ -429,7 +429,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -440,7 +440,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -451,7 +451,7 @@ public Builder status(Optional status) { } public Builder status(IssuesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/jobinterviewstages/JobInterviewStagesClient.java b/src/main/java/com/merge/api/resources/ats/jobinterviewstages/JobInterviewStagesClient.java index bf46a733a..dd0d00ba7 100644 --- a/src/main/java/com/merge/api/resources/ats/jobinterviewstages/JobInterviewStagesClient.java +++ b/src/main/java/com/merge/api/resources/ats/jobinterviewstages/JobInterviewStagesClient.java @@ -96,7 +96,8 @@ public PaginatedJobInterviewStageList list(JobInterviewStagesListRequest request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedJobInterviewStageList list(JobInterviewStagesListRequest request } } - /** - * Returns a JobInterviewStage object with the given id. - */ - public JobInterviewStage retrieve(String id) { - return retrieve(id, JobInterviewStagesRetrieveRequest.builder().build()); - } - /** * Returns a JobInterviewStage object with the given id. */ @@ -151,7 +145,8 @@ public JobInterviewStage retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesListRequest.java b/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesListRequest.java index a236f366e..16d84bd18 100644 --- a/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobInterviewStagesListRequest.Builder.class) public final class JobInterviewStagesListRequest { private final Optional createdAfter; @@ -278,7 +278,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -289,7 +289,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -300,7 +300,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -311,7 +311,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -322,7 +322,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -333,7 +333,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -344,7 +344,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -355,7 +355,7 @@ public Builder jobId(Optional jobId) { } public Builder jobId(String jobId) { - this.jobId = Optional.of(jobId); + this.jobId = Optional.ofNullable(jobId); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesRetrieveRequest.java index 9a536bdd4..123a55032 100644 --- a/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/jobinterviewstages/requests/JobInterviewStagesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobInterviewStagesRetrieveRequest.Builder.class) public final class JobInterviewStagesRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/jobpostings/JobPostingsClient.java b/src/main/java/com/merge/api/resources/ats/jobpostings/JobPostingsClient.java index 608b25f61..2e66327dc 100644 --- a/src/main/java/com/merge/api/resources/ats/jobpostings/JobPostingsClient.java +++ b/src/main/java/com/merge/api/resources/ats/jobpostings/JobPostingsClient.java @@ -96,7 +96,8 @@ public PaginatedJobPostingList list(JobPostingsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedJobPostingList list(JobPostingsListRequest request, RequestOptio } } - /** - * Returns a JobPosting object with the given id. - */ - public JobPosting retrieve(String id) { - return retrieve(id, JobPostingsRetrieveRequest.builder().build()); - } - /** * Returns a JobPosting object with the given id. */ @@ -150,7 +144,8 @@ public JobPosting retrieve(String id, JobPostingsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsListRequest.java b/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsListRequest.java index 8702938e3..faf4a43d0 100644 --- a/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobPostingsListRequest.Builder.class) public final class JobPostingsListRequest { private final Optional createdAfter; @@ -286,7 +286,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -297,7 +297,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -308,7 +308,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -319,7 +319,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -330,7 +330,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -341,7 +341,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -352,7 +352,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -363,7 +363,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -374,7 +374,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -385,7 +385,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -396,7 +396,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -407,7 +407,7 @@ public Builder status(Optional status) { } public Builder status(JobPostingsListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsRetrieveRequest.java index 243132d6c..3d2ef206c 100644 --- a/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/jobpostings/requests/JobPostingsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobPostingsRetrieveRequest.Builder.class) public final class JobPostingsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/jobs/JobsClient.java b/src/main/java/com/merge/api/resources/ats/jobs/JobsClient.java index afb98afd3..fa6837324 100644 --- a/src/main/java/com/merge/api/resources/ats/jobs/JobsClient.java +++ b/src/main/java/com/merge/api/resources/ats/jobs/JobsClient.java @@ -111,7 +111,8 @@ public PaginatedJobList list(JobsListRequest request, RequestOptions requestOpti .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -132,13 +133,6 @@ public PaginatedJobList list(JobsListRequest request, RequestOptions requestOpti } } - /** - * Returns a Job object with the given id. - */ - public Job retrieve(String id) { - return retrieve(id, JobsRetrieveRequest.builder().build()); - } - /** * Returns a Job object with the given id. */ @@ -172,7 +166,8 @@ public Job retrieve(String id, JobsRetrieveRequest request, RequestOptions reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -193,14 +188,6 @@ public Job retrieve(String id, JobsRetrieveRequest request, RequestOptions reque } } - /** - * Returns a list of ScreeningQuestion objects. - */ - public PaginatedScreeningQuestionList screeningQuestionsList(String jobId) { - return screeningQuestionsList( - jobId, JobsScreeningQuestionsListRequest.builder().build()); - } - /** * Returns a list of ScreeningQuestion objects. */ @@ -245,7 +232,8 @@ public PaginatedScreeningQuestionList screeningQuestionsList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsListRequest.java b/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsListRequest.java index 3f958603d..ff90a1334 100644 --- a/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsListRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobsListRequest.Builder.class) public final class JobsListRequest { private final Optional code; @@ -355,7 +355,7 @@ public Builder code(Optional code) { } public Builder code(String code) { - this.code = Optional.of(code); + this.code = Optional.ofNullable(code); return this; } @@ -366,7 +366,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -377,7 +377,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -388,7 +388,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -399,7 +399,7 @@ public Builder expand(Optional expand) { } public Builder expand(JobsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -410,7 +410,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -421,7 +421,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -432,7 +432,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -443,7 +443,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -454,7 +454,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -465,7 +465,7 @@ public Builder offices(Optional offices) { } public Builder offices(String offices) { - this.offices = Optional.of(offices); + this.offices = Optional.ofNullable(offices); return this; } @@ -476,7 +476,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -487,7 +487,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -498,7 +498,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -509,7 +509,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -520,7 +520,7 @@ public Builder status(Optional status) { } public Builder status(JobsListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsRetrieveRequest.java index 844197b09..b563005ed 100644 --- a/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobsRetrieveRequest.Builder.class) public final class JobsRetrieveRequest { private final Optional expand; @@ -138,7 +138,7 @@ public Builder expand(Optional expand) { } public Builder expand(JobsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -149,7 +149,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -160,7 +160,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -171,7 +171,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsScreeningQuestionsListRequest.java b/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsScreeningQuestionsListRequest.java index 7552bc07f..2711bfa23 100644 --- a/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsScreeningQuestionsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/jobs/requests/JobsScreeningQuestionsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobsScreeningQuestionsListRequest.Builder.class) public final class JobsScreeningQuestionsListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder expand(Optional expand) } public Builder expand(JobsScreeningQuestionsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -198,7 +198,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -209,7 +209,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -220,7 +220,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/linkedaccounts/LinkedAccountsClient.java b/src/main/java/com/merge/api/resources/ats/linkedaccounts/LinkedAccountsClient.java index a6e3f4b05..cb0498dd7 100644 --- a/src/main/java/com/merge/api/resources/ats/linkedaccounts/LinkedAccountsClient.java +++ b/src/main/java/com/merge/api/resources/ats/linkedaccounts/LinkedAccountsClient.java @@ -98,7 +98,8 @@ public PaginatedAccountDetailsAndActionsList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/linkedaccounts/requests/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/resources/ats/linkedaccounts/requests/LinkedAccountsListRequest.java index 43d1e845f..248070471 100644 --- a/src/main/java/com/merge/api/resources/ats/linkedaccounts/requests/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/linkedaccounts/requests/LinkedAccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountsListRequest.Builder.class) public final class LinkedAccountsListRequest { private final Optional category; @@ -301,7 +301,7 @@ public Builder category(Optional category) { } public Builder category(LinkedAccountsListRequestCategory category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -312,7 +312,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -323,7 +323,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -334,7 +334,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -345,7 +345,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -356,7 +356,7 @@ public Builder endUserOriginIds(Optional endUserOriginIds) { } public Builder endUserOriginIds(String endUserOriginIds) { - this.endUserOriginIds = Optional.of(endUserOriginIds); + this.endUserOriginIds = Optional.ofNullable(endUserOriginIds); return this; } @@ -367,7 +367,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -378,7 +378,7 @@ public Builder ids(Optional ids) { } public Builder ids(String ids) { - this.ids = Optional.of(ids); + this.ids = Optional.ofNullable(ids); return this; } @@ -389,7 +389,7 @@ public Builder includeDuplicates(Optional includeDuplicates) { } public Builder includeDuplicates(Boolean includeDuplicates) { - this.includeDuplicates = Optional.of(includeDuplicates); + this.includeDuplicates = Optional.ofNullable(includeDuplicates); return this; } @@ -400,7 +400,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -411,7 +411,7 @@ public Builder isTestAccount(Optional isTestAccount) { } public Builder isTestAccount(String isTestAccount) { - this.isTestAccount = Optional.of(isTestAccount); + this.isTestAccount = Optional.ofNullable(isTestAccount); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/linktoken/LinkTokenClient.java b/src/main/java/com/merge/api/resources/ats/linktoken/LinkTokenClient.java index 9d1a8776a..cd585031b 100644 --- a/src/main/java/com/merge/api/resources/ats/linktoken/LinkTokenClient.java +++ b/src/main/java/com/merge/api/resources/ats/linktoken/LinkTokenClient.java @@ -55,6 +55,7 @@ public LinkToken create(EndUserDetailsRequest request, RequestOptions requestOpt .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/linktoken/requests/EndUserDetailsRequest.java b/src/main/java/com/merge/api/resources/ats/linktoken/requests/EndUserDetailsRequest.java index 7c7ba01b4..4e6850d71 100644 --- a/src/main/java/com/merge/api/resources/ats/linktoken/requests/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/resources/ats/linktoken/requests/EndUserDetailsRequest.java @@ -23,8 +23,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EndUserDetailsRequest.Builder.class) public final class EndUserDetailsRequest { private final String endUserEmailAddress; @@ -252,17 +253,17 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { - EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress); + EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { - EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName); + EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { - _FinalStage endUserOriginId(String endUserOriginId); + _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { @@ -373,7 +374,7 @@ public Builder from(EndUserDetailsRequest other) { */ @java.lang.Override @JsonSetter("end_user_email_address") - public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress) { + public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @@ -384,7 +385,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddre */ @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @@ -395,7 +396,7 @@ public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationNa */ @java.lang.Override @JsonSetter("end_user_origin_id") - public _FinalStage endUserOriginId(String endUserOriginId) { + public _FinalStage endUserOriginId(@NotNull String endUserOriginId) { this.endUserOriginId = endUserOriginId; return this; } @@ -406,7 +407,7 @@ public _FinalStage endUserOriginId(String endUserOriginId) { */ @java.lang.Override public _FinalStage integrationSpecificConfig(Map integrationSpecificConfig) { - this.integrationSpecificConfig = Optional.of(integrationSpecificConfig); + this.integrationSpecificConfig = Optional.ofNullable(integrationSpecificConfig); return this; } @@ -423,7 +424,7 @@ public _FinalStage integrationSpecificConfig(Optional> int */ @java.lang.Override public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { - this.areSyncsDisabled = Optional.of(areSyncsDisabled); + this.areSyncsDisabled = Optional.ofNullable(areSyncsDisabled); return this; } @@ -444,7 +445,7 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { */ @java.lang.Override public _FinalStage language(LanguageEnum language) { - this.language = Optional.of(language); + this.language = Optional.ofNullable(language); return this; } @@ -462,7 +463,7 @@ public _FinalStage language(Optional language) { @java.lang.Override public _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes) { - this.categoryCommonModelScopes = Optional.of(categoryCommonModelScopes); + this.categoryCommonModelScopes = Optional.ofNullable(categoryCommonModelScopes); return this; } @@ -481,7 +482,7 @@ public _FinalStage categoryCommonModelScopes( */ @java.lang.Override public _FinalStage commonModels(List commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -498,7 +499,7 @@ public _FinalStage commonModels(Optional> com */ @java.lang.Override public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { - this.hideAdminMagicLink = Optional.of(hideAdminMagicLink); + this.hideAdminMagicLink = Optional.ofNullable(hideAdminMagicLink); return this; } @@ -515,7 +516,7 @@ public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { */ @java.lang.Override public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { - this.shouldCreateMagicLinkUrl = Optional.of(shouldCreateMagicLinkUrl); + this.shouldCreateMagicLinkUrl = Optional.ofNullable(shouldCreateMagicLinkUrl); return this; } @@ -532,7 +533,7 @@ public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicL */ @java.lang.Override public _FinalStage linkExpiryMins(Integer linkExpiryMins) { - this.linkExpiryMins = Optional.of(linkExpiryMins); + this.linkExpiryMins = Optional.ofNullable(linkExpiryMins); return this; } @@ -549,7 +550,7 @@ public _FinalStage linkExpiryMins(Optional linkExpiryMins) { */ @java.lang.Override public _FinalStage integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/offers/OffersClient.java b/src/main/java/com/merge/api/resources/ats/offers/OffersClient.java index 150c4aef3..ac2b83fdd 100644 --- a/src/main/java/com/merge/api/resources/ats/offers/OffersClient.java +++ b/src/main/java/com/merge/api/resources/ats/offers/OffersClient.java @@ -107,7 +107,8 @@ public PaginatedOfferList list(OffersListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -128,13 +129,6 @@ public PaginatedOfferList list(OffersListRequest request, RequestOptions request } } - /** - * Returns an Offer object with the given id. - */ - public Offer retrieve(String id) { - return retrieve(id, OffersRetrieveRequest.builder().build()); - } - /** * Returns an Offer object with the given id. */ @@ -168,7 +162,8 @@ public Offer retrieve(String id, OffersRetrieveRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/offers/requests/OffersListRequest.java b/src/main/java/com/merge/api/resources/ats/offers/requests/OffersListRequest.java index 862586618..eccd03295 100644 --- a/src/main/java/com/merge/api/resources/ats/offers/requests/OffersListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/offers/requests/OffersListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OffersListRequest.Builder.class) public final class OffersListRequest { private final Optional applicationId; @@ -330,7 +330,7 @@ public Builder applicationId(Optional applicationId) { } public Builder applicationId(String applicationId) { - this.applicationId = Optional.of(applicationId); + this.applicationId = Optional.ofNullable(applicationId); return this; } @@ -341,7 +341,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -352,7 +352,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -363,7 +363,7 @@ public Builder creatorId(Optional creatorId) { } public Builder creatorId(String creatorId) { - this.creatorId = Optional.of(creatorId); + this.creatorId = Optional.ofNullable(creatorId); return this; } @@ -374,7 +374,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -385,7 +385,7 @@ public Builder expand(Optional expand) { } public Builder expand(OffersListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -396,7 +396,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -407,7 +407,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -418,7 +418,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -429,7 +429,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -440,7 +440,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -451,7 +451,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -462,7 +462,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -473,7 +473,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -484,7 +484,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/offers/requests/OffersRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/offers/requests/OffersRetrieveRequest.java index 608ac4a97..ecdd2a680 100644 --- a/src/main/java/com/merge/api/resources/ats/offers/requests/OffersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/offers/requests/OffersRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OffersRetrieveRequest.Builder.class) public final class OffersRetrieveRequest { private final Optional expand; @@ -138,7 +138,7 @@ public Builder expand(Optional expand) { } public Builder expand(OffersRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -149,7 +149,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -160,7 +160,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -171,7 +171,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/offices/OfficesClient.java b/src/main/java/com/merge/api/resources/ats/offices/OfficesClient.java index 67a3d890e..06808d699 100644 --- a/src/main/java/com/merge/api/resources/ats/offices/OfficesClient.java +++ b/src/main/java/com/merge/api/resources/ats/offices/OfficesClient.java @@ -90,7 +90,8 @@ public PaginatedOfficeList list(OfficesListRequest request, RequestOptions reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedOfficeList list(OfficesListRequest request, RequestOptions reque } } - /** - * Returns an Office object with the given id. - */ - public Office retrieve(String id) { - return retrieve(id, OfficesRetrieveRequest.builder().build()); - } - /** * Returns an Office object with the given id. */ @@ -141,7 +135,8 @@ public Office retrieve(String id, OfficesRetrieveRequest request, RequestOptions .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesListRequest.java b/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesListRequest.java index 66ad2a70b..9becaea16 100644 --- a/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OfficesListRequest.Builder.class) public final class OfficesListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesRetrieveRequest.java index 2890cdd4d..82a8d0234 100644 --- a/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/offices/requests/OfficesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OfficesRetrieveRequest.Builder.class) public final class OfficesRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/regeneratekey/RegenerateKeyClient.java b/src/main/java/com/merge/api/resources/ats/regeneratekey/RegenerateKeyClient.java index 1bc3d6021..90a7a9e6f 100644 --- a/src/main/java/com/merge/api/resources/ats/regeneratekey/RegenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/ats/regeneratekey/RegenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(RemoteKeyForRegenerationRequest request, RequestOptions .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/regeneratekey/requests/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/resources/ats/regeneratekey/requests/RemoteKeyForRegenerationRequest.java index 10dbec77e..ba49078e5 100644 --- a/src/main/java/com/merge/api/resources/ats/regeneratekey/requests/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/resources/ats/regeneratekey/requests/RemoteKeyForRegenerationRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKeyForRegenerationRequest.Builder.class) public final class RemoteKeyForRegenerationRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); } @@ -95,7 +96,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/rejectreasons/RejectReasonsClient.java b/src/main/java/com/merge/api/resources/ats/rejectreasons/RejectReasonsClient.java index a24088cc7..8390ceaae 100644 --- a/src/main/java/com/merge/api/resources/ats/rejectreasons/RejectReasonsClient.java +++ b/src/main/java/com/merge/api/resources/ats/rejectreasons/RejectReasonsClient.java @@ -90,7 +90,8 @@ public PaginatedRejectReasonList list(RejectReasonsListRequest request, RequestO .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedRejectReasonList list(RejectReasonsListRequest request, RequestO } } - /** - * Returns a RejectReason object with the given id. - */ - public RejectReason retrieve(String id) { - return retrieve(id, RejectReasonsRetrieveRequest.builder().build()); - } - /** * Returns a RejectReason object with the given id. */ @@ -141,7 +135,8 @@ public RejectReason retrieve(String id, RejectReasonsRetrieveRequest request, Re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsListRequest.java b/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsListRequest.java index 761b41a20..7a6f3e5bd 100644 --- a/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RejectReasonsListRequest.Builder.class) public final class RejectReasonsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsRetrieveRequest.java index 725daf99b..20d543488 100644 --- a/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/rejectreasons/requests/RejectReasonsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RejectReasonsRetrieveRequest.Builder.class) public final class RejectReasonsRetrieveRequest { private final Optional includeRemoteData; @@ -88,7 +88,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/scopes/ScopesClient.java b/src/main/java/com/merge/api/resources/ats/scopes/ScopesClient.java index 0c7cc470e..9d60d9130 100644 --- a/src/main/java/com/merge/api/resources/ats/scopes/ScopesClient.java +++ b/src/main/java/com/merge/api/resources/ats/scopes/ScopesClient.java @@ -48,6 +48,7 @@ public CommonModelScopeApi defaultScopesRetrieve(RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -88,6 +89,7 @@ public CommonModelScopeApi linkedAccountScopesRetrieve(RequestOptions requestOpt .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -136,6 +138,7 @@ public CommonModelScopeApi linkedAccountScopesCreate( .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/ats/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java index 0a9dfaa3c..604416d23 100644 --- a/src/main/java/com/merge/api/resources/ats/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ats/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountCommonModelScopeDeserializerRequest.Builder.class) public final class LinkedAccountCommonModelScopeDeserializerRequest { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/ats/scorecards/ScorecardsClient.java b/src/main/java/com/merge/api/resources/ats/scorecards/ScorecardsClient.java index d1945e7fd..cc42843f1 100644 --- a/src/main/java/com/merge/api/resources/ats/scorecards/ScorecardsClient.java +++ b/src/main/java/com/merge/api/resources/ats/scorecards/ScorecardsClient.java @@ -111,7 +111,8 @@ public PaginatedScorecardList list(ScorecardsListRequest request, RequestOptions .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -132,13 +133,6 @@ public PaginatedScorecardList list(ScorecardsListRequest request, RequestOptions } } - /** - * Returns a Scorecard object with the given id. - */ - public Scorecard retrieve(String id) { - return retrieve(id, ScorecardsRetrieveRequest.builder().build()); - } - /** * Returns a Scorecard object with the given id. */ @@ -172,7 +166,8 @@ public Scorecard retrieve(String id, ScorecardsRetrieveRequest request, RequestO .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsListRequest.java b/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsListRequest.java index 459bceba6..1fad8955e 100644 --- a/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScorecardsListRequest.Builder.class) public final class ScorecardsListRequest { private final Optional applicationId; @@ -347,7 +347,7 @@ public Builder applicationId(Optional applicationId) { } public Builder applicationId(String applicationId) { - this.applicationId = Optional.of(applicationId); + this.applicationId = Optional.ofNullable(applicationId); return this; } @@ -358,7 +358,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -369,7 +369,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -380,7 +380,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -391,7 +391,7 @@ public Builder expand(Optional expand) { } public Builder expand(ScorecardsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -402,7 +402,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -413,7 +413,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -424,7 +424,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -435,7 +435,7 @@ public Builder interviewId(Optional interviewId) { } public Builder interviewId(String interviewId) { - this.interviewId = Optional.of(interviewId); + this.interviewId = Optional.ofNullable(interviewId); return this; } @@ -446,7 +446,7 @@ public Builder interviewerId(Optional interviewerId) { } public Builder interviewerId(String interviewerId) { - this.interviewerId = Optional.of(interviewerId); + this.interviewerId = Optional.ofNullable(interviewerId); return this; } @@ -457,7 +457,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -468,7 +468,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -479,7 +479,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -490,7 +490,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -501,7 +501,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -512,7 +512,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsRetrieveRequest.java index 56f1c1444..d54ffd109 100644 --- a/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/scorecards/requests/ScorecardsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScorecardsRetrieveRequest.Builder.class) public final class ScorecardsRetrieveRequest { private final Optional expand; @@ -138,7 +138,7 @@ public Builder expand(Optional expand) { } public Builder expand(ScorecardsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -149,7 +149,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -160,7 +160,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -171,7 +171,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/syncstatus/SyncStatusClient.java b/src/main/java/com/merge/api/resources/ats/syncstatus/SyncStatusClient.java index aaef7db3d..b9533d672 100644 --- a/src/main/java/com/merge/api/resources/ats/syncstatus/SyncStatusClient.java +++ b/src/main/java/com/merge/api/resources/ats/syncstatus/SyncStatusClient.java @@ -56,7 +56,8 @@ public PaginatedSyncStatusList list(SyncStatusListRequest request, RequestOption .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/syncstatus/requests/SyncStatusListRequest.java b/src/main/java/com/merge/api/resources/ats/syncstatus/requests/SyncStatusListRequest.java index 10036c310..6f35684a8 100644 --- a/src/main/java/com/merge/api/resources/ats/syncstatus/requests/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/syncstatus/requests/SyncStatusListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatusListRequest.Builder.class) public final class SyncStatusListRequest { private final Optional cursor; @@ -102,7 +102,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -113,7 +113,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/tags/TagsClient.java b/src/main/java/com/merge/api/resources/ats/tags/TagsClient.java index f36a46e49..16d4567d0 100644 --- a/src/main/java/com/merge/api/resources/ats/tags/TagsClient.java +++ b/src/main/java/com/merge/api/resources/ats/tags/TagsClient.java @@ -88,7 +88,8 @@ public PaginatedTagList list(TagsListRequest request, RequestOptions requestOpti .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/tags/requests/TagsListRequest.java b/src/main/java/com/merge/api/resources/ats/tags/requests/TagsListRequest.java index e6c174435..56973dd80 100644 --- a/src/main/java/com/merge/api/resources/ats/tags/requests/TagsListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/tags/requests/TagsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TagsListRequest.Builder.class) public final class TagsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AccountDetails.java b/src/main/java/com/merge/api/resources/ats/types/AccountDetails.java index f0cc41603..fde2ee7d6 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AccountDetails.java +++ b/src/main/java/com/merge/api/resources/ats/types/AccountDetails.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetails.Builder.class) public final class AccountDetails { private final Optional id; @@ -248,7 +248,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -259,7 +259,7 @@ public Builder integration(Optional integration) { } public Builder integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -270,7 +270,7 @@ public Builder integrationSlug(Optional integrationSlug) { } public Builder integrationSlug(String integrationSlug) { - this.integrationSlug = Optional.of(integrationSlug); + this.integrationSlug = Optional.ofNullable(integrationSlug); return this; } @@ -281,7 +281,7 @@ public Builder category(Optional category) { } public Builder category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -292,7 +292,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -303,7 +303,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -314,7 +314,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -325,7 +325,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -336,7 +336,7 @@ public Builder webhookListenerUrl(Optional webhookListenerUrl) { } public Builder webhookListenerUrl(String webhookListenerUrl) { - this.webhookListenerUrl = Optional.of(webhookListenerUrl); + this.webhookListenerUrl = Optional.ofNullable(webhookListenerUrl); return this; } @@ -347,7 +347,7 @@ public Builder isDuplicate(Optional isDuplicate) { } public Builder isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -358,7 +358,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(String accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -369,7 +369,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActions.java index caa2b6139..3b3ce6193 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActions.Builder.class) public final class AccountDetailsAndActions { private final String id; @@ -206,33 +207,33 @@ public static IdStage builder() { } public interface IdStage { - StatusStage id(String id); + StatusStage id(@NotNull String id); Builder from(AccountDetailsAndActions other); } public interface StatusStage { - EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); } public interface EndUserOrganizationNameStage { - EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName); + EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserEmailAddressStage { - WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress); + WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress); } public interface WebhookListenerUrlStage { - AccountTypeStage webhookListenerUrl(String webhookListenerUrl); + AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl); } public interface AccountTypeStage { - CompletedAtStage accountType(String accountType); + CompletedAtStage accountType(@NotNull String accountType); } public interface CompletedAtStage { - _FinalStage completedAt(OffsetDateTime completedAt); + _FinalStage completedAt(@NotNull OffsetDateTime completedAt); } public interface _FinalStage { @@ -324,56 +325,56 @@ public Builder from(AccountDetailsAndActions other) { @java.lang.Override @JsonSetter("id") - public StatusStage id(String id) { + public StatusStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { this.status = status; return this; } @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @java.lang.Override @JsonSetter("end_user_email_address") - public WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress) { + public WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @java.lang.Override @JsonSetter("webhook_listener_url") - public AccountTypeStage webhookListenerUrl(String webhookListenerUrl) { + public AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl) { this.webhookListenerUrl = webhookListenerUrl; return this; } @java.lang.Override @JsonSetter("account_type") - public CompletedAtStage accountType(String accountType) { + public CompletedAtStage accountType(@NotNull String accountType) { this.accountType = accountType; return this; } @java.lang.Override @JsonSetter("completed_at") - public _FinalStage completedAt(OffsetDateTime completedAt) { + public _FinalStage completedAt(@NotNull OffsetDateTime completedAt) { this.completedAt = completedAt; return this; } @java.lang.Override public _FinalStage integration(AccountDetailsAndActionsIntegration integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -390,7 +391,7 @@ public _FinalStage integration(Optional int */ @java.lang.Override public _FinalStage isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -407,7 +408,7 @@ public _FinalStage isDuplicate(Optional isDuplicate) { */ @java.lang.Override public _FinalStage subdomain(String subdomain) { - this.subdomain = Optional.of(subdomain); + this.subdomain = Optional.ofNullable(subdomain); return this; } @@ -420,7 +421,7 @@ public _FinalStage subdomain(Optional subdomain) { @java.lang.Override public _FinalStage endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -433,7 +434,7 @@ public _FinalStage endUserOriginId(Optional endUserOriginId) { @java.lang.Override public _FinalStage statusDetail(String statusDetail) { - this.statusDetail = Optional.of(statusDetail); + this.statusDetail = Optional.ofNullable(statusDetail); return this; } @@ -446,7 +447,7 @@ public _FinalStage statusDetail(Optional statusDetail) { @java.lang.Override public _FinalStage category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActionsIntegration.java b/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActionsIntegration.java index 0bb76ccc0..0b4a09859 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActionsIntegration.java +++ b/src/main/java/com/merge/api/resources/ats/types/AccountDetailsAndActionsIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActionsIntegration.Builder.class) public final class AccountDetailsAndActionsIntegration { private final String name; @@ -147,17 +148,17 @@ public static NameStage builder() { } public interface NameStage { - ColorStage name(String name); + ColorStage name(@NotNull String name); Builder from(AccountDetailsAndActionsIntegration other); } public interface ColorStage { - SlugStage color(String color); + SlugStage color(@NotNull String color); } public interface SlugStage { - PassthroughAvailableStage slug(String slug); + PassthroughAvailableStage slug(@NotNull String slug); } public interface PassthroughAvailableStage { @@ -225,21 +226,21 @@ public Builder from(AccountDetailsAndActionsIntegration other) { @java.lang.Override @JsonSetter("name") - public ColorStage name(String name) { + public ColorStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("color") - public SlugStage color(String color) { + public SlugStage color(@NotNull String color) { this.color = color; return this; } @java.lang.Override @JsonSetter("slug") - public PassthroughAvailableStage slug(String slug) { + public PassthroughAvailableStage slug(@NotNull String slug) { this.slug = slug; return this; } @@ -253,7 +254,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } @@ -266,7 +267,7 @@ public _FinalStage availableModelOperations(Optional> avail @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -279,7 +280,7 @@ public _FinalStage squareImage(Optional squareImage) { @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AccountIntegration.java b/src/main/java/com/merge/api/resources/ats/types/AccountIntegration.java index b152daed4..b5d5122d5 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/resources/ats/types/AccountIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountIntegration.Builder.class) public final class AccountIntegration { private final String name; @@ -195,7 +196,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); } @@ -288,7 +289,7 @@ public Builder from(AccountIntegration other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } @@ -299,7 +300,7 @@ public _FinalStage name(String name) { */ @java.lang.Override public _FinalStage categoryBetaStatus(Map categoryBetaStatus) { - this.categoryBetaStatus = Optional.of(categoryBetaStatus); + this.categoryBetaStatus = Optional.ofNullable(categoryBetaStatus); return this; } @@ -316,7 +317,7 @@ public _FinalStage categoryBetaStatus(Optional> categoryBe */ @java.lang.Override public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { - this.webhookSetupGuideUrl = Optional.of(webhookSetupGuideUrl); + this.webhookSetupGuideUrl = Optional.ofNullable(webhookSetupGuideUrl); return this; } @@ -333,7 +334,7 @@ public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { */ @java.lang.Override public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls) { - this.apiEndpointsToDocumentationUrls = Optional.of(apiEndpointsToDocumentationUrls); + this.apiEndpointsToDocumentationUrls = Optional.ofNullable(apiEndpointsToDocumentationUrls); return this; } @@ -347,7 +348,7 @@ public _FinalStage apiEndpointsToDocumentationUrls( @java.lang.Override public _FinalStage slug(String slug) { - this.slug = Optional.of(slug); + this.slug = Optional.ofNullable(slug); return this; } @@ -364,7 +365,7 @@ public _FinalStage slug(Optional slug) { */ @java.lang.Override public _FinalStage color(String color) { - this.color = Optional.of(color); + this.color = Optional.ofNullable(color); return this; } @@ -381,7 +382,7 @@ public _FinalStage color(Optional color) { */ @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -398,7 +399,7 @@ public _FinalStage squareImage(Optional squareImage) { */ @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } @@ -415,7 +416,7 @@ public _FinalStage image(Optional image) { */ @java.lang.Override public _FinalStage categories(List categories) { - this.categories = Optional.of(categories); + this.categories = Optional.ofNullable(categories); return this; } @@ -432,7 +433,7 @@ public _FinalStage categories(Optional> categories) { */ @java.lang.Override public _FinalStage abbreviatedName(String abbreviatedName) { - this.abbreviatedName = Optional.of(abbreviatedName); + this.abbreviatedName = Optional.ofNullable(abbreviatedName); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AccountToken.java b/src/main/java/com/merge/api/resources/ats/types/AccountToken.java index acd0a04b3..6acc06eee 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AccountToken.java +++ b/src/main/java/com/merge/api/resources/ats/types/AccountToken.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountToken.Builder.class) public final class AccountToken { private final String accountToken; @@ -71,13 +72,13 @@ public static AccountTokenStage builder() { } public interface AccountTokenStage { - IntegrationStage accountToken(String accountToken); + IntegrationStage accountToken(@NotNull String accountToken); Builder from(AccountToken other); } public interface IntegrationStage { - _FinalStage integration(AccountIntegration integration); + _FinalStage integration(@NotNull AccountIntegration integration); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(AccountToken other) { @java.lang.Override @JsonSetter("account_token") - public IntegrationStage accountToken(String accountToken) { + public IntegrationStage accountToken(@NotNull String accountToken) { this.accountToken = accountToken; return this; } @java.lang.Override @JsonSetter("integration") - public _FinalStage integration(AccountIntegration integration) { + public _FinalStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Activity.java b/src/main/java/com/merge/api/resources/ats/types/Activity.java index 75a89a35e..26a61cda5 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Activity.java +++ b/src/main/java/com/merge/api/resources/ats/types/Activity.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Activity.Builder.class) public final class Activity { private final Optional id; @@ -312,7 +312,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -323,7 +323,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -334,7 +334,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -345,7 +345,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -356,7 +356,7 @@ public Builder user(Optional user) { } public Builder user(ActivityUser user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -367,7 +367,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -378,7 +378,7 @@ public Builder activityType(Optional activityType) { } public Builder activityType(ActivityActivityType activityType) { - this.activityType = Optional.of(activityType); + this.activityType = Optional.ofNullable(activityType); return this; } @@ -389,7 +389,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -400,7 +400,7 @@ public Builder body(Optional body) { } public Builder body(String body) { - this.body = Optional.of(body); + this.body = Optional.ofNullable(body); return this; } @@ -411,7 +411,7 @@ public Builder visibility(Optional visibility) { } public Builder visibility(ActivityVisibility visibility) { - this.visibility = Optional.of(visibility); + this.visibility = Optional.ofNullable(visibility); return this; } @@ -422,7 +422,7 @@ public Builder candidate(Optional candidate) { } public Builder candidate(String candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -433,7 +433,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -444,7 +444,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -455,7 +455,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ActivityRequest.java b/src/main/java/com/merge/api/resources/ats/types/ActivityRequest.java index ab358ee1c..226a85e22 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ActivityRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/ActivityRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ActivityRequest.Builder.class) public final class ActivityRequest { private final Optional user; @@ -211,7 +211,7 @@ public Builder user(Optional user) { } public Builder user(ActivityRequestUser user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -222,7 +222,7 @@ public Builder activityType(Optional activityType) } public Builder activityType(ActivityRequestActivityType activityType) { - this.activityType = Optional.of(activityType); + this.activityType = Optional.ofNullable(activityType); return this; } @@ -233,7 +233,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -244,7 +244,7 @@ public Builder body(Optional body) { } public Builder body(String body) { - this.body = Optional.of(body); + this.body = Optional.ofNullable(body); return this; } @@ -255,7 +255,7 @@ public Builder visibility(Optional visibility) { } public Builder visibility(ActivityRequestVisibility visibility) { - this.visibility = Optional.of(visibility); + this.visibility = Optional.ofNullable(visibility); return this; } @@ -266,7 +266,7 @@ public Builder candidate(Optional candidate) { } public Builder candidate(String candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -277,7 +277,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -288,7 +288,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ActivityResponse.java b/src/main/java/com/merge/api/resources/ats/types/ActivityResponse.java index d9639f675..bf2070b5b 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ActivityResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/ActivityResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ActivityResponse.Builder.class) public final class ActivityResponse { private final Activity model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Activity model); + _FinalStage model(@NotNull Activity model); Builder from(ActivityResponse other); } @@ -149,14 +150,14 @@ public Builder from(ActivityResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Activity model) { + public _FinalStage model(@NotNull Activity model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AdvancedMetadata.java b/src/main/java/com/merge/api/resources/ats/types/AdvancedMetadata.java index a7887f442..26743ca5f 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AdvancedMetadata.java +++ b/src/main/java/com/merge/api/resources/ats/types/AdvancedMetadata.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AdvancedMetadata.Builder.class) public final class AdvancedMetadata { private final String id; @@ -119,7 +120,7 @@ public static IdStage builder() { } public interface IdStage { - _FinalStage id(String id); + _FinalStage id(@NotNull String id); Builder from(AdvancedMetadata other); } @@ -180,14 +181,14 @@ public Builder from(AdvancedMetadata other) { @java.lang.Override @JsonSetter("id") - public _FinalStage id(String id) { + public _FinalStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override public _FinalStage fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -200,7 +201,7 @@ public _FinalStage fieldChoices(Optional> fieldChoices) { @java.lang.Override public _FinalStage isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -213,7 +214,7 @@ public _FinalStage isCustom(Optional isCustom) { @java.lang.Override public _FinalStage isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -226,7 +227,7 @@ public _FinalStage isRequired(Optional isRequired) { @java.lang.Override public _FinalStage description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -239,7 +240,7 @@ public _FinalStage description(Optional description) { @java.lang.Override public _FinalStage displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Application.java b/src/main/java/com/merge/api/resources/ats/types/Application.java index 398ad4fdf..8fa42dddc 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Application.java +++ b/src/main/java/com/merge/api/resources/ats/types/Application.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Application.Builder.class) public final class Application { private final Optional id; @@ -350,7 +350,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -361,7 +361,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -372,7 +372,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -383,7 +383,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -394,7 +394,7 @@ public Builder candidate(Optional candidate) { } public Builder candidate(ApplicationCandidate candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -405,7 +405,7 @@ public Builder job(Optional job) { } public Builder job(ApplicationJob job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -416,7 +416,7 @@ public Builder appliedAt(Optional appliedAt) { } public Builder appliedAt(OffsetDateTime appliedAt) { - this.appliedAt = Optional.of(appliedAt); + this.appliedAt = Optional.ofNullable(appliedAt); return this; } @@ -427,7 +427,7 @@ public Builder rejectedAt(Optional rejectedAt) { } public Builder rejectedAt(OffsetDateTime rejectedAt) { - this.rejectedAt = Optional.of(rejectedAt); + this.rejectedAt = Optional.ofNullable(rejectedAt); return this; } @@ -438,7 +438,7 @@ public Builder offers(Optional>> offers) { } public Builder offers(List> offers) { - this.offers = Optional.of(offers); + this.offers = Optional.ofNullable(offers); return this; } @@ -449,7 +449,7 @@ public Builder source(Optional source) { } public Builder source(String source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } @@ -460,7 +460,7 @@ public Builder creditedTo(Optional creditedTo) { } public Builder creditedTo(ApplicationCreditedTo creditedTo) { - this.creditedTo = Optional.of(creditedTo); + this.creditedTo = Optional.ofNullable(creditedTo); return this; } @@ -473,7 +473,7 @@ public Builder screeningQuestionAnswers( public Builder screeningQuestionAnswers( List screeningQuestionAnswers) { - this.screeningQuestionAnswers = Optional.of(screeningQuestionAnswers); + this.screeningQuestionAnswers = Optional.ofNullable(screeningQuestionAnswers); return this; } @@ -484,7 +484,7 @@ public Builder currentStage(Optional currentStage) { } public Builder currentStage(ApplicationCurrentStage currentStage) { - this.currentStage = Optional.of(currentStage); + this.currentStage = Optional.ofNullable(currentStage); return this; } @@ -495,7 +495,7 @@ public Builder rejectReason(Optional rejectReason) { } public Builder rejectReason(ApplicationRejectReason rejectReason) { - this.rejectReason = Optional.of(rejectReason); + this.rejectReason = Optional.ofNullable(rejectReason); return this; } @@ -506,7 +506,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -517,7 +517,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -528,7 +528,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ApplicationRequest.java b/src/main/java/com/merge/api/resources/ats/types/ApplicationRequest.java index 9611c28d1..fc6755949 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ApplicationRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/ApplicationRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ApplicationRequest.Builder.class) public final class ApplicationRequest { private final Optional candidate; @@ -283,7 +283,7 @@ public Builder candidate(Optional candidate) { } public Builder candidate(ApplicationRequestCandidate candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -294,7 +294,7 @@ public Builder job(Optional job) { } public Builder job(ApplicationRequestJob job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -305,7 +305,7 @@ public Builder appliedAt(Optional appliedAt) { } public Builder appliedAt(OffsetDateTime appliedAt) { - this.appliedAt = Optional.of(appliedAt); + this.appliedAt = Optional.ofNullable(appliedAt); return this; } @@ -316,7 +316,7 @@ public Builder rejectedAt(Optional rejectedAt) { } public Builder rejectedAt(OffsetDateTime rejectedAt) { - this.rejectedAt = Optional.of(rejectedAt); + this.rejectedAt = Optional.ofNullable(rejectedAt); return this; } @@ -327,7 +327,7 @@ public Builder offers(Optional>> off } public Builder offers(List> offers) { - this.offers = Optional.of(offers); + this.offers = Optional.ofNullable(offers); return this; } @@ -338,7 +338,7 @@ public Builder source(Optional source) { } public Builder source(String source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } @@ -349,7 +349,7 @@ public Builder creditedTo(Optional creditedTo) { } public Builder creditedTo(ApplicationRequestCreditedTo creditedTo) { - this.creditedTo = Optional.of(creditedTo); + this.creditedTo = Optional.ofNullable(creditedTo); return this; } @@ -362,7 +362,7 @@ public Builder screeningQuestionAnswers( public Builder screeningQuestionAnswers( List screeningQuestionAnswers) { - this.screeningQuestionAnswers = Optional.of(screeningQuestionAnswers); + this.screeningQuestionAnswers = Optional.ofNullable(screeningQuestionAnswers); return this; } @@ -373,7 +373,7 @@ public Builder currentStage(Optional currentStag } public Builder currentStage(ApplicationRequestCurrentStage currentStage) { - this.currentStage = Optional.of(currentStage); + this.currentStage = Optional.ofNullable(currentStage); return this; } @@ -384,7 +384,7 @@ public Builder rejectReason(Optional rejectReaso } public Builder rejectReason(ApplicationRequestRejectReason rejectReason) { - this.rejectReason = Optional.of(rejectReason); + this.rejectReason = Optional.ofNullable(rejectReason); return this; } @@ -395,7 +395,7 @@ public Builder remoteTemplateId(Optional remoteTemplateId) { } public Builder remoteTemplateId(String remoteTemplateId) { - this.remoteTemplateId = Optional.of(remoteTemplateId); + this.remoteTemplateId = Optional.ofNullable(remoteTemplateId); return this; } @@ -406,7 +406,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -417,7 +417,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ApplicationResponse.java b/src/main/java/com/merge/api/resources/ats/types/ApplicationResponse.java index cd29db7d6..a771af8cb 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ApplicationResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/ApplicationResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ApplicationResponse.Builder.class) public final class ApplicationResponse { private final Application model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Application model); + _FinalStage model(@NotNull Application model); Builder from(ApplicationResponse other); } @@ -149,14 +150,14 @@ public Builder from(ApplicationResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Application model) { + public _FinalStage model(@NotNull Application model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AsyncPassthroughReciept.java b/src/main/java/com/merge/api/resources/ats/types/AsyncPassthroughReciept.java index 615dcb2a0..5762d11c7 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AsyncPassthroughReciept.java +++ b/src/main/java/com/merge/api/resources/ats/types/AsyncPassthroughReciept.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPassthroughReciept.Builder.class) public final class AsyncPassthroughReciept { private final String asyncPassthroughReceiptId; @@ -62,7 +63,7 @@ public static AsyncPassthroughReceiptIdStage builder() { } public interface AsyncPassthroughReceiptIdStage { - _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId); + _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId); Builder from(AsyncPassthroughReciept other); } @@ -88,7 +89,7 @@ public Builder from(AsyncPassthroughReciept other) { @java.lang.Override @JsonSetter("async_passthrough_receipt_id") - public _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId) { + public _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId) { this.asyncPassthroughReceiptId = asyncPassthroughReceiptId; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Attachment.java b/src/main/java/com/merge/api/resources/ats/types/Attachment.java index d06a67d13..044ace13e 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Attachment.java +++ b/src/main/java/com/merge/api/resources/ats/types/Attachment.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Attachment.Builder.class) public final class Attachment { private final Optional id; @@ -260,7 +260,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -271,7 +271,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -282,7 +282,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -293,7 +293,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -304,7 +304,7 @@ public Builder fileName(Optional fileName) { } public Builder fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -315,7 +315,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -326,7 +326,7 @@ public Builder candidate(Optional candidate) { } public Builder candidate(String candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -337,7 +337,7 @@ public Builder attachmentType(Optional attachmentType) } public Builder attachmentType(AttachmentAttachmentType attachmentType) { - this.attachmentType = Optional.of(attachmentType); + this.attachmentType = Optional.ofNullable(attachmentType); return this; } @@ -348,7 +348,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -359,7 +359,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -370,7 +370,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AttachmentRequest.java b/src/main/java/com/merge/api/resources/ats/types/AttachmentRequest.java index 9c03b38df..028785ad7 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AttachmentRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/AttachmentRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentRequest.Builder.class) public final class AttachmentRequest { private final Optional fileName; @@ -176,7 +176,7 @@ public Builder fileName(Optional fileName) { } public Builder fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -187,7 +187,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -198,7 +198,7 @@ public Builder candidate(Optional candidate) { } public Builder candidate(String candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -209,7 +209,7 @@ public Builder attachmentType(Optional attachme } public Builder attachmentType(AttachmentRequestAttachmentType attachmentType) { - this.attachmentType = Optional.of(attachmentType); + this.attachmentType = Optional.ofNullable(attachmentType); return this; } @@ -220,7 +220,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -231,7 +231,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AttachmentResponse.java b/src/main/java/com/merge/api/resources/ats/types/AttachmentResponse.java index bab185187..26e82de90 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AttachmentResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/AttachmentResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentResponse.Builder.class) public final class AttachmentResponse { private final Attachment model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Attachment model); + _FinalStage model(@NotNull Attachment model); Builder from(AttachmentResponse other); } @@ -149,14 +150,14 @@ public Builder from(AttachmentResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Attachment model) { + public _FinalStage model(@NotNull Attachment model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AuditLogEvent.java b/src/main/java/com/merge/api/resources/ats/types/AuditLogEvent.java index dc4982011..105c5fb50 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/resources/ats/types/AuditLogEvent.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditLogEvent.Builder.class) public final class AuditLogEvent { private final Optional id; @@ -208,21 +209,21 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(AuditLogEventRole role); + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } public interface IpAddressStage { - EventTypeStage ipAddress(String ipAddress); + EventTypeStage ipAddress(@NotNull String ipAddress); } public interface EventTypeStage { - EventDescriptionStage eventType(AuditLogEventEventType eventType); + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { - _FinalStage eventDescription(String eventDescription); + _FinalStage eventDescription(@NotNull String eventDescription); } public interface _FinalStage { @@ -296,14 +297,14 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(AuditLogEventRole role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @java.lang.Override @JsonSetter("ip_address") - public EventTypeStage ipAddress(String ipAddress) { + public EventTypeStage ipAddress(@NotNull String ipAddress) { this.ipAddress = ipAddress; return this; } @@ -357,21 +358,21 @@ public EventTypeStage ipAddress(String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(AuditLogEventEventType eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @java.lang.Override @JsonSetter("event_description") - public _FinalStage eventDescription(String eventDescription) { + public _FinalStage eventDescription(@NotNull String eventDescription) { this.eventDescription = eventDescription; return this; } @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -388,7 +389,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } @@ -405,7 +406,7 @@ public _FinalStage userEmail(Optional userEmail) { */ @java.lang.Override public _FinalStage userName(String userName) { - this.userName = Optional.of(userName); + this.userName = Optional.ofNullable(userName); return this; } @@ -418,7 +419,7 @@ public _FinalStage userName(Optional userName) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/AvailableActions.java b/src/main/java/com/merge/api/resources/ats/types/AvailableActions.java index d3b88fd38..5c4725223 100644 --- a/src/main/java/com/merge/api/resources/ats/types/AvailableActions.java +++ b/src/main/java/com/merge/api/resources/ats/types/AvailableActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AvailableActions.Builder.class) public final class AvailableActions { private final AccountIntegration integration; @@ -87,7 +88,7 @@ public static IntegrationStage builder() { } public interface IntegrationStage { - PassthroughAvailableStage integration(AccountIntegration integration); + PassthroughAvailableStage integration(@NotNull AccountIntegration integration); Builder from(AvailableActions other); } @@ -127,7 +128,7 @@ public Builder from(AvailableActions other) { @java.lang.Override @JsonSetter("integration") - public PassthroughAvailableStage integration(AccountIntegration integration) { + public PassthroughAvailableStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } @@ -141,7 +142,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Candidate.java b/src/main/java/com/merge/api/resources/ats/types/Candidate.java index 6b5c4e6ce..f6766c464 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Candidate.java +++ b/src/main/java/com/merge/api/resources/ats/types/Candidate.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Candidate.Builder.class) public final class Candidate { private final Optional id; @@ -449,7 +449,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -460,7 +460,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -471,7 +471,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -482,7 +482,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -493,7 +493,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -504,7 +504,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -515,7 +515,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -526,7 +526,7 @@ public Builder title(Optional title) { } public Builder title(String title) { - this.title = Optional.of(title); + this.title = Optional.ofNullable(title); return this; } @@ -537,7 +537,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -548,7 +548,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -559,7 +559,7 @@ public Builder lastInteractionAt(Optional lastInteractionAt) { } public Builder lastInteractionAt(OffsetDateTime lastInteractionAt) { - this.lastInteractionAt = Optional.of(lastInteractionAt); + this.lastInteractionAt = Optional.ofNullable(lastInteractionAt); return this; } @@ -570,7 +570,7 @@ public Builder isPrivate(Optional isPrivate) { } public Builder isPrivate(Boolean isPrivate) { - this.isPrivate = Optional.of(isPrivate); + this.isPrivate = Optional.ofNullable(isPrivate); return this; } @@ -581,7 +581,7 @@ public Builder canEmail(Optional canEmail) { } public Builder canEmail(Boolean canEmail) { - this.canEmail = Optional.of(canEmail); + this.canEmail = Optional.ofNullable(canEmail); return this; } @@ -592,7 +592,7 @@ public Builder locations(Optional>> locations) { } public Builder locations(List> locations) { - this.locations = Optional.of(locations); + this.locations = Optional.ofNullable(locations); return this; } @@ -603,7 +603,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -614,7 +614,7 @@ public Builder emailAddresses(Optional> emailAddresses) { } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -625,7 +625,7 @@ public Builder urls(Optional> urls) { } public Builder urls(List urls) { - this.urls = Optional.of(urls); + this.urls = Optional.ofNullable(urls); return this; } @@ -636,7 +636,7 @@ public Builder tags(Optional>> tags) { } public Builder tags(List> tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } @@ -647,7 +647,7 @@ public Builder applications(Optional>> } public Builder applications(List> applications) { - this.applications = Optional.of(applications); + this.applications = Optional.ofNullable(applications); return this; } @@ -658,7 +658,7 @@ public Builder attachments(Optional>> at } public Builder attachments(List> attachments) { - this.attachments = Optional.of(attachments); + this.attachments = Optional.ofNullable(attachments); return this; } @@ -669,7 +669,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -680,7 +680,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -691,7 +691,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/CandidateRequest.java b/src/main/java/com/merge/api/resources/ats/types/CandidateRequest.java index 0ecfa236c..131e15c6b 100644 --- a/src/main/java/com/merge/api/resources/ats/types/CandidateRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/CandidateRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CandidateRequest.Builder.class) public final class CandidateRequest { private final Optional firstName; @@ -347,7 +347,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -358,7 +358,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -369,7 +369,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -380,7 +380,7 @@ public Builder title(Optional title) { } public Builder title(String title) { - this.title = Optional.of(title); + this.title = Optional.ofNullable(title); return this; } @@ -391,7 +391,7 @@ public Builder lastInteractionAt(Optional lastInteractionAt) { } public Builder lastInteractionAt(OffsetDateTime lastInteractionAt) { - this.lastInteractionAt = Optional.of(lastInteractionAt); + this.lastInteractionAt = Optional.ofNullable(lastInteractionAt); return this; } @@ -402,7 +402,7 @@ public Builder isPrivate(Optional isPrivate) { } public Builder isPrivate(Boolean isPrivate) { - this.isPrivate = Optional.of(isPrivate); + this.isPrivate = Optional.ofNullable(isPrivate); return this; } @@ -413,7 +413,7 @@ public Builder canEmail(Optional canEmail) { } public Builder canEmail(Boolean canEmail) { - this.canEmail = Optional.of(canEmail); + this.canEmail = Optional.ofNullable(canEmail); return this; } @@ -424,7 +424,7 @@ public Builder locations(Optional>> locations) { } public Builder locations(List> locations) { - this.locations = Optional.of(locations); + this.locations = Optional.ofNullable(locations); return this; } @@ -435,7 +435,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -446,7 +446,7 @@ public Builder emailAddresses(Optional> emailAddresses } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -457,7 +457,7 @@ public Builder urls(Optional> urls) { } public Builder urls(List urls) { - this.urls = Optional.of(urls); + this.urls = Optional.ofNullable(urls); return this; } @@ -468,7 +468,7 @@ public Builder tags(Optional>> tags) { } public Builder tags(List> tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } @@ -479,7 +479,7 @@ public Builder applications(Optional> applications) { - this.applications = Optional.of(applications); + this.applications = Optional.ofNullable(applications); return this; } @@ -490,7 +490,7 @@ public Builder attachments(Optional> attachments) { - this.attachments = Optional.of(attachments); + this.attachments = Optional.ofNullable(attachments); return this; } @@ -501,7 +501,7 @@ public Builder remoteTemplateId(Optional remoteTemplateId) { } public Builder remoteTemplateId(String remoteTemplateId) { - this.remoteTemplateId = Optional.of(remoteTemplateId); + this.remoteTemplateId = Optional.ofNullable(remoteTemplateId); return this; } @@ -512,7 +512,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -523,7 +523,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/CandidateResponse.java b/src/main/java/com/merge/api/resources/ats/types/CandidateResponse.java index 48357a377..650560abd 100644 --- a/src/main/java/com/merge/api/resources/ats/types/CandidateResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/CandidateResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CandidateResponse.Builder.class) public final class CandidateResponse { private final Candidate model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Candidate model); + _FinalStage model(@NotNull Candidate model); Builder from(CandidateResponse other); } @@ -149,14 +150,14 @@ public Builder from(CandidateResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Candidate model) { + public _FinalStage model(@NotNull Candidate model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/resources/ats/types/CommonModelScopeApi.java index 6ed98840c..765f05e43 100644 --- a/src/main/java/com/merge/api/resources/ats/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/resources/ats/types/CommonModelScopeApi.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopeApi.Builder.class) public final class CommonModelScopeApi { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/ats/types/CommonModelScopesBodyRequest.java b/src/main/java/com/merge/api/resources/ats/types/CommonModelScopesBodyRequest.java index a642fee5b..ac3ab167f 100644 --- a/src/main/java/com/merge/api/resources/ats/types/CommonModelScopesBodyRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/CommonModelScopesBodyRequest.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopesBodyRequest.Builder.class) public final class CommonModelScopesBodyRequest { private final String modelId; @@ -87,7 +88,7 @@ public static ModelIdStage builder() { } public interface ModelIdStage { - _FinalStage modelId(String modelId); + _FinalStage modelId(@NotNull String modelId); Builder from(CommonModelScopesBodyRequest other); } @@ -131,7 +132,7 @@ public Builder from(CommonModelScopesBodyRequest other) { @java.lang.Override @JsonSetter("model_id") - public _FinalStage modelId(String modelId) { + public _FinalStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/resources/ats/types/DataPassthroughRequest.java index 3149579d7..ca53229a8 100644 --- a/src/main/java/com/merge/api/resources/ats/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/DataPassthroughRequest.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DataPassthroughRequest.Builder.class) public final class DataPassthroughRequest { private final MethodEnum method; @@ -164,13 +165,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(MethodEnum method); + PathStage method(@NotNull MethodEnum method); Builder from(DataPassthroughRequest other); } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); } public interface _FinalStage { @@ -239,7 +240,7 @@ public Builder from(DataPassthroughRequest other) { @java.lang.Override @JsonSetter("method") - public PathStage method(MethodEnum method) { + public PathStage method(@NotNull MethodEnum method) { this.method = method; return this; } @@ -250,7 +251,7 @@ public PathStage method(MethodEnum method) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @@ -261,7 +262,7 @@ public _FinalStage path(String path) { */ @java.lang.Override public _FinalStage normalizeResponse(Boolean normalizeResponse) { - this.normalizeResponse = Optional.of(normalizeResponse); + this.normalizeResponse = Optional.ofNullable(normalizeResponse); return this; } @@ -274,7 +275,7 @@ public _FinalStage normalizeResponse(Optional normalizeResponse) { @java.lang.Override public _FinalStage requestFormat(RequestFormatEnum requestFormat) { - this.requestFormat = Optional.of(requestFormat); + this.requestFormat = Optional.ofNullable(requestFormat); return this; } @@ -291,7 +292,7 @@ public _FinalStage requestFormat(Optional requestFormat) { */ @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -308,7 +309,7 @@ public _FinalStage headers(Optional> headers) { */ @java.lang.Override public _FinalStage multipartFormData(List multipartFormData) { - this.multipartFormData = Optional.of(multipartFormData); + this.multipartFormData = Optional.ofNullable(multipartFormData); return this; } @@ -325,7 +326,7 @@ public _FinalStage multipartFormData(Optional> m */ @java.lang.Override public _FinalStage data(String data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } @@ -342,7 +343,7 @@ public _FinalStage data(Optional data) { */ @java.lang.Override public _FinalStage baseUrlOverride(String baseUrlOverride) { - this.baseUrlOverride = Optional.of(baseUrlOverride); + this.baseUrlOverride = Optional.ofNullable(baseUrlOverride); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/DebugModeLog.java b/src/main/java/com/merge/api/resources/ats/types/DebugModeLog.java index 4e62bc1fa..23d6a12eb 100644 --- a/src/main/java/com/merge/api/resources/ats/types/DebugModeLog.java +++ b/src/main/java/com/merge/api/resources/ats/types/DebugModeLog.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModeLog.Builder.class) public final class DebugModeLog { private final String logId; @@ -84,17 +85,17 @@ public static LogIdStage builder() { } public interface LogIdStage { - DashboardViewStage logId(String logId); + DashboardViewStage logId(@NotNull String logId); Builder from(DebugModeLog other); } public interface DashboardViewStage { - LogSummaryStage dashboardView(String dashboardView); + LogSummaryStage dashboardView(@NotNull String dashboardView); } public interface LogSummaryStage { - _FinalStage logSummary(DebugModelLogSummary logSummary); + _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary); } public interface _FinalStage { @@ -124,21 +125,21 @@ public Builder from(DebugModeLog other) { @java.lang.Override @JsonSetter("log_id") - public DashboardViewStage logId(String logId) { + public DashboardViewStage logId(@NotNull String logId) { this.logId = logId; return this; } @java.lang.Override @JsonSetter("dashboard_view") - public LogSummaryStage dashboardView(String dashboardView) { + public LogSummaryStage dashboardView(@NotNull String dashboardView) { this.dashboardView = dashboardView; return this; } @java.lang.Override @JsonSetter("log_summary") - public _FinalStage logSummary(DebugModelLogSummary logSummary) { + public _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary) { this.logSummary = logSummary; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/DebugModelLogSummary.java b/src/main/java/com/merge/api/resources/ats/types/DebugModelLogSummary.java index 8124b9c76..a562bf01c 100644 --- a/src/main/java/com/merge/api/resources/ats/types/DebugModelLogSummary.java +++ b/src/main/java/com/merge/api/resources/ats/types/DebugModelLogSummary.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModelLogSummary.Builder.class) public final class DebugModelLogSummary { private final String url; @@ -78,13 +79,13 @@ public static UrlStage builder() { } public interface UrlStage { - MethodStage url(String url); + MethodStage url(@NotNull String url); Builder from(DebugModelLogSummary other); } public interface MethodStage { - StatusCodeStage method(String method); + StatusCodeStage method(@NotNull String method); } public interface StatusCodeStage { @@ -118,14 +119,14 @@ public Builder from(DebugModelLogSummary other) { @java.lang.Override @JsonSetter("url") - public MethodStage url(String url) { + public MethodStage url(@NotNull String url) { this.url = url; return this; } @java.lang.Override @JsonSetter("method") - public StatusCodeStage method(String method) { + public StatusCodeStage method(@NotNull String method) { this.method = method; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Department.java b/src/main/java/com/merge/api/resources/ats/types/Department.java index d13269d2a..42ddc5324 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Department.java +++ b/src/main/java/com/merge/api/resources/ats/types/Department.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Department.Builder.class) public final class Department { private final Optional id; @@ -203,7 +203,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -214,7 +214,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -225,7 +225,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -236,7 +236,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -247,7 +247,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -258,7 +258,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -269,7 +269,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -280,7 +280,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Eeoc.java b/src/main/java/com/merge/api/resources/ats/types/Eeoc.java index f9d822f7e..a6f1df3ee 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Eeoc.java +++ b/src/main/java/com/merge/api/resources/ats/types/Eeoc.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Eeoc.Builder.class) public final class Eeoc { private final Optional id; @@ -315,7 +315,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -326,7 +326,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -337,7 +337,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -348,7 +348,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -359,7 +359,7 @@ public Builder candidate(Optional candidate) { } public Builder candidate(EeocCandidate candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -370,7 +370,7 @@ public Builder submittedAt(Optional submittedAt) { } public Builder submittedAt(OffsetDateTime submittedAt) { - this.submittedAt = Optional.of(submittedAt); + this.submittedAt = Optional.ofNullable(submittedAt); return this; } @@ -381,7 +381,7 @@ public Builder race(Optional race) { } public Builder race(EeocRace race) { - this.race = Optional.of(race); + this.race = Optional.ofNullable(race); return this; } @@ -392,7 +392,7 @@ public Builder gender(Optional gender) { } public Builder gender(EeocGender gender) { - this.gender = Optional.of(gender); + this.gender = Optional.ofNullable(gender); return this; } @@ -403,7 +403,7 @@ public Builder veteranStatus(Optional veteranStatus) { } public Builder veteranStatus(EeocVeteranStatus veteranStatus) { - this.veteranStatus = Optional.of(veteranStatus); + this.veteranStatus = Optional.ofNullable(veteranStatus); return this; } @@ -414,7 +414,7 @@ public Builder disabilityStatus(Optional disabilityStatus) } public Builder disabilityStatus(EeocDisabilityStatus disabilityStatus) { - this.disabilityStatus = Optional.of(disabilityStatus); + this.disabilityStatus = Optional.ofNullable(disabilityStatus); return this; } @@ -425,7 +425,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -436,7 +436,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -447,7 +447,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/EmailAddress.java b/src/main/java/com/merge/api/resources/ats/types/EmailAddress.java index 74c1d1ff7..3bfc073a8 100644 --- a/src/main/java/com/merge/api/resources/ats/types/EmailAddress.java +++ b/src/main/java/com/merge/api/resources/ats/types/EmailAddress.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmailAddress.Builder.class) public final class EmailAddress { private final Optional createdAt; @@ -159,7 +159,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -170,7 +170,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -181,7 +181,7 @@ public Builder value(Optional value) { } public Builder value(String value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -192,7 +192,7 @@ public Builder emailAddressType(Optional emailAddr } public Builder emailAddressType(EmailAddressEmailAddressType emailAddressType) { - this.emailAddressType = Optional.of(emailAddressType); + this.emailAddressType = Optional.ofNullable(emailAddressType); return this; } @@ -203,7 +203,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/EmailAddressRequest.java b/src/main/java/com/merge/api/resources/ats/types/EmailAddressRequest.java index 1eb7ac1b0..546cc387f 100644 --- a/src/main/java/com/merge/api/resources/ats/types/EmailAddressRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/EmailAddressRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmailAddressRequest.Builder.class) public final class EmailAddressRequest { private final Optional value; @@ -137,7 +137,7 @@ public Builder value(Optional value) { } public Builder value(String value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -148,7 +148,7 @@ public Builder emailAddressType(Optional em } public Builder emailAddressType(EmailAddressRequestEmailAddressType emailAddressType) { - this.emailAddressType = Optional.of(emailAddressType); + this.emailAddressType = Optional.ofNullable(emailAddressType); return this; } @@ -159,7 +159,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -170,7 +170,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ErrorValidationProblem.java b/src/main/java/com/merge/api/resources/ats/types/ErrorValidationProblem.java index b39b87363..a8eb977e0 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ErrorValidationProblem.java +++ b/src/main/java/com/merge/api/resources/ats/types/ErrorValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ErrorValidationProblem.Builder.class) public final class ErrorValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(ErrorValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(ErrorValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApi.java b/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApi.java index b52d7a4d7..e382f3ccf 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApi.java +++ b/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApi.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApi.Builder.class) public final class ExternalTargetFieldApi { private final Optional name; @@ -110,7 +110,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -121,7 +121,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -132,7 +132,7 @@ public Builder isMapped(Optional isMapped) { } public Builder isMapped(String isMapped) { - this.isMapped = Optional.of(isMapped); + this.isMapped = Optional.ofNullable(isMapped); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApiResponse.java b/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApiResponse.java index 609892a57..83fde0d1a 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/ExternalTargetFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApiResponse.Builder.class) public final class ExternalTargetFieldApiResponse { private final Optional> activity; @@ -298,7 +298,7 @@ public Builder activity(Optional> activity) { } public Builder activity(List activity) { - this.activity = Optional.of(activity); + this.activity = Optional.ofNullable(activity); return this; } @@ -309,7 +309,7 @@ public Builder application(Optional> application) { } public Builder application(List application) { - this.application = Optional.of(application); + this.application = Optional.ofNullable(application); return this; } @@ -320,7 +320,7 @@ public Builder attachment(Optional> attachment) { } public Builder attachment(List attachment) { - this.attachment = Optional.of(attachment); + this.attachment = Optional.ofNullable(attachment); return this; } @@ -331,7 +331,7 @@ public Builder candidate(Optional> candidate) { } public Builder candidate(List candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -342,7 +342,7 @@ public Builder department(Optional> department) { } public Builder department(List department) { - this.department = Optional.of(department); + this.department = Optional.ofNullable(department); return this; } @@ -353,7 +353,7 @@ public Builder eeoc(Optional> eeoc) { } public Builder eeoc(List eeoc) { - this.eeoc = Optional.of(eeoc); + this.eeoc = Optional.ofNullable(eeoc); return this; } @@ -364,7 +364,7 @@ public Builder scheduledInterview(Optional> schedul } public Builder scheduledInterview(List scheduledInterview) { - this.scheduledInterview = Optional.of(scheduledInterview); + this.scheduledInterview = Optional.ofNullable(scheduledInterview); return this; } @@ -375,7 +375,7 @@ public Builder job(Optional> job) { } public Builder job(List job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -386,7 +386,7 @@ public Builder jobPosting(Optional> jobPosting) { } public Builder jobPosting(List jobPosting) { - this.jobPosting = Optional.of(jobPosting); + this.jobPosting = Optional.ofNullable(jobPosting); return this; } @@ -397,7 +397,7 @@ public Builder jobInterviewStage(Optional> jobInter } public Builder jobInterviewStage(List jobInterviewStage) { - this.jobInterviewStage = Optional.of(jobInterviewStage); + this.jobInterviewStage = Optional.ofNullable(jobInterviewStage); return this; } @@ -408,7 +408,7 @@ public Builder offer(Optional> offer) { } public Builder offer(List offer) { - this.offer = Optional.of(offer); + this.offer = Optional.ofNullable(offer); return this; } @@ -419,7 +419,7 @@ public Builder office(Optional> office) { } public Builder office(List office) { - this.office = Optional.of(office); + this.office = Optional.ofNullable(office); return this; } @@ -430,7 +430,7 @@ public Builder rejectReason(Optional> rejectReason) } public Builder rejectReason(List rejectReason) { - this.rejectReason = Optional.of(rejectReason); + this.rejectReason = Optional.ofNullable(rejectReason); return this; } @@ -441,7 +441,7 @@ public Builder scorecard(Optional> scorecard) { } public Builder scorecard(List scorecard) { - this.scorecard = Optional.of(scorecard); + this.scorecard = Optional.ofNullable(scorecard); return this; } @@ -452,7 +452,7 @@ public Builder tag(Optional> tag) { } public Builder tag(List tag) { - this.tag = Optional.of(tag); + this.tag = Optional.ofNullable(tag); return this; } @@ -463,7 +463,7 @@ public Builder remoteUser(Optional> remoteUser) { } public Builder remoteUser(List remoteUser) { - this.remoteUser = Optional.of(remoteUser); + this.remoteUser = Optional.ofNullable(remoteUser); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstance.java b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstance.java index 81eea2d92..7b33ce11f 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstance.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstance.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstance.Builder.class) public final class FieldMappingApiInstance { private final Optional id; @@ -125,7 +125,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -136,7 +136,7 @@ public Builder isIntegrationWide(Optional isIntegrationWide) { } public Builder isIntegrationWide(Boolean isIntegrationWide) { - this.isIntegrationWide = Optional.of(isIntegrationWide); + this.isIntegrationWide = Optional.ofNullable(isIntegrationWide); return this; } @@ -147,7 +147,7 @@ public Builder targetField(Optional targetFi } public Builder targetField(FieldMappingApiInstanceTargetField targetField) { - this.targetField = Optional.of(targetField); + this.targetField = Optional.ofNullable(targetField); return this; } @@ -158,7 +158,7 @@ public Builder remoteField(Optional remoteFi } public Builder remoteField(FieldMappingApiInstanceRemoteField remoteField) { - this.remoteField = Optional.of(remoteField); + this.remoteField = Optional.ofNullable(remoteField); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteField.java b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteField.java index 51ed68eb5..eeac3b3d8 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteField.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteField.Builder.class) public final class FieldMappingApiInstanceRemoteField { private final Optional remoteKeyName; @@ -88,7 +89,8 @@ public static RemoteEndpointInfoStage builder() { } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); Builder from(FieldMappingApiInstanceRemoteField other); } @@ -128,14 +130,15 @@ public Builder from(FieldMappingApiInstanceRemoteField other) { @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage schema(Map schema) { - this.schema = Optional.of(schema); + this.schema = Optional.ofNullable(schema); return this; } @@ -148,7 +151,7 @@ public _FinalStage schema(Optional> schema) { @java.lang.Override public _FinalStage remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java index baa6d110e..0f356ac84 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Builder.class) public final class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { private final Optional method; @@ -114,7 +114,7 @@ public Builder method(Optional method) { } public Builder method(String method) { - this.method = Optional.of(method); + this.method = Optional.ofNullable(method); return this; } @@ -125,7 +125,7 @@ public Builder urlPath(Optional urlPath) { } public Builder urlPath(String urlPath) { - this.urlPath = Optional.of(urlPath); + this.urlPath = Optional.ofNullable(urlPath); return this; } @@ -136,7 +136,7 @@ public Builder fieldTraversalPath(Optional> fieldTraversalPath) { } public Builder fieldTraversalPath(List fieldTraversalPath) { - this.fieldTraversalPath = Optional.of(fieldTraversalPath); + this.fieldTraversalPath = Optional.ofNullable(fieldTraversalPath); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceResponse.java b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceResponse.java index 8cfcb6504..9a3d8e591 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceResponse.Builder.class) public final class FieldMappingApiInstanceResponse { private final Optional> activity; @@ -298,7 +298,7 @@ public Builder activity(Optional> activity) { } public Builder activity(List activity) { - this.activity = Optional.of(activity); + this.activity = Optional.ofNullable(activity); return this; } @@ -309,7 +309,7 @@ public Builder application(Optional> application) } public Builder application(List application) { - this.application = Optional.of(application); + this.application = Optional.ofNullable(application); return this; } @@ -320,7 +320,7 @@ public Builder attachment(Optional> attachment) { } public Builder attachment(List attachment) { - this.attachment = Optional.of(attachment); + this.attachment = Optional.ofNullable(attachment); return this; } @@ -331,7 +331,7 @@ public Builder candidate(Optional> candidate) { } public Builder candidate(List candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -342,7 +342,7 @@ public Builder department(Optional> department) { } public Builder department(List department) { - this.department = Optional.of(department); + this.department = Optional.ofNullable(department); return this; } @@ -353,7 +353,7 @@ public Builder eeoc(Optional> eeoc) { } public Builder eeoc(List eeoc) { - this.eeoc = Optional.of(eeoc); + this.eeoc = Optional.ofNullable(eeoc); return this; } @@ -364,7 +364,7 @@ public Builder scheduledInterview(Optional> schedu } public Builder scheduledInterview(List scheduledInterview) { - this.scheduledInterview = Optional.of(scheduledInterview); + this.scheduledInterview = Optional.ofNullable(scheduledInterview); return this; } @@ -375,7 +375,7 @@ public Builder job(Optional> job) { } public Builder job(List job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -386,7 +386,7 @@ public Builder jobPosting(Optional> jobPosting) { } public Builder jobPosting(List jobPosting) { - this.jobPosting = Optional.of(jobPosting); + this.jobPosting = Optional.ofNullable(jobPosting); return this; } @@ -397,7 +397,7 @@ public Builder jobInterviewStage(Optional> jobInte } public Builder jobInterviewStage(List jobInterviewStage) { - this.jobInterviewStage = Optional.of(jobInterviewStage); + this.jobInterviewStage = Optional.ofNullable(jobInterviewStage); return this; } @@ -408,7 +408,7 @@ public Builder offer(Optional> offer) { } public Builder offer(List offer) { - this.offer = Optional.of(offer); + this.offer = Optional.ofNullable(offer); return this; } @@ -419,7 +419,7 @@ public Builder office(Optional> office) { } public Builder office(List office) { - this.office = Optional.of(office); + this.office = Optional.ofNullable(office); return this; } @@ -430,7 +430,7 @@ public Builder rejectReason(Optional> rejectReason } public Builder rejectReason(List rejectReason) { - this.rejectReason = Optional.of(rejectReason); + this.rejectReason = Optional.ofNullable(rejectReason); return this; } @@ -441,7 +441,7 @@ public Builder scorecard(Optional> scorecard) { } public Builder scorecard(List scorecard) { - this.scorecard = Optional.of(scorecard); + this.scorecard = Optional.ofNullable(scorecard); return this; } @@ -452,7 +452,7 @@ public Builder tag(Optional> tag) { } public Builder tag(List tag) { - this.tag = Optional.of(tag); + this.tag = Optional.ofNullable(tag); return this; } @@ -463,7 +463,7 @@ public Builder remoteUser(Optional> remoteUser) { } public Builder remoteUser(List remoteUser) { - this.remoteUser = Optional.of(remoteUser); + this.remoteUser = Optional.ofNullable(remoteUser); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceTargetField.java b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceTargetField.java index c43d17e3f..117253ca4 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceTargetField.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldMappingApiInstanceTargetField.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceTargetField.Builder.class) public final class FieldMappingApiInstanceTargetField { private final String name; @@ -82,13 +83,13 @@ public static NameStage builder() { } public interface NameStage { - DescriptionStage name(String name); + DescriptionStage name(@NotNull String name); Builder from(FieldMappingApiInstanceTargetField other); } public interface DescriptionStage { - IsOrganizationWideStage description(String description); + IsOrganizationWideStage description(@NotNull String description); } public interface IsOrganizationWideStage { @@ -122,14 +123,14 @@ public Builder from(FieldMappingApiInstanceTargetField other) { @java.lang.Override @JsonSetter("name") - public DescriptionStage name(String name) { + public DescriptionStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("description") - public IsOrganizationWideStage description(String description) { + public IsOrganizationWideStage description(@NotNull String description) { this.description = description; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldMappingInstanceResponse.java b/src/main/java/com/merge/api/resources/ats/types/FieldMappingInstanceResponse.java index 70d7aa723..6355358b4 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldMappingInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldMappingInstanceResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingInstanceResponse.Builder.class) public final class FieldMappingInstanceResponse { private final FieldMappingApiInstance model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FieldMappingApiInstance model); + _FinalStage model(@NotNull FieldMappingApiInstance model); Builder from(FieldMappingInstanceResponse other); } @@ -149,14 +150,14 @@ public Builder from(FieldMappingInstanceResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FieldMappingApiInstance model) { + public _FinalStage model(@NotNull FieldMappingApiInstance model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializer.java b/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializer.java index df12c268d..44ff29437 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializer.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializer.Builder.class) public final class FieldPermissionDeserializer { private final Optional> enabledFields; @@ -100,7 +100,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -111,7 +111,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializerRequest.java index 95d180256..a0bb14a8f 100644 --- a/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/FieldPermissionDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializerRequest.Builder.class) public final class FieldPermissionDeserializerRequest { private final Optional> enabledFields; @@ -101,7 +101,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -112,7 +112,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializer.java b/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializer.java index d8cb9e993..979346f72 100644 --- a/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializer.java +++ b/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializer.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializer.Builder.class) public final class IndividualCommonModelScopeDeserializer { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializer other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializer other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializer fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional fieldP @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.java index b648b1c65..c218099bc 100644 --- a/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/IndividualCommonModelScopeDeserializerRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializerRequest.Builder.class) public final class IndividualCommonModelScopeDeserializerRequest { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializerRequest other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializerRequest other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializerRequest fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Issue.java b/src/main/java/com/merge/api/resources/ats/types/Issue.java index 187947279..ad13c7086 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Issue.java +++ b/src/main/java/com/merge/api/resources/ats/types/Issue.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Issue.Builder.class) public final class Issue { private final Optional id; @@ -154,7 +155,7 @@ public static ErrorDescriptionStage builder() { } public interface ErrorDescriptionStage { - _FinalStage errorDescription(String errorDescription); + _FinalStage errorDescription(@NotNull String errorDescription); Builder from(Issue other); } @@ -229,14 +230,14 @@ public Builder from(Issue other) { @java.lang.Override @JsonSetter("error_description") - public _FinalStage errorDescription(String errorDescription) { + public _FinalStage errorDescription(@NotNull String errorDescription) { this.errorDescription = errorDescription; return this; } @java.lang.Override public _FinalStage errorDetails(List errorDetails) { - this.errorDetails = Optional.of(errorDetails); + this.errorDetails = Optional.ofNullable(errorDetails); return this; } @@ -249,7 +250,7 @@ public _FinalStage errorDetails(Optional> errorDetails) { @java.lang.Override public _FinalStage isMuted(Boolean isMuted) { - this.isMuted = Optional.of(isMuted); + this.isMuted = Optional.ofNullable(isMuted); return this; } @@ -262,7 +263,7 @@ public _FinalStage isMuted(Optional isMuted) { @java.lang.Override public _FinalStage lastIncidentTime(OffsetDateTime lastIncidentTime) { - this.lastIncidentTime = Optional.of(lastIncidentTime); + this.lastIncidentTime = Optional.ofNullable(lastIncidentTime); return this; } @@ -275,7 +276,7 @@ public _FinalStage lastIncidentTime(Optional lastIncidentTime) { @java.lang.Override public _FinalStage firstIncidentTime(OffsetDateTime firstIncidentTime) { - this.firstIncidentTime = Optional.of(firstIncidentTime); + this.firstIncidentTime = Optional.ofNullable(firstIncidentTime); return this; } @@ -288,7 +289,7 @@ public _FinalStage firstIncidentTime(Optional firstIncidentTime) @java.lang.Override public _FinalStage endUser(Map endUser) { - this.endUser = Optional.of(endUser); + this.endUser = Optional.ofNullable(endUser); return this; } @@ -309,7 +310,7 @@ public _FinalStage endUser(Optional> endUser) { */ @java.lang.Override public _FinalStage status(IssueStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -322,7 +323,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Job.java b/src/main/java/com/merge/api/resources/ats/types/Job.java index e20a14c0c..e41a3f926 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Job.java +++ b/src/main/java/com/merge/api/resources/ats/types/Job.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Job.Builder.class) public final class Job { private final Optional id; @@ -433,7 +433,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -444,7 +444,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -455,7 +455,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -466,7 +466,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -477,7 +477,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -488,7 +488,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -499,7 +499,7 @@ public Builder code(Optional code) { } public Builder code(String code) { - this.code = Optional.of(code); + this.code = Optional.ofNullable(code); return this; } @@ -510,7 +510,7 @@ public Builder status(Optional status) { } public Builder status(JobStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -521,7 +521,7 @@ public Builder type(Optional type) { } public Builder type(JobTypeEnum type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -532,7 +532,7 @@ public Builder jobPostings(Optional>> jobPostings) { } public Builder jobPostings(List> jobPostings) { - this.jobPostings = Optional.of(jobPostings); + this.jobPostings = Optional.ofNullable(jobPostings); return this; } @@ -543,7 +543,7 @@ public Builder jobPostingUrls(Optional> jobPostingUrls) { } public Builder jobPostingUrls(List jobPostingUrls) { - this.jobPostingUrls = Optional.of(jobPostingUrls); + this.jobPostingUrls = Optional.ofNullable(jobPostingUrls); return this; } @@ -554,7 +554,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -565,7 +565,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -576,7 +576,7 @@ public Builder confidential(Optional confidential) { } public Builder confidential(Boolean confidential) { - this.confidential = Optional.of(confidential); + this.confidential = Optional.ofNullable(confidential); return this; } @@ -587,7 +587,7 @@ public Builder departments(Optional>> departme } public Builder departments(List> departments) { - this.departments = Optional.of(departments); + this.departments = Optional.ofNullable(departments); return this; } @@ -598,7 +598,7 @@ public Builder offices(Optional>> offices) { } public Builder offices(List> offices) { - this.offices = Optional.of(offices); + this.offices = Optional.ofNullable(offices); return this; } @@ -609,7 +609,7 @@ public Builder hiringManagers(Optional>> hi } public Builder hiringManagers(List> hiringManagers) { - this.hiringManagers = Optional.of(hiringManagers); + this.hiringManagers = Optional.ofNullable(hiringManagers); return this; } @@ -620,7 +620,7 @@ public Builder recruiters(Optional>> recruiters } public Builder recruiters(List> recruiters) { - this.recruiters = Optional.of(recruiters); + this.recruiters = Optional.ofNullable(recruiters); return this; } @@ -631,7 +631,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -642,7 +642,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -653,7 +653,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/JobInterviewStage.java b/src/main/java/com/merge/api/resources/ats/types/JobInterviewStage.java index 7e9687819..cd9e8bcd3 100644 --- a/src/main/java/com/merge/api/resources/ats/types/JobInterviewStage.java +++ b/src/main/java/com/merge/api/resources/ats/types/JobInterviewStage.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobInterviewStage.Builder.class) public final class JobInterviewStage { private final Optional id; @@ -237,7 +237,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -248,7 +248,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -259,7 +259,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -270,7 +270,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -281,7 +281,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -292,7 +292,7 @@ public Builder job(Optional job) { } public Builder job(JobInterviewStageJob job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -303,7 +303,7 @@ public Builder stageOrder(Optional stageOrder) { } public Builder stageOrder(Integer stageOrder) { - this.stageOrder = Optional.of(stageOrder); + this.stageOrder = Optional.ofNullable(stageOrder); return this; } @@ -314,7 +314,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -325,7 +325,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -336,7 +336,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/JobPosting.java b/src/main/java/com/merge/api/resources/ats/types/JobPosting.java index 2a3eecd3a..6a27cc6ed 100644 --- a/src/main/java/com/merge/api/resources/ats/types/JobPosting.java +++ b/src/main/java/com/merge/api/resources/ats/types/JobPosting.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = JobPosting.Builder.class) public final class JobPosting { private final Optional id; @@ -329,7 +329,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -340,7 +340,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -351,7 +351,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -362,7 +362,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -373,7 +373,7 @@ public Builder title(Optional title) { } public Builder title(String title) { - this.title = Optional.of(title); + this.title = Optional.ofNullable(title); return this; } @@ -384,7 +384,7 @@ public Builder jobPostingUrls(Optional> jobPo } public Builder jobPostingUrls(List jobPostingUrls) { - this.jobPostingUrls = Optional.of(jobPostingUrls); + this.jobPostingUrls = Optional.ofNullable(jobPostingUrls); return this; } @@ -395,7 +395,7 @@ public Builder job(Optional job) { } public Builder job(JobPostingJob job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -406,7 +406,7 @@ public Builder status(Optional status) { } public Builder status(JobPostingStatusEnum status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -417,7 +417,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -428,7 +428,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -439,7 +439,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -450,7 +450,7 @@ public Builder isInternal(Optional isInternal) { } public Builder isInternal(Boolean isInternal) { - this.isInternal = Optional.of(isInternal); + this.isInternal = Optional.ofNullable(isInternal); return this; } @@ -461,7 +461,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -472,7 +472,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -483,7 +483,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/LinkToken.java b/src/main/java/com/merge/api/resources/ats/types/LinkToken.java index 1d9a72a46..0974edc34 100644 --- a/src/main/java/com/merge/api/resources/ats/types/LinkToken.java +++ b/src/main/java/com/merge/api/resources/ats/types/LinkToken.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkToken.Builder.class) public final class LinkToken { private final String linkToken; @@ -86,7 +87,7 @@ public static LinkTokenStage builder() { } public interface LinkTokenStage { - _FinalStage linkToken(String linkToken); + _FinalStage linkToken(@NotNull String linkToken); Builder from(LinkToken other); } @@ -126,14 +127,14 @@ public Builder from(LinkToken other) { @java.lang.Override @JsonSetter("link_token") - public _FinalStage linkToken(String linkToken) { + public _FinalStage linkToken(@NotNull String linkToken) { this.linkToken = linkToken; return this; } @java.lang.Override public _FinalStage magicLinkUrl(String magicLinkUrl) { - this.magicLinkUrl = Optional.of(magicLinkUrl); + this.magicLinkUrl = Optional.ofNullable(magicLinkUrl); return this; } @@ -146,7 +147,7 @@ public _FinalStage magicLinkUrl(Optional magicLinkUrl) { @java.lang.Override public _FinalStage integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/LinkedAccountStatus.java b/src/main/java/com/merge/api/resources/ats/types/LinkedAccountStatus.java index 37a417ac2..603119e83 100644 --- a/src/main/java/com/merge/api/resources/ats/types/LinkedAccountStatus.java +++ b/src/main/java/com/merge/api/resources/ats/types/LinkedAccountStatus.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountStatus.Builder.class) public final class LinkedAccountStatus { private final String linkedAccountStatus; @@ -71,7 +72,7 @@ public static LinkedAccountStatusStage builder() { } public interface LinkedAccountStatusStage { - CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus); + CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus); Builder from(LinkedAccountStatus other); } @@ -104,7 +105,7 @@ public Builder from(LinkedAccountStatus other) { @java.lang.Override @JsonSetter("linked_account_status") - public CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus) { + public CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus) { this.linkedAccountStatus = linkedAccountStatus; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/MetaResponse.java b/src/main/java/com/merge/api/resources/ats/types/MetaResponse.java index 5b6d0fefd..c536109b8 100644 --- a/src/main/java/com/merge/api/resources/ats/types/MetaResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/MetaResponse.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MetaResponse.Builder.class) public final class MetaResponse { private final Map requestSchema; @@ -184,7 +184,7 @@ public _FinalStage hasRequiredLinkedAccountParams(boolean hasRequiredLinkedAccou @java.lang.Override public _FinalStage status(LinkedAccountStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -197,7 +197,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage remoteFieldClasses(Map remoteFieldClasses) { - this.remoteFieldClasses = Optional.of(remoteFieldClasses); + this.remoteFieldClasses = Optional.ofNullable(remoteFieldClasses); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ModelOperation.java b/src/main/java/com/merge/api/resources/ats/types/ModelOperation.java index e5f0d6db1..09da41faa 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ModelOperation.java +++ b/src/main/java/com/merge/api/resources/ats/types/ModelOperation.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelOperation.Builder.class) public final class ModelOperation { private final String modelName; @@ -98,7 +99,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(ModelOperation other); } @@ -151,7 +152,7 @@ public Builder from(ModelOperation other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializer.java b/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializer.java index 6d0d65429..5bd856be3 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializer.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializer.Builder.class) public final class ModelPermissionDeserializer { private final Optional isEnabled; @@ -84,7 +84,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializerRequest.java index 09a236ad8..3670f25cb 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/ModelPermissionDeserializerRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializerRequest.Builder.class) public final class ModelPermissionDeserializerRequest { private final Optional isEnabled; @@ -85,7 +85,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/resources/ats/types/MultipartFormFieldRequest.java index 6c952aade..94682fda3 100644 --- a/src/main/java/com/merge/api/resources/ats/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/MultipartFormFieldRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MultipartFormFieldRequest.Builder.class) public final class MultipartFormFieldRequest { private final String name; @@ -126,13 +127,13 @@ public static NameStage builder() { } public interface NameStage { - DataStage name(String name); + DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { - _FinalStage data(String data); + _FinalStage data(@NotNull String data); } public interface _FinalStage { @@ -184,7 +185,7 @@ public Builder from(MultipartFormFieldRequest other) { */ @java.lang.Override @JsonSetter("name") - public DataStage name(String name) { + public DataStage name(@NotNull String name) { this.name = name; return this; } @@ -195,7 +196,7 @@ public DataStage name(String name) { */ @java.lang.Override @JsonSetter("data") - public _FinalStage data(String data) { + public _FinalStage data(@NotNull String data) { this.data = data; return this; } @@ -206,7 +207,7 @@ public _FinalStage data(String data) { */ @java.lang.Override public _FinalStage contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -223,7 +224,7 @@ public _FinalStage contentType(Optional contentType) { */ @java.lang.Override public _FinalStage fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -245,7 +246,7 @@ public _FinalStage fileName(Optional fileName) { */ @java.lang.Override public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { - this.encoding = Optional.of(encoding); + this.encoding = Optional.ofNullable(encoding); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Offer.java b/src/main/java/com/merge/api/resources/ats/types/Offer.java index 8ddeccea7..3354e8911 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Offer.java +++ b/src/main/java/com/merge/api/resources/ats/types/Offer.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Offer.Builder.class) public final class Offer { private final Optional id; @@ -316,7 +316,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -327,7 +327,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -338,7 +338,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -349,7 +349,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -360,7 +360,7 @@ public Builder application(Optional application) { } public Builder application(OfferApplication application) { - this.application = Optional.of(application); + this.application = Optional.ofNullable(application); return this; } @@ -371,7 +371,7 @@ public Builder creator(Optional creator) { } public Builder creator(OfferCreator creator) { - this.creator = Optional.of(creator); + this.creator = Optional.ofNullable(creator); return this; } @@ -382,7 +382,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -393,7 +393,7 @@ public Builder closedAt(Optional closedAt) { } public Builder closedAt(OffsetDateTime closedAt) { - this.closedAt = Optional.of(closedAt); + this.closedAt = Optional.ofNullable(closedAt); return this; } @@ -404,7 +404,7 @@ public Builder sentAt(Optional sentAt) { } public Builder sentAt(OffsetDateTime sentAt) { - this.sentAt = Optional.of(sentAt); + this.sentAt = Optional.ofNullable(sentAt); return this; } @@ -415,7 +415,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(OffsetDateTime startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -426,7 +426,7 @@ public Builder status(Optional status) { } public Builder status(OfferStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -437,7 +437,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -448,7 +448,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -459,7 +459,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Office.java b/src/main/java/com/merge/api/resources/ats/types/Office.java index ac3bc92bf..4726009fc 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Office.java +++ b/src/main/java/com/merge/api/resources/ats/types/Office.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Office.Builder.class) public final class Office { private final Optional id; @@ -220,7 +220,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -231,7 +231,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -242,7 +242,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -253,7 +253,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -264,7 +264,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -275,7 +275,7 @@ public Builder location(Optional location) { } public Builder location(String location) { - this.location = Optional.of(location); + this.location = Optional.ofNullable(location); return this; } @@ -286,7 +286,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -297,7 +297,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -308,7 +308,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.java index 0159dd043..69403ce42 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedAccountDetailsAndActionsList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountDetailsAndActionsList.Builder.class) public final class PaginatedAccountDetailsAndActionsList { private final Optional next; @@ -112,7 +112,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -123,7 +123,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -134,7 +134,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedActivityList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedActivityList.java index 19d74200c..f5cf57455 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedActivityList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedActivityList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedActivityList.Builder.class) public final class PaginatedActivityList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedApplicationList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedApplicationList.java index 184d7d42d..0f02d7fe4 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedApplicationList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedApplicationList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedApplicationList.Builder.class) public final class PaginatedApplicationList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedAttachmentList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedAttachmentList.java index 296b8a41f..1fd85d5d5 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedAttachmentList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedAttachmentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAttachmentList.Builder.class) public final class PaginatedAttachmentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedAuditLogEventList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedAuditLogEventList.java index 99c11248d..4852ef536 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedAuditLogEventList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedAuditLogEventList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAuditLogEventList.Builder.class) public final class PaginatedAuditLogEventList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedCandidateList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedCandidateList.java index bb435d4b0..72439949e 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedCandidateList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedCandidateList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCandidateList.Builder.class) public final class PaginatedCandidateList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedDepartmentList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedDepartmentList.java index 3f6227685..c15d4c9c5 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedDepartmentList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedDepartmentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedDepartmentList.Builder.class) public final class PaginatedDepartmentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedEeocList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedEeocList.java index 7e2b47635..c8b884655 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedEeocList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedEeocList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEeocList.Builder.class) public final class PaginatedEeocList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedIssueList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedIssueList.java index 8a6711bb6..b895de603 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedIssueList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedIssueList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedIssueList.Builder.class) public final class PaginatedIssueList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedJobInterviewStageList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedJobInterviewStageList.java index 4167733c7..d40786f0a 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedJobInterviewStageList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedJobInterviewStageList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedJobInterviewStageList.Builder.class) public final class PaginatedJobInterviewStageList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedJobList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedJobList.java index 5e1a3630e..abb11b88d 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedJobList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedJobList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedJobList.Builder.class) public final class PaginatedJobList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedJobPostingList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedJobPostingList.java index 2e169c6b6..fc077863a 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedJobPostingList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedJobPostingList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedJobPostingList.Builder.class) public final class PaginatedJobPostingList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedOfferList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedOfferList.java index 2b5a54cb2..237d1e987 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedOfferList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedOfferList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedOfferList.Builder.class) public final class PaginatedOfferList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedOfficeList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedOfficeList.java index 1d2544fa0..06c743e71 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedOfficeList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedOfficeList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedOfficeList.Builder.class) public final class PaginatedOfficeList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedRejectReasonList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedRejectReasonList.java index 477fcd517..dd478c003 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedRejectReasonList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedRejectReasonList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedRejectReasonList.Builder.class) public final class PaginatedRejectReasonList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedRemoteUserList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedRemoteUserList.java index 4bca7ea40..cf1ae545f 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedRemoteUserList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedRemoteUserList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedRemoteUserList.Builder.class) public final class PaginatedRemoteUserList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedScheduledInterviewList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedScheduledInterviewList.java index feb4cb06a..fe5803470 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedScheduledInterviewList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedScheduledInterviewList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedScheduledInterviewList.Builder.class) public final class PaginatedScheduledInterviewList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedScorecardList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedScorecardList.java index 5a6d23290..ee14a24bf 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedScorecardList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedScorecardList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedScorecardList.Builder.class) public final class PaginatedScorecardList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedScreeningQuestionList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedScreeningQuestionList.java index 29166952c..c86fb25eb 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedScreeningQuestionList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedScreeningQuestionList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedScreeningQuestionList.Builder.class) public final class PaginatedScreeningQuestionList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedSyncStatusList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedSyncStatusList.java index eaa5c3b0b..210b0e395 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedSyncStatusList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedSyncStatusList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedSyncStatusList.Builder.class) public final class PaginatedSyncStatusList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PaginatedTagList.java b/src/main/java/com/merge/api/resources/ats/types/PaginatedTagList.java index 5fcfee69d..c1b970007 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PaginatedTagList.java +++ b/src/main/java/com/merge/api/resources/ats/types/PaginatedTagList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTagList.Builder.class) public final class PaginatedTagList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PatchedCandidateRequest.java b/src/main/java/com/merge/api/resources/ats/types/PatchedCandidateRequest.java index 6c14abe24..7cdccc3bd 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PatchedCandidateRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/PatchedCandidateRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedCandidateRequest.Builder.class) public final class PatchedCandidateRequest { private final Optional firstName; @@ -347,7 +347,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -358,7 +358,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -369,7 +369,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -380,7 +380,7 @@ public Builder title(Optional title) { } public Builder title(String title) { - this.title = Optional.of(title); + this.title = Optional.ofNullable(title); return this; } @@ -391,7 +391,7 @@ public Builder lastInteractionAt(Optional lastInteractionAt) { } public Builder lastInteractionAt(OffsetDateTime lastInteractionAt) { - this.lastInteractionAt = Optional.of(lastInteractionAt); + this.lastInteractionAt = Optional.ofNullable(lastInteractionAt); return this; } @@ -402,7 +402,7 @@ public Builder isPrivate(Optional isPrivate) { } public Builder isPrivate(Boolean isPrivate) { - this.isPrivate = Optional.of(isPrivate); + this.isPrivate = Optional.ofNullable(isPrivate); return this; } @@ -413,7 +413,7 @@ public Builder canEmail(Optional canEmail) { } public Builder canEmail(Boolean canEmail) { - this.canEmail = Optional.of(canEmail); + this.canEmail = Optional.ofNullable(canEmail); return this; } @@ -424,7 +424,7 @@ public Builder locations(Optional>> locations) { } public Builder locations(List> locations) { - this.locations = Optional.of(locations); + this.locations = Optional.ofNullable(locations); return this; } @@ -435,7 +435,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -446,7 +446,7 @@ public Builder emailAddresses(Optional> emailAddresses } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -457,7 +457,7 @@ public Builder urls(Optional> urls) { } public Builder urls(List urls) { - this.urls = Optional.of(urls); + this.urls = Optional.ofNullable(urls); return this; } @@ -468,7 +468,7 @@ public Builder tags(Optional>> tags) { } public Builder tags(List> tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } @@ -479,7 +479,7 @@ public Builder applications(Optional>> applications) { } public Builder applications(List> applications) { - this.applications = Optional.of(applications); + this.applications = Optional.ofNullable(applications); return this; } @@ -490,7 +490,7 @@ public Builder attachments(Optional>> attachments) { } public Builder attachments(List> attachments) { - this.attachments = Optional.of(attachments); + this.attachments = Optional.ofNullable(attachments); return this; } @@ -501,7 +501,7 @@ public Builder remoteTemplateId(Optional remoteTemplateId) { } public Builder remoteTemplateId(String remoteTemplateId) { - this.remoteTemplateId = Optional.of(remoteTemplateId); + this.remoteTemplateId = Optional.ofNullable(remoteTemplateId); return this; } @@ -512,7 +512,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -523,7 +523,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PhoneNumber.java b/src/main/java/com/merge/api/resources/ats/types/PhoneNumber.java index a6b519848..bb739368b 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PhoneNumber.java +++ b/src/main/java/com/merge/api/resources/ats/types/PhoneNumber.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PhoneNumber.Builder.class) public final class PhoneNumber { private final Optional createdAt; @@ -161,7 +161,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -172,7 +172,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -183,7 +183,7 @@ public Builder value(Optional value) { } public Builder value(String value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -194,7 +194,7 @@ public Builder phoneNumberType(Optional phoneNumberT } public Builder phoneNumberType(PhoneNumberPhoneNumberType phoneNumberType) { - this.phoneNumberType = Optional.of(phoneNumberType); + this.phoneNumberType = Optional.ofNullable(phoneNumberType); return this; } @@ -205,7 +205,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/PhoneNumberRequest.java b/src/main/java/com/merge/api/resources/ats/types/PhoneNumberRequest.java index 51b383e23..d772ce948 100644 --- a/src/main/java/com/merge/api/resources/ats/types/PhoneNumberRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/PhoneNumberRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PhoneNumberRequest.Builder.class) public final class PhoneNumberRequest { private final Optional value; @@ -139,7 +139,7 @@ public Builder value(Optional value) { } public Builder value(String value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -150,7 +150,7 @@ public Builder phoneNumberType(Optional phone } public Builder phoneNumberType(PhoneNumberRequestPhoneNumberType phoneNumberType) { - this.phoneNumberType = Optional.of(phoneNumberType); + this.phoneNumberType = Optional.ofNullable(phoneNumberType); return this; } @@ -161,7 +161,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -172,7 +172,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RejectReason.java b/src/main/java/com/merge/api/resources/ats/types/RejectReason.java index 1445e637c..f93c8c1f6 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RejectReason.java +++ b/src/main/java/com/merge/api/resources/ats/types/RejectReason.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RejectReason.Builder.class) public final class RejectReason { private final Optional id; @@ -203,7 +203,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -214,7 +214,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -225,7 +225,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -236,7 +236,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -247,7 +247,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -258,7 +258,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -269,7 +269,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -280,7 +280,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RemoteData.java b/src/main/java/com/merge/api/resources/ats/types/RemoteData.java index 0aa9333d6..267764792 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RemoteData.java +++ b/src/main/java/com/merge/api/resources/ats/types/RemoteData.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteData.Builder.class) public final class RemoteData { private final String path; @@ -76,7 +77,7 @@ public static PathStage builder() { } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); Builder from(RemoteData other); } @@ -113,14 +114,14 @@ public Builder from(RemoteData other) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @java.lang.Override public _FinalStage data(JsonNode data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/ats/types/RemoteEndpointInfo.java index c2601a582..b3f74964a 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/ats/types/RemoteEndpointInfo.java @@ -18,8 +18,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteEndpointInfo.Builder.class) public final class RemoteEndpointInfo { private final String method; @@ -88,13 +89,13 @@ public static MethodStage builder() { } public interface MethodStage { - UrlPathStage method(String method); + UrlPathStage method(@NotNull String method); Builder from(RemoteEndpointInfo other); } public interface UrlPathStage { - _FinalStage urlPath(String urlPath); + _FinalStage urlPath(@NotNull String urlPath); } public interface _FinalStage { @@ -130,14 +131,14 @@ public Builder from(RemoteEndpointInfo other) { @java.lang.Override @JsonSetter("method") - public UrlPathStage method(String method) { + public UrlPathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("url_path") - public _FinalStage urlPath(String urlPath) { + public _FinalStage urlPath(@NotNull String urlPath) { this.urlPath = urlPath; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApi.java b/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApi.java index 75e847a74..df03d4461 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApi.java +++ b/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApi.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApi.Builder.class) public final class RemoteFieldApi { private final Map schema; @@ -125,13 +126,13 @@ public static RemoteKeyNameStage builder() { } public interface RemoteKeyNameStage { - RemoteEndpointInfoStage remoteKeyName(String remoteKeyName); + RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName); Builder from(RemoteFieldApi other); } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo); } public interface _FinalStage { @@ -188,21 +189,21 @@ public Builder from(RemoteFieldApi other) { @java.lang.Override @JsonSetter("remote_key_name") - public RemoteEndpointInfoStage remoteKeyName(String remoteKeyName) { + public RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName) { this.remoteKeyName = remoteKeyName; return this; } @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage coverage(RemoteFieldApiCoverage coverage) { - this.coverage = Optional.of(coverage); + this.coverage = Optional.ofNullable(coverage); return this; } @@ -215,7 +216,7 @@ public _FinalStage coverage(Optional coverage) { @java.lang.Override public _FinalStage advancedMetadata(AdvancedMetadata advancedMetadata) { - this.advancedMetadata = Optional.of(advancedMetadata); + this.advancedMetadata = Optional.ofNullable(advancedMetadata); return this; } @@ -228,7 +229,7 @@ public _FinalStage advancedMetadata(Optional advancedMetadata) @java.lang.Override public _FinalStage exampleValues(List exampleValues) { - this.exampleValues = Optional.of(exampleValues); + this.exampleValues = Optional.ofNullable(exampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApiResponse.java b/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApiResponse.java index d589b2409..0cb9db7d8 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/RemoteFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApiResponse.Builder.class) public final class RemoteFieldApiResponse { private final Optional> activity; @@ -298,7 +298,7 @@ public Builder activity(Optional> activity) { } public Builder activity(List activity) { - this.activity = Optional.of(activity); + this.activity = Optional.ofNullable(activity); return this; } @@ -309,7 +309,7 @@ public Builder application(Optional> application) { } public Builder application(List application) { - this.application = Optional.of(application); + this.application = Optional.ofNullable(application); return this; } @@ -320,7 +320,7 @@ public Builder attachment(Optional> attachment) { } public Builder attachment(List attachment) { - this.attachment = Optional.of(attachment); + this.attachment = Optional.ofNullable(attachment); return this; } @@ -331,7 +331,7 @@ public Builder candidate(Optional> candidate) { } public Builder candidate(List candidate) { - this.candidate = Optional.of(candidate); + this.candidate = Optional.ofNullable(candidate); return this; } @@ -342,7 +342,7 @@ public Builder department(Optional> department) { } public Builder department(List department) { - this.department = Optional.of(department); + this.department = Optional.ofNullable(department); return this; } @@ -353,7 +353,7 @@ public Builder eeoc(Optional> eeoc) { } public Builder eeoc(List eeoc) { - this.eeoc = Optional.of(eeoc); + this.eeoc = Optional.ofNullable(eeoc); return this; } @@ -364,7 +364,7 @@ public Builder scheduledInterview(Optional> scheduledInterv } public Builder scheduledInterview(List scheduledInterview) { - this.scheduledInterview = Optional.of(scheduledInterview); + this.scheduledInterview = Optional.ofNullable(scheduledInterview); return this; } @@ -375,7 +375,7 @@ public Builder job(Optional> job) { } public Builder job(List job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -386,7 +386,7 @@ public Builder jobPosting(Optional> jobPosting) { } public Builder jobPosting(List jobPosting) { - this.jobPosting = Optional.of(jobPosting); + this.jobPosting = Optional.ofNullable(jobPosting); return this; } @@ -397,7 +397,7 @@ public Builder jobInterviewStage(Optional> jobInterviewStag } public Builder jobInterviewStage(List jobInterviewStage) { - this.jobInterviewStage = Optional.of(jobInterviewStage); + this.jobInterviewStage = Optional.ofNullable(jobInterviewStage); return this; } @@ -408,7 +408,7 @@ public Builder offer(Optional> offer) { } public Builder offer(List offer) { - this.offer = Optional.of(offer); + this.offer = Optional.ofNullable(offer); return this; } @@ -419,7 +419,7 @@ public Builder office(Optional> office) { } public Builder office(List office) { - this.office = Optional.of(office); + this.office = Optional.ofNullable(office); return this; } @@ -430,7 +430,7 @@ public Builder rejectReason(Optional> rejectReason) { } public Builder rejectReason(List rejectReason) { - this.rejectReason = Optional.of(rejectReason); + this.rejectReason = Optional.ofNullable(rejectReason); return this; } @@ -441,7 +441,7 @@ public Builder scorecard(Optional> scorecard) { } public Builder scorecard(List scorecard) { - this.scorecard = Optional.of(scorecard); + this.scorecard = Optional.ofNullable(scorecard); return this; } @@ -452,7 +452,7 @@ public Builder tag(Optional> tag) { } public Builder tag(List tag) { - this.tag = Optional.of(tag); + this.tag = Optional.ofNullable(tag); return this; } @@ -463,7 +463,7 @@ public Builder remoteUser(Optional> remoteUser) { } public Builder remoteUser(List remoteUser) { - this.remoteUser = Optional.of(remoteUser); + this.remoteUser = Optional.ofNullable(remoteUser); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RemoteKey.java b/src/main/java/com/merge/api/resources/ats/types/RemoteKey.java index 087297771..6dd0358ce 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RemoteKey.java +++ b/src/main/java/com/merge/api/resources/ats/types/RemoteKey.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKey.Builder.class) public final class RemoteKey { private final String name; @@ -70,13 +71,13 @@ public static NameStage builder() { } public interface NameStage { - KeyStage name(String name); + KeyStage name(@NotNull String name); Builder from(RemoteKey other); } public interface KeyStage { - _FinalStage key(String key); + _FinalStage key(@NotNull String key); } public interface _FinalStage { @@ -103,14 +104,14 @@ public Builder from(RemoteKey other) { @java.lang.Override @JsonSetter("name") - public KeyStage name(String name) { + public KeyStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("key") - public _FinalStage key(String key) { + public _FinalStage key(@NotNull String key) { this.key = key; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RemoteResponse.java b/src/main/java/com/merge/api/resources/ats/types/RemoteResponse.java index a58b93569..d8b7727d3 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/RemoteResponse.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteResponse.Builder.class) public final class RemoteResponse { private final String method; @@ -134,13 +135,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(String method); + PathStage method(@NotNull String method); Builder from(RemoteResponse other); } public interface PathStage { - StatusStage path(String path); + StatusStage path(@NotNull String path); } public interface StatusStage { @@ -148,7 +149,7 @@ public interface StatusStage { } public interface ResponseStage { - _FinalStage response(JsonNode response); + _FinalStage response(@NotNull JsonNode response); } public interface _FinalStage { @@ -202,14 +203,14 @@ public Builder from(RemoteResponse other) { @java.lang.Override @JsonSetter("method") - public PathStage method(String method) { + public PathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("path") - public StatusStage path(String path) { + public StatusStage path(@NotNull String path) { this.path = path; return this; } @@ -223,14 +224,14 @@ public ResponseStage status(int status) { @java.lang.Override @JsonSetter("response") - public _FinalStage response(JsonNode response) { + public _FinalStage response(@NotNull JsonNode response) { this.response = response; return this; } @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -243,7 +244,7 @@ public _FinalStage headers(Optional> headers) { @java.lang.Override public _FinalStage responseType(RemoteResponseResponseType responseType) { - this.responseType = Optional.of(responseType); + this.responseType = Optional.ofNullable(responseType); return this; } @@ -256,7 +257,7 @@ public _FinalStage responseType(Optional responseTyp @java.lang.Override public _FinalStage responseHeaders(Map responseHeaders) { - this.responseHeaders = Optional.of(responseHeaders); + this.responseHeaders = Optional.ofNullable(responseHeaders); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/RemoteUser.java b/src/main/java/com/merge/api/resources/ats/types/RemoteUser.java index b2a131503..3d4c66f3c 100644 --- a/src/main/java/com/merge/api/resources/ats/types/RemoteUser.java +++ b/src/main/java/com/merge/api/resources/ats/types/RemoteUser.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteUser.Builder.class) public final class RemoteUser { private final Optional id; @@ -295,7 +295,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -306,7 +306,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -317,7 +317,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -328,7 +328,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -339,7 +339,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -350,7 +350,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -361,7 +361,7 @@ public Builder email(Optional email) { } public Builder email(String email) { - this.email = Optional.of(email); + this.email = Optional.ofNullable(email); return this; } @@ -372,7 +372,7 @@ public Builder disabled(Optional disabled) { } public Builder disabled(Boolean disabled) { - this.disabled = Optional.of(disabled); + this.disabled = Optional.ofNullable(disabled); return this; } @@ -383,7 +383,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -394,7 +394,7 @@ public Builder accessRole(Optional accessRole) { } public Builder accessRole(RemoteUserAccessRole accessRole) { - this.accessRole = Optional.of(accessRole); + this.accessRole = Optional.ofNullable(accessRole); return this; } @@ -405,7 +405,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -416,7 +416,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -427,7 +427,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ScheduledInterview.java b/src/main/java/com/merge/api/resources/ats/types/ScheduledInterview.java index 1f41c0efa..eea16eba9 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ScheduledInterview.java +++ b/src/main/java/com/merge/api/resources/ats/types/ScheduledInterview.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScheduledInterview.Builder.class) public final class ScheduledInterview { private final Optional id; @@ -361,7 +361,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -372,7 +372,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -383,7 +383,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -394,7 +394,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -405,7 +405,7 @@ public Builder application(Optional application) } public Builder application(ScheduledInterviewApplication application) { - this.application = Optional.of(application); + this.application = Optional.ofNullable(application); return this; } @@ -416,7 +416,7 @@ public Builder jobInterviewStage(Optional j } public Builder jobInterviewStage(ScheduledInterviewJobInterviewStage jobInterviewStage) { - this.jobInterviewStage = Optional.of(jobInterviewStage); + this.jobInterviewStage = Optional.ofNullable(jobInterviewStage); return this; } @@ -427,7 +427,7 @@ public Builder organizer(Optional organizer) { } public Builder organizer(ScheduledInterviewOrganizer organizer) { - this.organizer = Optional.of(organizer); + this.organizer = Optional.ofNullable(organizer); return this; } @@ -438,7 +438,7 @@ public Builder interviewers(Optional> interviewers) { - this.interviewers = Optional.of(interviewers); + this.interviewers = Optional.ofNullable(interviewers); return this; } @@ -449,7 +449,7 @@ public Builder location(Optional location) { } public Builder location(String location) { - this.location = Optional.of(location); + this.location = Optional.ofNullable(location); return this; } @@ -460,7 +460,7 @@ public Builder startAt(Optional startAt) { } public Builder startAt(OffsetDateTime startAt) { - this.startAt = Optional.of(startAt); + this.startAt = Optional.ofNullable(startAt); return this; } @@ -471,7 +471,7 @@ public Builder endAt(Optional endAt) { } public Builder endAt(OffsetDateTime endAt) { - this.endAt = Optional.of(endAt); + this.endAt = Optional.ofNullable(endAt); return this; } @@ -482,7 +482,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -493,7 +493,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -504,7 +504,7 @@ public Builder status(Optional status) { } public Builder status(ScheduledInterviewStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -515,7 +515,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -526,7 +526,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -537,7 +537,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewRequest.java b/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewRequest.java index 21318434d..78b4a0ace 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScheduledInterviewRequest.Builder.class) public final class ScheduledInterviewRequest { private final Optional application; @@ -245,7 +245,7 @@ public Builder application(Optional applic } public Builder application(ScheduledInterviewRequestApplication application) { - this.application = Optional.of(application); + this.application = Optional.ofNullable(application); return this; } @@ -256,7 +256,7 @@ public Builder jobInterviewStage(Optional organizer) } public Builder organizer(ScheduledInterviewRequestOrganizer organizer) { - this.organizer = Optional.of(organizer); + this.organizer = Optional.ofNullable(organizer); return this; } @@ -278,7 +278,7 @@ public Builder interviewers(Optional> interviewers) { - this.interviewers = Optional.of(interviewers); + this.interviewers = Optional.ofNullable(interviewers); return this; } @@ -289,7 +289,7 @@ public Builder location(Optional location) { } public Builder location(String location) { - this.location = Optional.of(location); + this.location = Optional.ofNullable(location); return this; } @@ -300,7 +300,7 @@ public Builder startAt(Optional startAt) { } public Builder startAt(OffsetDateTime startAt) { - this.startAt = Optional.of(startAt); + this.startAt = Optional.ofNullable(startAt); return this; } @@ -311,7 +311,7 @@ public Builder endAt(Optional endAt) { } public Builder endAt(OffsetDateTime endAt) { - this.endAt = Optional.of(endAt); + this.endAt = Optional.ofNullable(endAt); return this; } @@ -322,7 +322,7 @@ public Builder status(Optional status) { } public Builder status(ScheduledInterviewRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -333,7 +333,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -344,7 +344,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewResponse.java b/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewResponse.java index 8761ffef8..56140387d 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewResponse.java +++ b/src/main/java/com/merge/api/resources/ats/types/ScheduledInterviewResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScheduledInterviewResponse.Builder.class) public final class ScheduledInterviewResponse { private final ScheduledInterview model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(ScheduledInterview model); + _FinalStage model(@NotNull ScheduledInterview model); Builder from(ScheduledInterviewResponse other); } @@ -149,14 +150,14 @@ public Builder from(ScheduledInterviewResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(ScheduledInterview model) { + public _FinalStage model(@NotNull ScheduledInterview model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Scorecard.java b/src/main/java/com/merge/api/resources/ats/types/Scorecard.java index 3793e19a9..a19e5c736 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Scorecard.java +++ b/src/main/java/com/merge/api/resources/ats/types/Scorecard.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Scorecard.Builder.class) public final class Scorecard { private final Optional id; @@ -295,7 +295,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -306,7 +306,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -317,7 +317,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -328,7 +328,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -339,7 +339,7 @@ public Builder application(Optional application) { } public Builder application(ScorecardApplication application) { - this.application = Optional.of(application); + this.application = Optional.ofNullable(application); return this; } @@ -350,7 +350,7 @@ public Builder interview(Optional interview) { } public Builder interview(ScorecardInterview interview) { - this.interview = Optional.of(interview); + this.interview = Optional.ofNullable(interview); return this; } @@ -361,7 +361,7 @@ public Builder interviewer(Optional interviewer) { } public Builder interviewer(ScorecardInterviewer interviewer) { - this.interviewer = Optional.of(interviewer); + this.interviewer = Optional.ofNullable(interviewer); return this; } @@ -372,7 +372,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -383,7 +383,7 @@ public Builder submittedAt(Optional submittedAt) { } public Builder submittedAt(OffsetDateTime submittedAt) { - this.submittedAt = Optional.of(submittedAt); + this.submittedAt = Optional.ofNullable(submittedAt); return this; } @@ -394,7 +394,7 @@ public Builder overallRecommendation(Optional ov } public Builder overallRecommendation(ScorecardOverallRecommendation overallRecommendation) { - this.overallRecommendation = Optional.of(overallRecommendation); + this.overallRecommendation = Optional.ofNullable(overallRecommendation); return this; } @@ -405,7 +405,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -416,7 +416,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -427,7 +427,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestion.java b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestion.java index cd172176b..2cd291d1f 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestion.java +++ b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestion.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScreeningQuestion.Builder.class) public final class ScreeningQuestion { private final Optional id; @@ -267,7 +267,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -278,7 +278,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -289,7 +289,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -300,7 +300,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -311,7 +311,7 @@ public Builder job(Optional job) { } public Builder job(ScreeningQuestionJob job) { - this.job = Optional.of(job); + this.job = Optional.ofNullable(job); return this; } @@ -322,7 +322,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -333,7 +333,7 @@ public Builder title(Optional title) { } public Builder title(String title) { - this.title = Optional.of(title); + this.title = Optional.ofNullable(title); return this; } @@ -344,7 +344,7 @@ public Builder type(Optional type) { } public Builder type(ScreeningQuestionType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -355,7 +355,7 @@ public Builder required(Optional required) { } public Builder required(Boolean required) { - this.required = Optional.of(required); + this.required = Optional.ofNullable(required); return this; } @@ -366,7 +366,7 @@ public Builder options(Optional> options) { } public Builder options(List options) { - this.options = Optional.of(options); + this.options = Optional.ofNullable(options); return this; } @@ -377,7 +377,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswer.java b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswer.java index 7e7a50b48..3f9725df1 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswer.java +++ b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswer.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScreeningQuestionAnswer.Builder.class) public final class ScreeningQuestionAnswer { private final Optional id; @@ -190,7 +190,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -201,7 +201,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -212,7 +212,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -223,7 +223,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -234,7 +234,7 @@ public Builder question(Optional question) { } public Builder question(ScreeningQuestionAnswerQuestion question) { - this.question = Optional.of(question); + this.question = Optional.ofNullable(question); return this; } @@ -245,7 +245,7 @@ public Builder answer(Optional answer) { } public Builder answer(String answer) { - this.answer = Optional.of(answer); + this.answer = Optional.ofNullable(answer); return this; } @@ -256,7 +256,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswerRequest.java b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswerRequest.java index e9a990659..6673b4bf1 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswerRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionAnswerRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScreeningQuestionAnswerRequest.Builder.class) public final class ScreeningQuestionAnswerRequest { private final Optional remoteId; @@ -149,7 +149,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -160,7 +160,7 @@ public Builder question(Optional questio } public Builder question(ScreeningQuestionAnswerRequestQuestion question) { - this.question = Optional.of(question); + this.question = Optional.ofNullable(question); return this; } @@ -171,7 +171,7 @@ public Builder answer(Optional answer) { } public Builder answer(String answer) { - this.answer = Optional.of(answer); + this.answer = Optional.ofNullable(answer); return this; } @@ -182,7 +182,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -193,7 +193,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionOption.java b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionOption.java index 6c9172627..9aff784ca 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionOption.java +++ b/src/main/java/com/merge/api/resources/ats/types/ScreeningQuestionOption.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ScreeningQuestionOption.Builder.class) public final class ScreeningQuestionOption { private final Optional id; @@ -167,7 +167,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -178,7 +178,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -189,7 +189,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -200,7 +200,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -211,7 +211,7 @@ public Builder label(Optional label) { } public Builder label(String label) { - this.label = Optional.of(label); + this.label = Optional.ofNullable(label); return this; } @@ -222,7 +222,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/SyncStatus.java b/src/main/java/com/merge/api/resources/ats/types/SyncStatus.java index 3989f318d..4bb36a817 100644 --- a/src/main/java/com/merge/api/resources/ats/types/SyncStatus.java +++ b/src/main/java/com/merge/api/resources/ats/types/SyncStatus.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatus.Builder.class) public final class SyncStatus { private final String modelName; @@ -134,17 +135,17 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - ModelIdStage modelName(String modelName); + ModelIdStage modelName(@NotNull String modelName); Builder from(SyncStatus other); } public interface ModelIdStage { - StatusStage modelId(String modelId); + StatusStage modelId(@NotNull String modelId); } public interface StatusStage { - IsInitialSyncStage status(SyncStatusStatusEnum status); + IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status); } public interface IsInitialSyncStage { @@ -205,21 +206,21 @@ public Builder from(SyncStatus other) { @java.lang.Override @JsonSetter("model_name") - public ModelIdStage modelName(String modelName) { + public ModelIdStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override @JsonSetter("model_id") - public StatusStage modelId(String modelId) { + public StatusStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(SyncStatusStatusEnum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status) { this.status = status; return this; } @@ -234,7 +235,7 @@ public _FinalStage isInitialSync(boolean isInitialSync) { @java.lang.Override public _FinalStage selectiveSyncConfigurationsUsage( SelectiveSyncConfigurationsUsageEnum selectiveSyncConfigurationsUsage) { - this.selectiveSyncConfigurationsUsage = Optional.of(selectiveSyncConfigurationsUsage); + this.selectiveSyncConfigurationsUsage = Optional.ofNullable(selectiveSyncConfigurationsUsage); return this; } @@ -248,7 +249,7 @@ public _FinalStage selectiveSyncConfigurationsUsage( @java.lang.Override public _FinalStage nextSyncStart(OffsetDateTime nextSyncStart) { - this.nextSyncStart = Optional.of(nextSyncStart); + this.nextSyncStart = Optional.ofNullable(nextSyncStart); return this; } @@ -261,7 +262,7 @@ public _FinalStage nextSyncStart(Optional nextSyncStart) { @java.lang.Override public _FinalStage lastSyncStart(OffsetDateTime lastSyncStart) { - this.lastSyncStart = Optional.of(lastSyncStart); + this.lastSyncStart = Optional.ofNullable(lastSyncStart); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Tag.java b/src/main/java/com/merge/api/resources/ats/types/Tag.java index 63e155c79..b7aafc07b 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Tag.java +++ b/src/main/java/com/merge/api/resources/ats/types/Tag.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Tag.Builder.class) public final class Tag { private final Optional remoteId; @@ -189,7 +189,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -200,7 +200,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -211,7 +211,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -222,7 +222,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -233,7 +233,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -244,7 +244,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -255,7 +255,7 @@ public Builder remoteData(Optional>>> remote } public Builder remoteData(List>> remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/Url.java b/src/main/java/com/merge/api/resources/ats/types/Url.java index 15a08d9e4..bea0053c6 100644 --- a/src/main/java/com/merge/api/resources/ats/types/Url.java +++ b/src/main/java/com/merge/api/resources/ats/types/Url.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Url.Builder.class) public final class Url { private final Optional createdAt; @@ -163,7 +163,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -174,7 +174,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -185,7 +185,7 @@ public Builder value(Optional value) { } public Builder value(String value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -196,7 +196,7 @@ public Builder urlType(Optional urlType) { } public Builder urlType(UrlUrlType urlType) { - this.urlType = Optional.of(urlType); + this.urlType = Optional.ofNullable(urlType); return this; } @@ -207,7 +207,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/UrlRequest.java b/src/main/java/com/merge/api/resources/ats/types/UrlRequest.java index cce5bd27d..ac99f53ed 100644 --- a/src/main/java/com/merge/api/resources/ats/types/UrlRequest.java +++ b/src/main/java/com/merge/api/resources/ats/types/UrlRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UrlRequest.Builder.class) public final class UrlRequest { private final Optional value; @@ -141,7 +141,7 @@ public Builder value(Optional value) { } public Builder value(String value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -152,7 +152,7 @@ public Builder urlType(Optional urlType) { } public Builder urlType(UrlRequestUrlType urlType) { - this.urlType = Optional.of(urlType); + this.urlType = Optional.ofNullable(urlType); return this; } @@ -163,7 +163,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -174,7 +174,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/ValidationProblemSource.java b/src/main/java/com/merge/api/resources/ats/types/ValidationProblemSource.java index 4e41a6c96..136a5c363 100644 --- a/src/main/java/com/merge/api/resources/ats/types/ValidationProblemSource.java +++ b/src/main/java/com/merge/api/resources/ats/types/ValidationProblemSource.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ValidationProblemSource.Builder.class) public final class ValidationProblemSource { private final String pointer; @@ -62,7 +63,7 @@ public static PointerStage builder() { } public interface PointerStage { - _FinalStage pointer(String pointer); + _FinalStage pointer(@NotNull String pointer); Builder from(ValidationProblemSource other); } @@ -88,7 +89,7 @@ public Builder from(ValidationProblemSource other) { @java.lang.Override @JsonSetter("pointer") - public _FinalStage pointer(String pointer) { + public _FinalStage pointer(@NotNull String pointer) { this.pointer = pointer; return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/WarningValidationProblem.java b/src/main/java/com/merge/api/resources/ats/types/WarningValidationProblem.java index ffe2875c8..e0b91d3a4 100644 --- a/src/main/java/com/merge/api/resources/ats/types/WarningValidationProblem.java +++ b/src/main/java/com/merge/api/resources/ats/types/WarningValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WarningValidationProblem.Builder.class) public final class WarningValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(WarningValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(WarningValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/types/WebhookReceiver.java b/src/main/java/com/merge/api/resources/ats/types/WebhookReceiver.java index c69ea1547..823b12855 100644 --- a/src/main/java/com/merge/api/resources/ats/types/WebhookReceiver.java +++ b/src/main/java/com/merge/api/resources/ats/types/WebhookReceiver.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiver.Builder.class) public final class WebhookReceiver { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiver other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiver other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/users/UsersClient.java b/src/main/java/com/merge/api/resources/ats/users/UsersClient.java index b913032b4..01f5237c1 100644 --- a/src/main/java/com/merge/api/resources/ats/users/UsersClient.java +++ b/src/main/java/com/merge/api/resources/ats/users/UsersClient.java @@ -100,7 +100,8 @@ public PaginatedRemoteUserList list(UsersListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -121,13 +122,6 @@ public PaginatedRemoteUserList list(UsersListRequest request, RequestOptions req } } - /** - * Returns a RemoteUser object with the given id. - */ - public RemoteUser retrieve(String id) { - return retrieve(id, UsersRetrieveRequest.builder().build()); - } - /** * Returns a RemoteUser object with the given id. */ @@ -158,7 +152,8 @@ public RemoteUser retrieve(String id, UsersRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/users/requests/UsersListRequest.java b/src/main/java/com/merge/api/resources/ats/users/requests/UsersListRequest.java index 50a9f03fe..4bfc85daa 100644 --- a/src/main/java/com/merge/api/resources/ats/users/requests/UsersListRequest.java +++ b/src/main/java/com/merge/api/resources/ats/users/requests/UsersListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersListRequest.Builder.class) public final class UsersListRequest { private final Optional createdAfter; @@ -295,7 +295,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -306,7 +306,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -317,7 +317,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -328,7 +328,7 @@ public Builder email(Optional email) { } public Builder email(String email) { - this.email = Optional.of(email); + this.email = Optional.ofNullable(email); return this; } @@ -339,7 +339,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -350,7 +350,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -361,7 +361,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -372,7 +372,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -383,7 +383,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -394,7 +394,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -405,7 +405,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -416,7 +416,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -427,7 +427,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/users/requests/UsersRetrieveRequest.java b/src/main/java/com/merge/api/resources/ats/users/requests/UsersRetrieveRequest.java index 7c978df4d..7ec77bfcf 100644 --- a/src/main/java/com/merge/api/resources/ats/users/requests/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ats/users/requests/UsersRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersRetrieveRequest.Builder.class) public final class UsersRetrieveRequest { private final Optional includeRemoteData; @@ -121,7 +121,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -132,7 +132,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -143,7 +143,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ats/webhookreceivers/WebhookReceiversClient.java b/src/main/java/com/merge/api/resources/ats/webhookreceivers/WebhookReceiversClient.java index a49fdda7c..439cc71b3 100644 --- a/src/main/java/com/merge/api/resources/ats/webhookreceivers/WebhookReceiversClient.java +++ b/src/main/java/com/merge/api/resources/ats/webhookreceivers/WebhookReceiversClient.java @@ -50,6 +50,7 @@ public List list(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,6 +99,7 @@ public WebhookReceiver create(WebhookReceiverRequest request, RequestOptions req .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ats/webhookreceivers/requests/WebhookReceiverRequest.java b/src/main/java/com/merge/api/resources/ats/webhookreceivers/requests/WebhookReceiverRequest.java index e728203e0..612c1d068 100644 --- a/src/main/java/com/merge/api/resources/ats/webhookreceivers/requests/WebhookReceiverRequest.java +++ b/src/main/java/com/merge/api/resources/ats/webhookreceivers/requests/WebhookReceiverRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiverRequest.Builder.class) public final class WebhookReceiverRequest { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiverRequest other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiverRequest other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/accountdetails/AccountDetailsClient.java b/src/main/java/com/merge/api/resources/crm/accountdetails/AccountDetailsClient.java index 5de1701f0..8df39fde2 100644 --- a/src/main/java/com/merge/api/resources/crm/accountdetails/AccountDetailsClient.java +++ b/src/main/java/com/merge/api/resources/crm/accountdetails/AccountDetailsClient.java @@ -44,6 +44,7 @@ public AccountDetails retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/accounts/AccountsClient.java b/src/main/java/com/merge/api/resources/crm/accounts/AccountsClient.java index c93336da9..02078148f 100644 --- a/src/main/java/com/merge/api/resources/crm/accounts/AccountsClient.java +++ b/src/main/java/com/merge/api/resources/crm/accounts/AccountsClient.java @@ -114,7 +114,8 @@ public PaginatedAccountList list(AccountsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,7 +170,8 @@ public CrmAccountResponse create(CrmAccountEndpointRequest request, RequestOptio .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -190,13 +192,6 @@ public CrmAccountResponse create(CrmAccountEndpointRequest request, RequestOptio } } - /** - * Returns an Account object with the given id. - */ - public Account retrieve(String id) { - return retrieve(id, AccountsRetrieveRequest.builder().build()); - } - /** * Returns an Account object with the given id. */ @@ -228,7 +223,8 @@ public Account retrieve(String id, AccountsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -285,7 +281,8 @@ public CrmAccountResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -327,6 +324,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -367,6 +365,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -443,7 +442,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsListRequest.java b/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsListRequest.java index 2e4fa6daa..90e50a90b 100644 --- a/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountsListRequest.Builder.class) public final class AccountsListRequest { private final Optional createdAfter; @@ -312,7 +312,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -323,7 +323,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -334,7 +334,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -345,7 +345,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -356,7 +356,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -367,7 +367,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -378,7 +378,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -389,7 +389,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -400,7 +400,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -411,7 +411,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -422,7 +422,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -433,7 +433,7 @@ public Builder ownerId(Optional ownerId) { } public Builder ownerId(String ownerId) { - this.ownerId = Optional.of(ownerId); + this.ownerId = Optional.ofNullable(ownerId); return this; } @@ -444,7 +444,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -455,7 +455,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRemoteFieldClassesListRequest.java index b4ba04f36..a4bbc615f 100644 --- a/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountsRemoteFieldClassesListRequest.Builder.class) public final class AccountsRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRetrieveRequest.java index 280fb73bc..bdeff3e2a 100644 --- a/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/accounts/requests/AccountsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountsRetrieveRequest.Builder.class) public final class AccountsRetrieveRequest { private final Optional expand; @@ -121,7 +121,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -132,7 +132,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -143,7 +143,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/accounts/requests/CrmAccountEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/accounts/requests/CrmAccountEndpointRequest.java index b1cc6926b..f51645821 100644 --- a/src/main/java/com/merge/api/resources/crm/accounts/requests/CrmAccountEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/accounts/requests/CrmAccountEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmAccountEndpointRequest.Builder.class) public final class CrmAccountEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(AccountRequest model); + _FinalStage model(@NotNull AccountRequest model); Builder from(CrmAccountEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(CrmAccountEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(AccountRequest model) { + public _FinalStage model(@NotNull AccountRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(AccountRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/accounts/requests/PatchedCrmAccountEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/accounts/requests/PatchedCrmAccountEndpointRequest.java index a35581348..c89318cf5 100644 --- a/src/main/java/com/merge/api/resources/crm/accounts/requests/PatchedCrmAccountEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/accounts/requests/PatchedCrmAccountEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedCrmAccountEndpointRequest.Builder.class) public final class PatchedCrmAccountEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PatchedAccountRequest model); + _FinalStage model(@NotNull PatchedAccountRequest model); Builder from(PatchedCrmAccountEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedCrmAccountEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PatchedAccountRequest model) { + public _FinalStage model(@NotNull PatchedAccountRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PatchedAccountRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/accounttoken/AccountTokenClient.java b/src/main/java/com/merge/api/resources/crm/accounttoken/AccountTokenClient.java index de4ae59ce..b1bbba148 100644 --- a/src/main/java/com/merge/api/resources/crm/accounttoken/AccountTokenClient.java +++ b/src/main/java/com/merge/api/resources/crm/accounttoken/AccountTokenClient.java @@ -45,6 +45,7 @@ public AccountToken retrieve(String publicToken, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/associations/AssociationsClient.java b/src/main/java/com/merge/api/resources/crm/associations/AssociationsClient.java index 862455f57..79448bdf5 100644 --- a/src/main/java/com/merge/api/resources/crm/associations/AssociationsClient.java +++ b/src/main/java/com/merge/api/resources/crm/associations/AssociationsClient.java @@ -27,18 +27,6 @@ public AssociationsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - /** - * Returns a list of Association objects. - */ - public PaginatedAssociationList customObjectClassesCustomObjectsAssociationsList( - String customObjectClassId, String objectId) { - return customObjectClassesCustomObjectsAssociationsList( - customObjectClassId, - objectId, - CustomObjectClassesCustomObjectsAssociationsListRequest.builder() - .build()); - } - /** * Returns a list of Association objects. */ @@ -113,7 +101,8 @@ public PaginatedAssociationList customObjectClassesCustomObjectsAssociationsList .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -134,25 +123,6 @@ public PaginatedAssociationList customObjectClassesCustomObjectsAssociationsList } } - /** - * Creates an Association between source_object_id and target_object_id of type association_type_id. - */ - public Association customObjectClassesCustomObjectsAssociationsUpdate( - String associationTypeId, - String sourceClassId, - String sourceObjectId, - String targetClassId, - String targetObjectId) { - return customObjectClassesCustomObjectsAssociationsUpdate( - associationTypeId, - sourceClassId, - sourceObjectId, - targetClassId, - targetObjectId, - CustomObjectClassesCustomObjectsAssociationsUpdateRequest.builder() - .build()); - } - /** * Creates an Association between source_object_id and target_object_id of type association_type_id. */ @@ -199,7 +169,8 @@ public Association customObjectClassesCustomObjectsAssociationsUpdate( .url(httpUrl.build()) .method("PUT", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.java b/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.java index e1421f0ee..afc25d34c 100644 --- a/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesCustomObjectsAssociationsListRequest.Builder.class) public final class CustomObjectClassesCustomObjectsAssociationsListRequest { private final Optional associationTypeId; @@ -279,7 +279,7 @@ public Builder associationTypeId(Optional associationTypeId) { } public Builder associationTypeId(String associationTypeId) { - this.associationTypeId = Optional.of(associationTypeId); + this.associationTypeId = Optional.ofNullable(associationTypeId); return this; } @@ -290,7 +290,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -301,7 +301,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -312,7 +312,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -323,7 +323,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -334,7 +334,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -345,7 +345,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -356,7 +356,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -367,7 +367,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -378,7 +378,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -389,7 +389,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -400,7 +400,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java b/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java index 76b1c9e13..a0909895f 100644 --- a/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java +++ b/src/main/java/com/merge/api/resources/crm/associations/requests/CustomObjectClassesCustomObjectsAssociationsUpdateRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesCustomObjectsAssociationsUpdateRequest.Builder.class) public final class CustomObjectClassesCustomObjectsAssociationsUpdateRequest { private final Optional isDebugMode; @@ -103,7 +103,7 @@ public Builder isDebugMode(Optional isDebugMode) { } public Builder isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } @@ -114,7 +114,7 @@ public Builder runAsync(Optional runAsync) { } public Builder runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/associationtypes/AssociationTypesClient.java b/src/main/java/com/merge/api/resources/crm/associationtypes/AssociationTypesClient.java index c91eb3020..d187aae4b 100644 --- a/src/main/java/com/merge/api/resources/crm/associationtypes/AssociationTypesClient.java +++ b/src/main/java/com/merge/api/resources/crm/associationtypes/AssociationTypesClient.java @@ -34,15 +34,6 @@ public AssociationTypesClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - /** - * Returns a list of AssociationType objects. - */ - public PaginatedAssociationTypeList customObjectClassesAssociationTypesList(String customObjectClassId) { - return customObjectClassesAssociationTypesList( - customObjectClassId, - CustomObjectClassesAssociationTypesListRequest.builder().build()); - } - /** * Returns a list of AssociationType objects. */ @@ -108,7 +99,8 @@ public PaginatedAssociationTypeList customObjectClassesAssociationTypesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -167,7 +159,8 @@ public CrmAssociationTypeResponse customObjectClassesAssociationTypesCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -188,16 +181,6 @@ public CrmAssociationTypeResponse customObjectClassesAssociationTypesCreate( } } - /** - * Returns an AssociationType object with the given id. - */ - public AssociationType customObjectClassesAssociationTypesRetrieve(String customObjectClassId, String id) { - return customObjectClassesAssociationTypesRetrieve( - customObjectClassId, - id, - CustomObjectClassesAssociationTypesRetrieveRequest.builder().build()); - } - /** * Returns an AssociationType object with the given id. */ @@ -231,7 +214,8 @@ public AssociationType customObjectClassesAssociationTypesRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -275,6 +259,7 @@ public MetaResponse customObjectClassesAssociationTypesMetaPostRetrieve( .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CrmAssociationTypeEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CrmAssociationTypeEndpointRequest.java index 8e80d8672..75a677578 100644 --- a/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CrmAssociationTypeEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CrmAssociationTypeEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmAssociationTypeEndpointRequest.Builder.class) public final class CrmAssociationTypeEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(AssociationTypeRequestRequest model); + _FinalStage model(@NotNull AssociationTypeRequestRequest model); Builder from(CrmAssociationTypeEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(CrmAssociationTypeEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(AssociationTypeRequestRequest model) { + public _FinalStage model(@NotNull AssociationTypeRequestRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(AssociationTypeRequestRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesListRequest.java b/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesListRequest.java index 29644b184..35d9653b4 100644 --- a/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesAssociationTypesListRequest.Builder.class) public final class CustomObjectClassesAssociationTypesListRequest { private final Optional createdAfter; @@ -262,7 +262,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -273,7 +273,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -284,7 +284,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -295,7 +295,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -306,7 +306,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -317,7 +317,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -328,7 +328,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -339,7 +339,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -350,7 +350,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -361,7 +361,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -372,7 +372,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesRetrieveRequest.java index 6c1ad7b5f..9aa3d0894 100644 --- a/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/associationtypes/requests/CustomObjectClassesAssociationTypesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesAssociationTypesRetrieveRequest.Builder.class) public final class CustomObjectClassesAssociationTypesRetrieveRequest { private final Optional expand; @@ -103,7 +103,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -114,7 +114,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/asyncpassthrough/AsyncPassthroughClient.java b/src/main/java/com/merge/api/resources/crm/asyncpassthrough/AsyncPassthroughClient.java index 3f7bbe3d4..e5f41a231 100644 --- a/src/main/java/com/merge/api/resources/crm/asyncpassthrough/AsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/resources/crm/asyncpassthrough/AsyncPassthroughClient.java @@ -97,6 +97,7 @@ public AsyncPassthroughRetrieveResponse retrieve(String asyncPassthroughReceiptI .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/audittrail/AuditTrailClient.java b/src/main/java/com/merge/api/resources/crm/audittrail/AuditTrailClient.java index 3db332aa4..03b06c63e 100644 --- a/src/main/java/com/merge/api/resources/crm/audittrail/AuditTrailClient.java +++ b/src/main/java/com/merge/api/resources/crm/audittrail/AuditTrailClient.java @@ -68,7 +68,8 @@ public PaginatedAuditLogEventList list(AuditTrailListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/audittrail/requests/AuditTrailListRequest.java b/src/main/java/com/merge/api/resources/crm/audittrail/requests/AuditTrailListRequest.java index f1888c816..7a4fdb54e 100644 --- a/src/main/java/com/merge/api/resources/crm/audittrail/requests/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/audittrail/requests/AuditTrailListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditTrailListRequest.Builder.class) public final class AuditTrailListRequest { private final Optional cursor; @@ -169,7 +169,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -180,7 +180,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -191,7 +191,7 @@ public Builder eventType(Optional eventType) { } public Builder eventType(String eventType) { - this.eventType = Optional.of(eventType); + this.eventType = Optional.ofNullable(eventType); return this; } @@ -202,7 +202,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -213,7 +213,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -224,7 +224,7 @@ public Builder userEmail(Optional userEmail) { } public Builder userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/availableactions/AvailableActionsClient.java b/src/main/java/com/merge/api/resources/crm/availableactions/AvailableActionsClient.java index 49b0194a9..abef2ce0e 100644 --- a/src/main/java/com/merge/api/resources/crm/availableactions/AvailableActionsClient.java +++ b/src/main/java/com/merge/api/resources/crm/availableactions/AvailableActionsClient.java @@ -44,6 +44,7 @@ public AvailableActions retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/contacts/ContactsClient.java b/src/main/java/com/merge/api/resources/crm/contacts/ContactsClient.java index 78bca08a6..f859b1ec1 100644 --- a/src/main/java/com/merge/api/resources/crm/contacts/ContactsClient.java +++ b/src/main/java/com/merge/api/resources/crm/contacts/ContactsClient.java @@ -120,7 +120,8 @@ public PaginatedContactList list(ContactsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -175,7 +176,8 @@ public CrmContactResponse create(CrmContactEndpointRequest request, RequestOptio .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -196,13 +198,6 @@ public CrmContactResponse create(CrmContactEndpointRequest request, RequestOptio } } - /** - * Returns a Contact object with the given id. - */ - public Contact retrieve(String id) { - return retrieve(id, ContactsRetrieveRequest.builder().build()); - } - /** * Returns a Contact object with the given id. */ @@ -234,7 +229,8 @@ public Contact retrieve(String id, ContactsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -291,7 +287,8 @@ public CrmContactResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -381,6 +378,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -421,6 +419,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -497,7 +496,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsListRequest.java b/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsListRequest.java index 2590d1e90..adb2099b0 100644 --- a/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsListRequest.Builder.class) public final class ContactsListRequest { private final Optional accountId; @@ -330,7 +330,7 @@ public Builder accountId(Optional accountId) { } public Builder accountId(String accountId) { - this.accountId = Optional.of(accountId); + this.accountId = Optional.ofNullable(accountId); return this; } @@ -341,7 +341,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -352,7 +352,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -363,7 +363,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -374,7 +374,7 @@ public Builder emailAddresses(Optional emailAddresses) { } public Builder emailAddresses(String emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -385,7 +385,7 @@ public Builder expand(Optional expand) { } public Builder expand(ContactsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -396,7 +396,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -407,7 +407,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -418,7 +418,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -429,7 +429,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -440,7 +440,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -451,7 +451,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -462,7 +462,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -473,7 +473,7 @@ public Builder phoneNumbers(Optional phoneNumbers) { } public Builder phoneNumbers(String phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -484,7 +484,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRemoteFieldClassesListRequest.java index a24abe50a..aeb745972 100644 --- a/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsRemoteFieldClassesListRequest.Builder.class) public final class ContactsRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRetrieveRequest.java index bbf5cb5e2..420058c7f 100644 --- a/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/contacts/requests/ContactsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsRetrieveRequest.Builder.class) public final class ContactsRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(ContactsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/contacts/requests/CrmContactEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/contacts/requests/CrmContactEndpointRequest.java index ba02c6061..d6266004b 100644 --- a/src/main/java/com/merge/api/resources/crm/contacts/requests/CrmContactEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/contacts/requests/CrmContactEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmContactEndpointRequest.Builder.class) public final class CrmContactEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(ContactRequest model); + _FinalStage model(@NotNull ContactRequest model); Builder from(CrmContactEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(CrmContactEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(ContactRequest model) { + public _FinalStage model(@NotNull ContactRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(ContactRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/contacts/requests/PatchedCrmContactEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/contacts/requests/PatchedCrmContactEndpointRequest.java index d5098c63e..b77544c92 100644 --- a/src/main/java/com/merge/api/resources/crm/contacts/requests/PatchedCrmContactEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/contacts/requests/PatchedCrmContactEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedCrmContactEndpointRequest.Builder.class) public final class PatchedCrmContactEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PatchedContactRequest model); + _FinalStage model(@NotNull PatchedContactRequest model); Builder from(PatchedCrmContactEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedCrmContactEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PatchedContactRequest model) { + public _FinalStage model(@NotNull PatchedContactRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PatchedContactRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/customobjectclasses/CustomObjectClassesClient.java b/src/main/java/com/merge/api/resources/crm/customobjectclasses/CustomObjectClassesClient.java index c65f95b15..175a537d7 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjectclasses/CustomObjectClassesClient.java +++ b/src/main/java/com/merge/api/resources/crm/customobjectclasses/CustomObjectClassesClient.java @@ -93,7 +93,8 @@ public PaginatedCustomObjectClassList list(CustomObjectClassesListRequest reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -114,13 +115,6 @@ public PaginatedCustomObjectClassList list(CustomObjectClassesListRequest reques } } - /** - * Returns a CustomObjectClass object with the given id. - */ - public CustomObjectClass retrieve(String id) { - return retrieve(id, CustomObjectClassesRetrieveRequest.builder().build()); - } - /** * Returns a CustomObjectClass object with the given id. */ @@ -148,7 +142,8 @@ public CustomObjectClass retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesListRequest.java index 466e7d943..145158f72 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesListRequest.Builder.class) public final class CustomObjectClassesListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -305,7 +305,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -316,7 +316,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -327,7 +327,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesRetrieveRequest.java index abab09c91..1a029bafd 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/customobjectclasses/requests/CustomObjectClassesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesRetrieveRequest.Builder.class) public final class CustomObjectClassesRetrieveRequest { private final Optional expand; @@ -103,7 +103,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -114,7 +114,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/customobjects/CustomObjectsClient.java b/src/main/java/com/merge/api/resources/crm/customobjects/CustomObjectsClient.java index 69b5ba2e3..9ac458bf9 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjects/CustomObjectsClient.java +++ b/src/main/java/com/merge/api/resources/crm/customobjects/CustomObjectsClient.java @@ -36,15 +36,6 @@ public CustomObjectsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - /** - * Returns a list of CustomObject objects. - */ - public PaginatedCustomObjectList customObjectClassesCustomObjectsList(String customObjectClassId) { - return customObjectClassesCustomObjectsList( - customObjectClassId, - CustomObjectClassesCustomObjectsListRequest.builder().build()); - } - /** * Returns a list of CustomObject objects. */ @@ -112,7 +103,8 @@ public PaginatedCustomObjectList customObjectClassesCustomObjectsList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -171,7 +163,8 @@ public CrmCustomObjectResponse customObjectClassesCustomObjectsCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -192,16 +185,6 @@ public CrmCustomObjectResponse customObjectClassesCustomObjectsCreate( } } - /** - * Returns a CustomObject object with the given id. - */ - public CustomObject customObjectClassesCustomObjectsRetrieve(String customObjectClassId, String id) { - return customObjectClassesCustomObjectsRetrieve( - customObjectClassId, - id, - CustomObjectClassesCustomObjectsRetrieveRequest.builder().build()); - } - /** * Returns a CustomObject object with the given id. */ @@ -237,7 +220,8 @@ public CustomObject customObjectClassesCustomObjectsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -281,6 +265,7 @@ public MetaResponse customObjectClassesCustomObjectsMetaPostRetrieve( .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -359,7 +344,8 @@ public PaginatedRemoteFieldClassList customObjectClassesCustomObjectsRemoteField .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CrmCustomObjectEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CrmCustomObjectEndpointRequest.java index a33c7058d..36f3bc159 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CrmCustomObjectEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CrmCustomObjectEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmCustomObjectEndpointRequest.Builder.class) public final class CrmCustomObjectEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(CustomObjectRequest model); + _FinalStage model(@NotNull CustomObjectRequest model); Builder from(CrmCustomObjectEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(CrmCustomObjectEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(CustomObjectRequest model) { + public _FinalStage model(@NotNull CustomObjectRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(CustomObjectRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsListRequest.java b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsListRequest.java index f017829c9..6843a694e 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesCustomObjectsListRequest.Builder.class) public final class CustomObjectClassesCustomObjectsListRequest { private final Optional createdAfter; @@ -262,7 +262,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -273,7 +273,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -284,7 +284,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -295,7 +295,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -306,7 +306,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -317,7 +317,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -328,7 +328,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -339,7 +339,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -350,7 +350,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -361,7 +361,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -372,7 +372,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java index 7fb04b653..35b70c2f1 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest.Builder.class) public final class CustomObjectClassesCustomObjectsRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRetrieveRequest.java index 68f5ae0ed..8578c2a2f 100644 --- a/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/customobjects/requests/CustomObjectClassesCustomObjectsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClassesCustomObjectsRetrieveRequest.Builder.class) public final class CustomObjectClassesCustomObjectsRetrieveRequest { private final Optional includeRemoteData; @@ -106,7 +106,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -117,7 +117,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagements/EngagementsClient.java b/src/main/java/com/merge/api/resources/crm/engagements/EngagementsClient.java index 903c99867..1354fcd0f 100644 --- a/src/main/java/com/merge/api/resources/crm/engagements/EngagementsClient.java +++ b/src/main/java/com/merge/api/resources/crm/engagements/EngagementsClient.java @@ -116,7 +116,8 @@ public PaginatedEngagementList list(EngagementsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -171,7 +172,8 @@ public EngagementResponse create(EngagementEndpointRequest request, RequestOptio .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -192,13 +194,6 @@ public EngagementResponse create(EngagementEndpointRequest request, RequestOptio } } - /** - * Returns an Engagement object with the given id. - */ - public Engagement retrieve(String id) { - return retrieve(id, EngagementsRetrieveRequest.builder().build()); - } - /** * Returns an Engagement object with the given id. */ @@ -230,7 +225,8 @@ public Engagement retrieve(String id, EngagementsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -287,7 +283,8 @@ public EngagementResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -329,6 +326,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -369,6 +367,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -445,7 +444,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementEndpointRequest.java index fa5307c43..6feac4586 100644 --- a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementEndpointRequest.Builder.class) public final class EngagementEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(EngagementRequest model); + _FinalStage model(@NotNull EngagementRequest model); Builder from(EngagementEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(EngagementEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(EngagementRequest model) { + public _FinalStage model(@NotNull EngagementRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(EngagementRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsListRequest.java b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsListRequest.java index 41865de5a..88b094dec 100644 --- a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementsListRequest.Builder.class) public final class EngagementsListRequest { private final Optional createdAfter; @@ -313,7 +313,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -324,7 +324,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -335,7 +335,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -346,7 +346,7 @@ public Builder expand(Optional expand) { } public Builder expand(EngagementsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -357,7 +357,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -368,7 +368,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -379,7 +379,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -390,7 +390,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -401,7 +401,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -412,7 +412,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -423,7 +423,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -434,7 +434,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -445,7 +445,7 @@ public Builder startedAfter(Optional startedAfter) { } public Builder startedAfter(OffsetDateTime startedAfter) { - this.startedAfter = Optional.of(startedAfter); + this.startedAfter = Optional.ofNullable(startedAfter); return this; } @@ -456,7 +456,7 @@ public Builder startedBefore(Optional startedBefore) { } public Builder startedBefore(OffsetDateTime startedBefore) { - this.startedBefore = Optional.of(startedBefore); + this.startedBefore = Optional.ofNullable(startedBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRemoteFieldClassesListRequest.java index 97377c5e6..520646632 100644 --- a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementsRemoteFieldClassesListRequest.Builder.class) public final class EngagementsRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRetrieveRequest.java index 646923270..8c10a3b9c 100644 --- a/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagements/requests/EngagementsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementsRetrieveRequest.Builder.class) public final class EngagementsRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(EngagementsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagements/requests/PatchedEngagementEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/engagements/requests/PatchedEngagementEndpointRequest.java index b726d6dad..b5865695f 100644 --- a/src/main/java/com/merge/api/resources/crm/engagements/requests/PatchedEngagementEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagements/requests/PatchedEngagementEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEngagementEndpointRequest.Builder.class) public final class PatchedEngagementEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PatchedEngagementRequest model); + _FinalStage model(@NotNull PatchedEngagementRequest model); Builder from(PatchedEngagementEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedEngagementEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PatchedEngagementRequest model) { + public _FinalStage model(@NotNull PatchedEngagementRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PatchedEngagementRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagementtypes/EngagementTypesClient.java b/src/main/java/com/merge/api/resources/crm/engagementtypes/EngagementTypesClient.java index 780842abf..85b13ad78 100644 --- a/src/main/java/com/merge/api/resources/crm/engagementtypes/EngagementTypesClient.java +++ b/src/main/java/com/merge/api/resources/crm/engagementtypes/EngagementTypesClient.java @@ -97,7 +97,8 @@ public PaginatedEngagementTypeList list(EngagementTypesListRequest request, Requ .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -118,13 +119,6 @@ public PaginatedEngagementTypeList list(EngagementTypesListRequest request, Requ } } - /** - * Returns an EngagementType object with the given id. - */ - public EngagementType retrieve(String id) { - return retrieve(id, EngagementTypesRetrieveRequest.builder().build()); - } - /** * Returns an EngagementType object with the given id. */ @@ -153,7 +147,8 @@ public EngagementType retrieve(String id, EngagementTypesRetrieveRequest request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -230,7 +225,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesListRequest.java b/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesListRequest.java index 99d7192b3..943c59513 100644 --- a/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementTypesListRequest.Builder.class) public final class EngagementTypesListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -305,7 +305,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -316,7 +316,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -327,7 +327,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRemoteFieldClassesListRequest.java index 28f0e66b7..976cffed8 100644 --- a/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementTypesRemoteFieldClassesListRequest.Builder.class) public final class EngagementTypesRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRetrieveRequest.java index 9706e79b8..754172f27 100644 --- a/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/engagementtypes/requests/EngagementTypesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementTypesRetrieveRequest.Builder.class) public final class EngagementTypesRetrieveRequest { private final Optional includeRemoteData; @@ -105,7 +105,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/fieldmapping/FieldMappingClient.java b/src/main/java/com/merge/api/resources/crm/fieldmapping/FieldMappingClient.java index 6d7b4052d..b27e623db 100644 --- a/src/main/java/com/merge/api/resources/crm/fieldmapping/FieldMappingClient.java +++ b/src/main/java/com/merge/api/resources/crm/fieldmapping/FieldMappingClient.java @@ -67,7 +67,8 @@ public FieldMappingApiInstanceResponse fieldMappingsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -127,7 +128,8 @@ public FieldMappingInstanceResponse fieldMappingsCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,6 +171,7 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, .method("DELETE", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -189,14 +192,6 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, } } - /** - * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. - */ - public FieldMappingInstanceResponse fieldMappingsPartialUpdate(String fieldMappingId) { - return fieldMappingsPartialUpdate( - fieldMappingId, PatchedEditFieldMappingRequest.builder().build()); - } - /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. */ @@ -227,6 +222,7 @@ public FieldMappingInstanceResponse fieldMappingsPartialUpdate( .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,7 +276,8 @@ public RemoteFieldApiResponse remoteFieldsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -321,6 +318,7 @@ public ExternalTargetFieldApiResponse targetFieldsRetrieve(RequestOptions reques .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/CreateFieldMappingRequest.java index 2e62c4e58..3d04931aa 100644 --- a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/CreateFieldMappingRequest.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateFieldMappingRequest.Builder.class) public final class CreateFieldMappingRequest { private final Optional excludeRemoteFieldMetadata; @@ -157,25 +158,25 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { - TargetFieldDescriptionStage targetFieldName(String targetFieldName); + TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { - RemoteMethodStage targetFieldDescription(String targetFieldDescription); + RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { - RemoteUrlPathStage remoteMethod(String remoteMethod); + RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { - CommonModelNameStage remoteUrlPath(String remoteUrlPath); + CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { - _FinalStage commonModelName(String commonModelName); + _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { @@ -237,7 +238,7 @@ public Builder from(CreateFieldMappingRequest other) { */ @java.lang.Override @JsonSetter("target_field_name") - public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { + public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName) { this.targetFieldName = targetFieldName; return this; } @@ -248,7 +249,7 @@ public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { */ @java.lang.Override @JsonSetter("target_field_description") - public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { + public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription) { this.targetFieldDescription = targetFieldDescription; return this; } @@ -259,7 +260,7 @@ public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { */ @java.lang.Override @JsonSetter("remote_method") - public RemoteUrlPathStage remoteMethod(String remoteMethod) { + public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { this.remoteMethod = remoteMethod; return this; } @@ -270,7 +271,7 @@ public RemoteUrlPathStage remoteMethod(String remoteMethod) { */ @java.lang.Override @JsonSetter("remote_url_path") - public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { + public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; return this; } @@ -281,7 +282,7 @@ public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { */ @java.lang.Override @JsonSetter("common_model_name") - public _FinalStage commonModelName(String commonModelName) { + public _FinalStage commonModelName(@NotNull String commonModelName) { this.commonModelName = commonModelName; return this; } @@ -320,7 +321,7 @@ public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalP */ @java.lang.Override public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/FieldMappingsRetrieveRequest.java index 9b2e9f341..ce1748dce 100644 --- a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/FieldMappingsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingsRetrieveRequest.Builder.class) public final class FieldMappingsRetrieveRequest { private final Optional excludeRemoteFieldMetadata; @@ -88,7 +88,7 @@ public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMe } public Builder excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/PatchedEditFieldMappingRequest.java index 1917c0789..a4fd0e222 100644 --- a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/PatchedEditFieldMappingRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEditFieldMappingRequest.Builder.class) public final class PatchedEditFieldMappingRequest { private final Optional> remoteFieldTraversalPath; @@ -123,7 +123,7 @@ public Builder remoteFieldTraversalPath(Optional> remoteFieldTrav } public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) { - this.remoteFieldTraversalPath = Optional.of(remoteFieldTraversalPath); + this.remoteFieldTraversalPath = Optional.ofNullable(remoteFieldTraversalPath); return this; } @@ -134,7 +134,7 @@ public Builder remoteMethod(Optional remoteMethod) { } public Builder remoteMethod(String remoteMethod) { - this.remoteMethod = Optional.of(remoteMethod); + this.remoteMethod = Optional.ofNullable(remoteMethod); return this; } @@ -145,7 +145,7 @@ public Builder remoteUrlPath(Optional remoteUrlPath) { } public Builder remoteUrlPath(String remoteUrlPath) { - this.remoteUrlPath = Optional.of(remoteUrlPath); + this.remoteUrlPath = Optional.ofNullable(remoteUrlPath); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/RemoteFieldsRetrieveRequest.java index ff0bf2391..5d76b50c1 100644 --- a/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/fieldmapping/requests/RemoteFieldsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldsRetrieveRequest.Builder.class) public final class RemoteFieldsRetrieveRequest { private final Optional commonModels; @@ -104,7 +104,7 @@ public Builder commonModels(Optional commonModels) { } public Builder commonModels(String commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -115,7 +115,7 @@ public Builder includeExampleValues(Optional includeExampleValues) { } public Builder includeExampleValues(String includeExampleValues) { - this.includeExampleValues = Optional.of(includeExampleValues); + this.includeExampleValues = Optional.ofNullable(includeExampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/forceresync/ForceResyncClient.java b/src/main/java/com/merge/api/resources/crm/forceresync/ForceResyncClient.java index c7a410fcc..3a4e64883 100644 --- a/src/main/java/com/merge/api/resources/crm/forceresync/ForceResyncClient.java +++ b/src/main/java/com/merge/api/resources/crm/forceresync/ForceResyncClient.java @@ -47,6 +47,7 @@ public List syncStatusResyncCreate(RequestOptions requestOptions) { .method("POST", RequestBody.create("", null)) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/generatekey/GenerateKeyClient.java b/src/main/java/com/merge/api/resources/crm/generatekey/GenerateKeyClient.java index 6cc8067b5..442220b6e 100644 --- a/src/main/java/com/merge/api/resources/crm/generatekey/GenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/crm/generatekey/GenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(GenerateRemoteKeyRequest request, RequestOptions request .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/generatekey/requests/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/resources/crm/generatekey/requests/GenerateRemoteKeyRequest.java index 6d69bd64a..691546b5f 100644 --- a/src/main/java/com/merge/api/resources/crm/generatekey/requests/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/resources/crm/generatekey/requests/GenerateRemoteKeyRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GenerateRemoteKeyRequest.Builder.class) public final class GenerateRemoteKeyRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); } @@ -95,7 +96,7 @@ public Builder from(GenerateRemoteKeyRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/issues/IssuesClient.java b/src/main/java/com/merge/api/resources/crm/issues/IssuesClient.java index e9ab826f5..db1593212 100644 --- a/src/main/java/com/merge/api/resources/crm/issues/IssuesClient.java +++ b/src/main/java/com/merge/api/resources/crm/issues/IssuesClient.java @@ -105,7 +105,8 @@ public PaginatedIssueList list(IssuesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -147,6 +148,7 @@ public Issue retrieve(String id, RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/issues/requests/IssuesListRequest.java b/src/main/java/com/merge/api/resources/crm/issues/requests/IssuesListRequest.java index 226d401b2..36548c36b 100644 --- a/src/main/java/com/merge/api/resources/crm/issues/requests/IssuesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/issues/requests/IssuesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IssuesListRequest.Builder.class) public final class IssuesListRequest { private final Optional accountToken; @@ -308,7 +308,7 @@ public Builder accountToken(Optional accountToken) { } public Builder accountToken(String accountToken) { - this.accountToken = Optional.of(accountToken); + this.accountToken = Optional.ofNullable(accountToken); return this; } @@ -319,7 +319,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -330,7 +330,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -341,7 +341,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -352,7 +352,7 @@ public Builder firstIncidentTimeAfter(Optional firstIncidentTime } public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { - this.firstIncidentTimeAfter = Optional.of(firstIncidentTimeAfter); + this.firstIncidentTimeAfter = Optional.ofNullable(firstIncidentTimeAfter); return this; } @@ -363,7 +363,7 @@ public Builder firstIncidentTimeBefore(Optional firstIncidentTim } public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { - this.firstIncidentTimeBefore = Optional.of(firstIncidentTimeBefore); + this.firstIncidentTimeBefore = Optional.ofNullable(firstIncidentTimeBefore); return this; } @@ -374,7 +374,7 @@ public Builder includeMuted(Optional includeMuted) { } public Builder includeMuted(String includeMuted) { - this.includeMuted = Optional.of(includeMuted); + this.includeMuted = Optional.ofNullable(includeMuted); return this; } @@ -385,7 +385,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -396,7 +396,7 @@ public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAf } public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { - this.lastIncidentTimeAfter = Optional.of(lastIncidentTimeAfter); + this.lastIncidentTimeAfter = Optional.ofNullable(lastIncidentTimeAfter); return this; } @@ -407,7 +407,7 @@ public Builder lastIncidentTimeBefore(Optional lastIncidentTimeB } public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { - this.lastIncidentTimeBefore = Optional.of(lastIncidentTimeBefore); + this.lastIncidentTimeBefore = Optional.ofNullable(lastIncidentTimeBefore); return this; } @@ -418,7 +418,7 @@ public Builder linkedAccountId(Optional linkedAccountId) { } public Builder linkedAccountId(String linkedAccountId) { - this.linkedAccountId = Optional.of(linkedAccountId); + this.linkedAccountId = Optional.ofNullable(linkedAccountId); return this; } @@ -429,7 +429,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -440,7 +440,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -451,7 +451,7 @@ public Builder status(Optional status) { } public Builder status(IssuesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/leads/LeadsClient.java b/src/main/java/com/merge/api/resources/crm/leads/LeadsClient.java index 671aedc19..cfbb5bbed 100644 --- a/src/main/java/com/merge/api/resources/crm/leads/LeadsClient.java +++ b/src/main/java/com/merge/api/resources/crm/leads/LeadsClient.java @@ -125,7 +125,8 @@ public PaginatedLeadList list(LeadsListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -180,7 +181,8 @@ public LeadResponse create(LeadEndpointRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -201,13 +203,6 @@ public LeadResponse create(LeadEndpointRequest request, RequestOptions requestOp } } - /** - * Returns a Lead object with the given id. - */ - public Lead retrieve(String id) { - return retrieve(id, LeadsRetrieveRequest.builder().build()); - } - /** * Returns a Lead object with the given id. */ @@ -239,7 +234,8 @@ public Lead retrieve(String id, LeadsRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,6 +276,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -356,7 +353,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadEndpointRequest.java index 207eae34e..3583075c8 100644 --- a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LeadEndpointRequest.Builder.class) public final class LeadEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(LeadRequest model); + _FinalStage model(@NotNull LeadRequest model); Builder from(LeadEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(LeadEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(LeadRequest model) { + public _FinalStage model(@NotNull LeadRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(LeadRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsListRequest.java b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsListRequest.java index 67c75d8e6..3a72e5898 100644 --- a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LeadsListRequest.Builder.class) public final class LeadsListRequest { private final Optional convertedAccountId; @@ -364,7 +364,7 @@ public Builder convertedAccountId(Optional convertedAccountId) { } public Builder convertedAccountId(String convertedAccountId) { - this.convertedAccountId = Optional.of(convertedAccountId); + this.convertedAccountId = Optional.ofNullable(convertedAccountId); return this; } @@ -375,7 +375,7 @@ public Builder convertedContactId(Optional convertedContactId) { } public Builder convertedContactId(String convertedContactId) { - this.convertedContactId = Optional.of(convertedContactId); + this.convertedContactId = Optional.ofNullable(convertedContactId); return this; } @@ -386,7 +386,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -397,7 +397,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -408,7 +408,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -419,7 +419,7 @@ public Builder emailAddresses(Optional emailAddresses) { } public Builder emailAddresses(String emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -430,7 +430,7 @@ public Builder expand(Optional expand) { } public Builder expand(LeadsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -441,7 +441,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -452,7 +452,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -463,7 +463,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -474,7 +474,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -485,7 +485,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -496,7 +496,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -507,7 +507,7 @@ public Builder ownerId(Optional ownerId) { } public Builder ownerId(String ownerId) { - this.ownerId = Optional.of(ownerId); + this.ownerId = Optional.ofNullable(ownerId); return this; } @@ -518,7 +518,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -529,7 +529,7 @@ public Builder phoneNumbers(Optional phoneNumbers) { } public Builder phoneNumbers(String phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -540,7 +540,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRemoteFieldClassesListRequest.java index 5da103c77..81a95f0c1 100644 --- a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LeadsRemoteFieldClassesListRequest.Builder.class) public final class LeadsRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRetrieveRequest.java index 5e56425ae..f2bcc2488 100644 --- a/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/leads/requests/LeadsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LeadsRetrieveRequest.Builder.class) public final class LeadsRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(LeadsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/linkedaccounts/LinkedAccountsClient.java b/src/main/java/com/merge/api/resources/crm/linkedaccounts/LinkedAccountsClient.java index 663676072..1125fcb7a 100644 --- a/src/main/java/com/merge/api/resources/crm/linkedaccounts/LinkedAccountsClient.java +++ b/src/main/java/com/merge/api/resources/crm/linkedaccounts/LinkedAccountsClient.java @@ -98,7 +98,8 @@ public PaginatedAccountDetailsAndActionsList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/linkedaccounts/requests/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/resources/crm/linkedaccounts/requests/LinkedAccountsListRequest.java index e2ae7b055..0b462572b 100644 --- a/src/main/java/com/merge/api/resources/crm/linkedaccounts/requests/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/linkedaccounts/requests/LinkedAccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountsListRequest.Builder.class) public final class LinkedAccountsListRequest { private final Optional category; @@ -301,7 +301,7 @@ public Builder category(Optional category) { } public Builder category(LinkedAccountsListRequestCategory category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -312,7 +312,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -323,7 +323,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -334,7 +334,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -345,7 +345,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -356,7 +356,7 @@ public Builder endUserOriginIds(Optional endUserOriginIds) { } public Builder endUserOriginIds(String endUserOriginIds) { - this.endUserOriginIds = Optional.of(endUserOriginIds); + this.endUserOriginIds = Optional.ofNullable(endUserOriginIds); return this; } @@ -367,7 +367,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -378,7 +378,7 @@ public Builder ids(Optional ids) { } public Builder ids(String ids) { - this.ids = Optional.of(ids); + this.ids = Optional.ofNullable(ids); return this; } @@ -389,7 +389,7 @@ public Builder includeDuplicates(Optional includeDuplicates) { } public Builder includeDuplicates(Boolean includeDuplicates) { - this.includeDuplicates = Optional.of(includeDuplicates); + this.includeDuplicates = Optional.ofNullable(includeDuplicates); return this; } @@ -400,7 +400,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -411,7 +411,7 @@ public Builder isTestAccount(Optional isTestAccount) { } public Builder isTestAccount(String isTestAccount) { - this.isTestAccount = Optional.of(isTestAccount); + this.isTestAccount = Optional.ofNullable(isTestAccount); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/linktoken/LinkTokenClient.java b/src/main/java/com/merge/api/resources/crm/linktoken/LinkTokenClient.java index 5a412ea58..73be11092 100644 --- a/src/main/java/com/merge/api/resources/crm/linktoken/LinkTokenClient.java +++ b/src/main/java/com/merge/api/resources/crm/linktoken/LinkTokenClient.java @@ -55,6 +55,7 @@ public LinkToken create(EndUserDetailsRequest request, RequestOptions requestOpt .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/linktoken/requests/EndUserDetailsRequest.java b/src/main/java/com/merge/api/resources/crm/linktoken/requests/EndUserDetailsRequest.java index cfa6bba30..5a8157e5e 100644 --- a/src/main/java/com/merge/api/resources/crm/linktoken/requests/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/resources/crm/linktoken/requests/EndUserDetailsRequest.java @@ -23,8 +23,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EndUserDetailsRequest.Builder.class) public final class EndUserDetailsRequest { private final String endUserEmailAddress; @@ -252,17 +253,17 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { - EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress); + EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { - EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName); + EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { - _FinalStage endUserOriginId(String endUserOriginId); + _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { @@ -373,7 +374,7 @@ public Builder from(EndUserDetailsRequest other) { */ @java.lang.Override @JsonSetter("end_user_email_address") - public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress) { + public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @@ -384,7 +385,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddre */ @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @@ -395,7 +396,7 @@ public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationNa */ @java.lang.Override @JsonSetter("end_user_origin_id") - public _FinalStage endUserOriginId(String endUserOriginId) { + public _FinalStage endUserOriginId(@NotNull String endUserOriginId) { this.endUserOriginId = endUserOriginId; return this; } @@ -406,7 +407,7 @@ public _FinalStage endUserOriginId(String endUserOriginId) { */ @java.lang.Override public _FinalStage integrationSpecificConfig(Map integrationSpecificConfig) { - this.integrationSpecificConfig = Optional.of(integrationSpecificConfig); + this.integrationSpecificConfig = Optional.ofNullable(integrationSpecificConfig); return this; } @@ -423,7 +424,7 @@ public _FinalStage integrationSpecificConfig(Optional> int */ @java.lang.Override public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { - this.areSyncsDisabled = Optional.of(areSyncsDisabled); + this.areSyncsDisabled = Optional.ofNullable(areSyncsDisabled); return this; } @@ -444,7 +445,7 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { */ @java.lang.Override public _FinalStage language(LanguageEnum language) { - this.language = Optional.of(language); + this.language = Optional.ofNullable(language); return this; } @@ -462,7 +463,7 @@ public _FinalStage language(Optional language) { @java.lang.Override public _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes) { - this.categoryCommonModelScopes = Optional.of(categoryCommonModelScopes); + this.categoryCommonModelScopes = Optional.ofNullable(categoryCommonModelScopes); return this; } @@ -481,7 +482,7 @@ public _FinalStage categoryCommonModelScopes( */ @java.lang.Override public _FinalStage commonModels(List commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -498,7 +499,7 @@ public _FinalStage commonModels(Optional> com */ @java.lang.Override public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { - this.hideAdminMagicLink = Optional.of(hideAdminMagicLink); + this.hideAdminMagicLink = Optional.ofNullable(hideAdminMagicLink); return this; } @@ -515,7 +516,7 @@ public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { */ @java.lang.Override public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { - this.shouldCreateMagicLinkUrl = Optional.of(shouldCreateMagicLinkUrl); + this.shouldCreateMagicLinkUrl = Optional.ofNullable(shouldCreateMagicLinkUrl); return this; } @@ -532,7 +533,7 @@ public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicL */ @java.lang.Override public _FinalStage linkExpiryMins(Integer linkExpiryMins) { - this.linkExpiryMins = Optional.of(linkExpiryMins); + this.linkExpiryMins = Optional.ofNullable(linkExpiryMins); return this; } @@ -549,7 +550,7 @@ public _FinalStage linkExpiryMins(Optional linkExpiryMins) { */ @java.lang.Override public _FinalStage integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/notes/NotesClient.java b/src/main/java/com/merge/api/resources/crm/notes/NotesClient.java index 1d8c241e6..56e46e217 100644 --- a/src/main/java/com/merge/api/resources/crm/notes/NotesClient.java +++ b/src/main/java/com/merge/api/resources/crm/notes/NotesClient.java @@ -120,7 +120,8 @@ public PaginatedNoteList list(NotesListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -175,7 +176,8 @@ public NoteResponse create(NoteEndpointRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -196,13 +198,6 @@ public NoteResponse create(NoteEndpointRequest request, RequestOptions requestOp } } - /** - * Returns a Note object with the given id. - */ - public Note retrieve(String id) { - return retrieve(id, NotesRetrieveRequest.builder().build()); - } - /** * Returns a Note object with the given id. */ @@ -234,7 +229,8 @@ public Note retrieve(String id, NotesRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -275,6 +271,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -351,7 +348,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/notes/requests/NoteEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/notes/requests/NoteEndpointRequest.java index d9947d545..bdd8984bf 100644 --- a/src/main/java/com/merge/api/resources/crm/notes/requests/NoteEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/notes/requests/NoteEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = NoteEndpointRequest.Builder.class) public final class NoteEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(NoteRequest model); + _FinalStage model(@NotNull NoteRequest model); Builder from(NoteEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(NoteEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(NoteRequest model) { + public _FinalStage model(@NotNull NoteRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(NoteRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/notes/requests/NotesListRequest.java b/src/main/java/com/merge/api/resources/crm/notes/requests/NotesListRequest.java index 43fd1a950..d8f262df1 100644 --- a/src/main/java/com/merge/api/resources/crm/notes/requests/NotesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/notes/requests/NotesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = NotesListRequest.Builder.class) public final class NotesListRequest { private final Optional accountId; @@ -347,7 +347,7 @@ public Builder accountId(Optional accountId) { } public Builder accountId(String accountId) { - this.accountId = Optional.of(accountId); + this.accountId = Optional.ofNullable(accountId); return this; } @@ -358,7 +358,7 @@ public Builder contactId(Optional contactId) { } public Builder contactId(String contactId) { - this.contactId = Optional.of(contactId); + this.contactId = Optional.ofNullable(contactId); return this; } @@ -369,7 +369,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -380,7 +380,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -391,7 +391,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -402,7 +402,7 @@ public Builder expand(Optional expand) { } public Builder expand(NotesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -413,7 +413,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -424,7 +424,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -435,7 +435,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -446,7 +446,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -457,7 +457,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -468,7 +468,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -479,7 +479,7 @@ public Builder opportunityId(Optional opportunityId) { } public Builder opportunityId(String opportunityId) { - this.opportunityId = Optional.of(opportunityId); + this.opportunityId = Optional.ofNullable(opportunityId); return this; } @@ -490,7 +490,7 @@ public Builder ownerId(Optional ownerId) { } public Builder ownerId(String ownerId) { - this.ownerId = Optional.of(ownerId); + this.ownerId = Optional.ofNullable(ownerId); return this; } @@ -501,7 +501,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -512,7 +512,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRemoteFieldClassesListRequest.java index ceb8f5175..b4dd7d66b 100644 --- a/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = NotesRemoteFieldClassesListRequest.Builder.class) public final class NotesRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRetrieveRequest.java index d13e3fc6d..56513563e 100644 --- a/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/notes/requests/NotesRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = NotesRetrieveRequest.Builder.class) public final class NotesRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(NotesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/opportunities/OpportunitiesClient.java b/src/main/java/com/merge/api/resources/crm/opportunities/OpportunitiesClient.java index daddf6334..cccfe4976 100644 --- a/src/main/java/com/merge/api/resources/crm/opportunities/OpportunitiesClient.java +++ b/src/main/java/com/merge/api/resources/crm/opportunities/OpportunitiesClient.java @@ -132,7 +132,8 @@ public PaginatedOpportunityList list(OpportunitiesListRequest request, RequestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -187,7 +188,8 @@ public OpportunityResponse create(OpportunityEndpointRequest request, RequestOpt .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -208,13 +210,6 @@ public OpportunityResponse create(OpportunityEndpointRequest request, RequestOpt } } - /** - * Returns an Opportunity object with the given id. - */ - public Opportunity retrieve(String id) { - return retrieve(id, OpportunitiesRetrieveRequest.builder().build()); - } - /** * Returns an Opportunity object with the given id. */ @@ -253,7 +248,8 @@ public Opportunity retrieve(String id, OpportunitiesRetrieveRequest request, Req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -310,7 +306,8 @@ public OpportunityResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -352,6 +349,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -392,6 +390,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -468,7 +467,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesListRequest.java b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesListRequest.java index d9d03815f..c60a045c3 100644 --- a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesListRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OpportunitiesListRequest.Builder.class) public final class OpportunitiesListRequest { private final Optional accountId; @@ -404,7 +404,7 @@ public Builder accountId(Optional accountId) { } public Builder accountId(String accountId) { - this.accountId = Optional.of(accountId); + this.accountId = Optional.ofNullable(accountId); return this; } @@ -415,7 +415,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -426,7 +426,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -437,7 +437,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -448,7 +448,7 @@ public Builder expand(Optional expand) { } public Builder expand(OpportunitiesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -459,7 +459,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -470,7 +470,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -481,7 +481,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -492,7 +492,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -503,7 +503,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -514,7 +514,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -525,7 +525,7 @@ public Builder ownerId(Optional ownerId) { } public Builder ownerId(String ownerId) { - this.ownerId = Optional.of(ownerId); + this.ownerId = Optional.ofNullable(ownerId); return this; } @@ -536,7 +536,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -547,7 +547,7 @@ public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { } public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { - this.remoteCreatedAfter = Optional.of(remoteCreatedAfter); + this.remoteCreatedAfter = Optional.ofNullable(remoteCreatedAfter); return this; } @@ -558,7 +558,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -569,7 +569,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -580,7 +580,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -591,7 +591,7 @@ public Builder stageId(Optional stageId) { } public Builder stageId(String stageId) { - this.stageId = Optional.of(stageId); + this.stageId = Optional.ofNullable(stageId); return this; } @@ -602,7 +602,7 @@ public Builder status(Optional status) { } public Builder status(OpportunitiesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRemoteFieldClassesListRequest.java index 899e4596e..28f593280 100644 --- a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OpportunitiesRemoteFieldClassesListRequest.Builder.class) public final class OpportunitiesRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRetrieveRequest.java index e06e0837e..e1558e686 100644 --- a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunitiesRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OpportunitiesRetrieveRequest.Builder.class) public final class OpportunitiesRetrieveRequest { private final Optional expand; @@ -155,7 +155,7 @@ public Builder expand(Optional expand) { } public Builder expand(OpportunitiesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -166,7 +166,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -177,7 +177,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -188,7 +188,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -199,7 +199,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunityEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunityEndpointRequest.java index 95db9fcaf..6b1f2102c 100644 --- a/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunityEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/opportunities/requests/OpportunityEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OpportunityEndpointRequest.Builder.class) public final class OpportunityEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(OpportunityRequest model); + _FinalStage model(@NotNull OpportunityRequest model); Builder from(OpportunityEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(OpportunityEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(OpportunityRequest model) { + public _FinalStage model(@NotNull OpportunityRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(OpportunityRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/opportunities/requests/PatchedOpportunityEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/opportunities/requests/PatchedOpportunityEndpointRequest.java index f8df17180..c8b5cfeb2 100644 --- a/src/main/java/com/merge/api/resources/crm/opportunities/requests/PatchedOpportunityEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/opportunities/requests/PatchedOpportunityEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedOpportunityEndpointRequest.Builder.class) public final class PatchedOpportunityEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PatchedOpportunityRequest model); + _FinalStage model(@NotNull PatchedOpportunityRequest model); Builder from(PatchedOpportunityEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedOpportunityEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PatchedOpportunityRequest model) { + public _FinalStage model(@NotNull PatchedOpportunityRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PatchedOpportunityRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/regeneratekey/RegenerateKeyClient.java b/src/main/java/com/merge/api/resources/crm/regeneratekey/RegenerateKeyClient.java index f1876c4ad..539f5931f 100644 --- a/src/main/java/com/merge/api/resources/crm/regeneratekey/RegenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/crm/regeneratekey/RegenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(RemoteKeyForRegenerationRequest request, RequestOptions .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/regeneratekey/requests/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/resources/crm/regeneratekey/requests/RemoteKeyForRegenerationRequest.java index 1f381da39..33f777c39 100644 --- a/src/main/java/com/merge/api/resources/crm/regeneratekey/requests/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/resources/crm/regeneratekey/requests/RemoteKeyForRegenerationRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKeyForRegenerationRequest.Builder.class) public final class RemoteKeyForRegenerationRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); } @@ -95,7 +96,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/scopes/ScopesClient.java b/src/main/java/com/merge/api/resources/crm/scopes/ScopesClient.java index 4c53c0c2a..72e59d1d9 100644 --- a/src/main/java/com/merge/api/resources/crm/scopes/ScopesClient.java +++ b/src/main/java/com/merge/api/resources/crm/scopes/ScopesClient.java @@ -48,6 +48,7 @@ public CommonModelScopeApi defaultScopesRetrieve(RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -88,6 +89,7 @@ public CommonModelScopeApi linkedAccountScopesRetrieve(RequestOptions requestOpt .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -136,6 +138,7 @@ public CommonModelScopeApi linkedAccountScopesCreate( .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/crm/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java index 07a2be59d..1fb3d9e9c 100644 --- a/src/main/java/com/merge/api/resources/crm/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/crm/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountCommonModelScopeDeserializerRequest.Builder.class) public final class LinkedAccountCommonModelScopeDeserializerRequest { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/crm/stages/StagesClient.java b/src/main/java/com/merge/api/resources/crm/stages/StagesClient.java index 9cd73da73..bc031b9dd 100644 --- a/src/main/java/com/merge/api/resources/crm/stages/StagesClient.java +++ b/src/main/java/com/merge/api/resources/crm/stages/StagesClient.java @@ -97,7 +97,8 @@ public PaginatedStageList list(StagesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -118,13 +119,6 @@ public PaginatedStageList list(StagesListRequest request, RequestOptions request } } - /** - * Returns a Stage object with the given id. - */ - public Stage retrieve(String id) { - return retrieve(id, StagesRetrieveRequest.builder().build()); - } - /** * Returns a Stage object with the given id. */ @@ -153,7 +147,8 @@ public Stage retrieve(String id, StagesRetrieveRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -230,7 +225,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/stages/requests/StagesListRequest.java b/src/main/java/com/merge/api/resources/crm/stages/requests/StagesListRequest.java index ca4eb089b..08600dec3 100644 --- a/src/main/java/com/merge/api/resources/crm/stages/requests/StagesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/stages/requests/StagesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = StagesListRequest.Builder.class) public final class StagesListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -305,7 +305,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -316,7 +316,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -327,7 +327,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRemoteFieldClassesListRequest.java index b1b1e7569..31e8b899e 100644 --- a/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = StagesRemoteFieldClassesListRequest.Builder.class) public final class StagesRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRetrieveRequest.java index 12371530d..58d02bedf 100644 --- a/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/stages/requests/StagesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = StagesRetrieveRequest.Builder.class) public final class StagesRetrieveRequest { private final Optional includeRemoteData; @@ -105,7 +105,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/syncstatus/SyncStatusClient.java b/src/main/java/com/merge/api/resources/crm/syncstatus/SyncStatusClient.java index d611c7c66..7082f55f6 100644 --- a/src/main/java/com/merge/api/resources/crm/syncstatus/SyncStatusClient.java +++ b/src/main/java/com/merge/api/resources/crm/syncstatus/SyncStatusClient.java @@ -56,7 +56,8 @@ public PaginatedSyncStatusList list(SyncStatusListRequest request, RequestOption .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/syncstatus/requests/SyncStatusListRequest.java b/src/main/java/com/merge/api/resources/crm/syncstatus/requests/SyncStatusListRequest.java index ca768d68c..fc4df1ce6 100644 --- a/src/main/java/com/merge/api/resources/crm/syncstatus/requests/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/syncstatus/requests/SyncStatusListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatusListRequest.Builder.class) public final class SyncStatusListRequest { private final Optional cursor; @@ -102,7 +102,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -113,7 +113,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/tasks/TasksClient.java b/src/main/java/com/merge/api/resources/crm/tasks/TasksClient.java index 137fe7010..8cabc0cf1 100644 --- a/src/main/java/com/merge/api/resources/crm/tasks/TasksClient.java +++ b/src/main/java/com/merge/api/resources/crm/tasks/TasksClient.java @@ -108,7 +108,8 @@ public PaginatedTaskList list(TasksListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -163,7 +164,8 @@ public TaskResponse create(TaskEndpointRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -184,13 +186,6 @@ public TaskResponse create(TaskEndpointRequest request, RequestOptions requestOp } } - /** - * Returns a Task object with the given id. - */ - public Task retrieve(String id) { - return retrieve(id, TasksRetrieveRequest.builder().build()); - } - /** * Returns a Task object with the given id. */ @@ -222,7 +217,8 @@ public Task retrieve(String id, TasksRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -278,7 +274,8 @@ public TaskResponse partialUpdate(String id, PatchedTaskEndpointRequest request, .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -320,6 +317,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -360,6 +358,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -436,7 +435,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/tasks/requests/PatchedTaskEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/tasks/requests/PatchedTaskEndpointRequest.java index f61ba925a..79d8930f3 100644 --- a/src/main/java/com/merge/api/resources/crm/tasks/requests/PatchedTaskEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/tasks/requests/PatchedTaskEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedTaskEndpointRequest.Builder.class) public final class PatchedTaskEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PatchedTaskRequest model); + _FinalStage model(@NotNull PatchedTaskRequest model); Builder from(PatchedTaskEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedTaskEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PatchedTaskRequest model) { + public _FinalStage model(@NotNull PatchedTaskRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PatchedTaskRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/tasks/requests/TaskEndpointRequest.java b/src/main/java/com/merge/api/resources/crm/tasks/requests/TaskEndpointRequest.java index e133b72cd..cb877a271 100644 --- a/src/main/java/com/merge/api/resources/crm/tasks/requests/TaskEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/crm/tasks/requests/TaskEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TaskEndpointRequest.Builder.class) public final class TaskEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(TaskRequest model); + _FinalStage model(@NotNull TaskRequest model); Builder from(TaskEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(TaskEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(TaskRequest model) { + public _FinalStage model(@NotNull TaskRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(TaskRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksListRequest.java b/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksListRequest.java index 452351b2d..d9a7fc96d 100644 --- a/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TasksListRequest.Builder.class) public final class TasksListRequest { private final Optional createdAfter; @@ -279,7 +279,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -290,7 +290,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -301,7 +301,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -312,7 +312,7 @@ public Builder expand(Optional expand) { } public Builder expand(TasksListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -323,7 +323,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -334,7 +334,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -345,7 +345,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -356,7 +356,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -367,7 +367,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -378,7 +378,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -389,7 +389,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -400,7 +400,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRemoteFieldClassesListRequest.java index be164756d..3def24821 100644 --- a/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TasksRemoteFieldClassesListRequest.Builder.class) public final class TasksRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRetrieveRequest.java index c005cff03..22c705fa9 100644 --- a/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/tasks/requests/TasksRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TasksRetrieveRequest.Builder.class) public final class TasksRetrieveRequest { private final Optional expand; @@ -122,7 +122,7 @@ public Builder expand(Optional expand) { } public Builder expand(TasksRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -133,7 +133,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -144,7 +144,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Account.java b/src/main/java/com/merge/api/resources/crm/types/Account.java index a04a0a684..7b50b6274 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Account.java +++ b/src/main/java/com/merge/api/resources/crm/types/Account.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Account.Builder.class) public final class Account { private final Optional id; @@ -381,7 +381,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -392,7 +392,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -403,7 +403,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -414,7 +414,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -425,7 +425,7 @@ public Builder owner(Optional owner) { } public Builder owner(AccountOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -436,7 +436,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -447,7 +447,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -458,7 +458,7 @@ public Builder industry(Optional industry) { } public Builder industry(String industry) { - this.industry = Optional.of(industry); + this.industry = Optional.ofNullable(industry); return this; } @@ -469,7 +469,7 @@ public Builder website(Optional website) { } public Builder website(String website) { - this.website = Optional.of(website); + this.website = Optional.ofNullable(website); return this; } @@ -480,7 +480,7 @@ public Builder numberOfEmployees(Optional numberOfEmployees) { } public Builder numberOfEmployees(Integer numberOfEmployees) { - this.numberOfEmployees = Optional.of(numberOfEmployees); + this.numberOfEmployees = Optional.ofNullable(numberOfEmployees); return this; } @@ -491,7 +491,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List
addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -502,7 +502,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -513,7 +513,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -524,7 +524,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -535,7 +535,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -546,7 +546,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -557,7 +557,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -568,7 +568,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -579,7 +579,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AccountDetails.java b/src/main/java/com/merge/api/resources/crm/types/AccountDetails.java index 0af844e3e..fb28e5165 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AccountDetails.java +++ b/src/main/java/com/merge/api/resources/crm/types/AccountDetails.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetails.Builder.class) public final class AccountDetails { private final Optional id; @@ -248,7 +248,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -259,7 +259,7 @@ public Builder integration(Optional integration) { } public Builder integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -270,7 +270,7 @@ public Builder integrationSlug(Optional integrationSlug) { } public Builder integrationSlug(String integrationSlug) { - this.integrationSlug = Optional.of(integrationSlug); + this.integrationSlug = Optional.ofNullable(integrationSlug); return this; } @@ -281,7 +281,7 @@ public Builder category(Optional category) { } public Builder category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -292,7 +292,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -303,7 +303,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -314,7 +314,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -325,7 +325,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -336,7 +336,7 @@ public Builder webhookListenerUrl(Optional webhookListenerUrl) { } public Builder webhookListenerUrl(String webhookListenerUrl) { - this.webhookListenerUrl = Optional.of(webhookListenerUrl); + this.webhookListenerUrl = Optional.ofNullable(webhookListenerUrl); return this; } @@ -347,7 +347,7 @@ public Builder isDuplicate(Optional isDuplicate) { } public Builder isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -358,7 +358,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(String accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -369,7 +369,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActions.java index 1bd43fc2e..acbe0a580 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActions.Builder.class) public final class AccountDetailsAndActions { private final String id; @@ -206,33 +207,33 @@ public static IdStage builder() { } public interface IdStage { - StatusStage id(String id); + StatusStage id(@NotNull String id); Builder from(AccountDetailsAndActions other); } public interface StatusStage { - EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); } public interface EndUserOrganizationNameStage { - EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName); + EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserEmailAddressStage { - WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress); + WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress); } public interface WebhookListenerUrlStage { - AccountTypeStage webhookListenerUrl(String webhookListenerUrl); + AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl); } public interface AccountTypeStage { - CompletedAtStage accountType(String accountType); + CompletedAtStage accountType(@NotNull String accountType); } public interface CompletedAtStage { - _FinalStage completedAt(OffsetDateTime completedAt); + _FinalStage completedAt(@NotNull OffsetDateTime completedAt); } public interface _FinalStage { @@ -324,56 +325,56 @@ public Builder from(AccountDetailsAndActions other) { @java.lang.Override @JsonSetter("id") - public StatusStage id(String id) { + public StatusStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { this.status = status; return this; } @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @java.lang.Override @JsonSetter("end_user_email_address") - public WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress) { + public WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @java.lang.Override @JsonSetter("webhook_listener_url") - public AccountTypeStage webhookListenerUrl(String webhookListenerUrl) { + public AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl) { this.webhookListenerUrl = webhookListenerUrl; return this; } @java.lang.Override @JsonSetter("account_type") - public CompletedAtStage accountType(String accountType) { + public CompletedAtStage accountType(@NotNull String accountType) { this.accountType = accountType; return this; } @java.lang.Override @JsonSetter("completed_at") - public _FinalStage completedAt(OffsetDateTime completedAt) { + public _FinalStage completedAt(@NotNull OffsetDateTime completedAt) { this.completedAt = completedAt; return this; } @java.lang.Override public _FinalStage integration(AccountDetailsAndActionsIntegration integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -390,7 +391,7 @@ public _FinalStage integration(Optional int */ @java.lang.Override public _FinalStage isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -407,7 +408,7 @@ public _FinalStage isDuplicate(Optional isDuplicate) { */ @java.lang.Override public _FinalStage subdomain(String subdomain) { - this.subdomain = Optional.of(subdomain); + this.subdomain = Optional.ofNullable(subdomain); return this; } @@ -420,7 +421,7 @@ public _FinalStage subdomain(Optional subdomain) { @java.lang.Override public _FinalStage endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -433,7 +434,7 @@ public _FinalStage endUserOriginId(Optional endUserOriginId) { @java.lang.Override public _FinalStage statusDetail(String statusDetail) { - this.statusDetail = Optional.of(statusDetail); + this.statusDetail = Optional.ofNullable(statusDetail); return this; } @@ -446,7 +447,7 @@ public _FinalStage statusDetail(Optional statusDetail) { @java.lang.Override public _FinalStage category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActionsIntegration.java b/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActionsIntegration.java index 7e2e66fdf..5d9e39f6b 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActionsIntegration.java +++ b/src/main/java/com/merge/api/resources/crm/types/AccountDetailsAndActionsIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActionsIntegration.Builder.class) public final class AccountDetailsAndActionsIntegration { private final String name; @@ -147,17 +148,17 @@ public static NameStage builder() { } public interface NameStage { - ColorStage name(String name); + ColorStage name(@NotNull String name); Builder from(AccountDetailsAndActionsIntegration other); } public interface ColorStage { - SlugStage color(String color); + SlugStage color(@NotNull String color); } public interface SlugStage { - PassthroughAvailableStage slug(String slug); + PassthroughAvailableStage slug(@NotNull String slug); } public interface PassthroughAvailableStage { @@ -225,21 +226,21 @@ public Builder from(AccountDetailsAndActionsIntegration other) { @java.lang.Override @JsonSetter("name") - public ColorStage name(String name) { + public ColorStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("color") - public SlugStage color(String color) { + public SlugStage color(@NotNull String color) { this.color = color; return this; } @java.lang.Override @JsonSetter("slug") - public PassthroughAvailableStage slug(String slug) { + public PassthroughAvailableStage slug(@NotNull String slug) { this.slug = slug; return this; } @@ -253,7 +254,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } @@ -266,7 +267,7 @@ public _FinalStage availableModelOperations(Optional> avail @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -279,7 +280,7 @@ public _FinalStage squareImage(Optional squareImage) { @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AccountIntegration.java b/src/main/java/com/merge/api/resources/crm/types/AccountIntegration.java index d2fd40547..3789c4fa5 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/resources/crm/types/AccountIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountIntegration.Builder.class) public final class AccountIntegration { private final String name; @@ -195,7 +196,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); } @@ -288,7 +289,7 @@ public Builder from(AccountIntegration other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } @@ -299,7 +300,7 @@ public _FinalStage name(String name) { */ @java.lang.Override public _FinalStage categoryBetaStatus(Map categoryBetaStatus) { - this.categoryBetaStatus = Optional.of(categoryBetaStatus); + this.categoryBetaStatus = Optional.ofNullable(categoryBetaStatus); return this; } @@ -316,7 +317,7 @@ public _FinalStage categoryBetaStatus(Optional> categoryBe */ @java.lang.Override public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { - this.webhookSetupGuideUrl = Optional.of(webhookSetupGuideUrl); + this.webhookSetupGuideUrl = Optional.ofNullable(webhookSetupGuideUrl); return this; } @@ -333,7 +334,7 @@ public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { */ @java.lang.Override public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls) { - this.apiEndpointsToDocumentationUrls = Optional.of(apiEndpointsToDocumentationUrls); + this.apiEndpointsToDocumentationUrls = Optional.ofNullable(apiEndpointsToDocumentationUrls); return this; } @@ -347,7 +348,7 @@ public _FinalStage apiEndpointsToDocumentationUrls( @java.lang.Override public _FinalStage slug(String slug) { - this.slug = Optional.of(slug); + this.slug = Optional.ofNullable(slug); return this; } @@ -364,7 +365,7 @@ public _FinalStage slug(Optional slug) { */ @java.lang.Override public _FinalStage color(String color) { - this.color = Optional.of(color); + this.color = Optional.ofNullable(color); return this; } @@ -381,7 +382,7 @@ public _FinalStage color(Optional color) { */ @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -398,7 +399,7 @@ public _FinalStage squareImage(Optional squareImage) { */ @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } @@ -415,7 +416,7 @@ public _FinalStage image(Optional image) { */ @java.lang.Override public _FinalStage categories(List categories) { - this.categories = Optional.of(categories); + this.categories = Optional.ofNullable(categories); return this; } @@ -432,7 +433,7 @@ public _FinalStage categories(Optional> categories) { */ @java.lang.Override public _FinalStage abbreviatedName(String abbreviatedName) { - this.abbreviatedName = Optional.of(abbreviatedName); + this.abbreviatedName = Optional.ofNullable(abbreviatedName); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AccountRequest.java b/src/main/java/com/merge/api/resources/crm/types/AccountRequest.java index 42120a5b7..924eb1e22 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AccountRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/AccountRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountRequest.Builder.class) public final class AccountRequest { private final Optional owner; @@ -251,7 +251,7 @@ public Builder owner(Optional owner) { } public Builder owner(AccountRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -262,7 +262,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -273,7 +273,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -284,7 +284,7 @@ public Builder industry(Optional industry) { } public Builder industry(String industry) { - this.industry = Optional.of(industry); + this.industry = Optional.ofNullable(industry); return this; } @@ -295,7 +295,7 @@ public Builder website(Optional website) { } public Builder website(String website) { - this.website = Optional.of(website); + this.website = Optional.ofNullable(website); return this; } @@ -306,7 +306,7 @@ public Builder numberOfEmployees(Optional numberOfEmployees) { } public Builder numberOfEmployees(Integer numberOfEmployees) { - this.numberOfEmployees = Optional.of(numberOfEmployees); + this.numberOfEmployees = Optional.ofNullable(numberOfEmployees); return this; } @@ -317,7 +317,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -328,7 +328,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -339,7 +339,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -350,7 +350,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -361,7 +361,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AccountToken.java b/src/main/java/com/merge/api/resources/crm/types/AccountToken.java index d51fa8989..cbcddd0be 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AccountToken.java +++ b/src/main/java/com/merge/api/resources/crm/types/AccountToken.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountToken.Builder.class) public final class AccountToken { private final String accountToken; @@ -71,13 +72,13 @@ public static AccountTokenStage builder() { } public interface AccountTokenStage { - IntegrationStage accountToken(String accountToken); + IntegrationStage accountToken(@NotNull String accountToken); Builder from(AccountToken other); } public interface IntegrationStage { - _FinalStage integration(AccountIntegration integration); + _FinalStage integration(@NotNull AccountIntegration integration); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(AccountToken other) { @java.lang.Override @JsonSetter("account_token") - public IntegrationStage accountToken(String accountToken) { + public IntegrationStage accountToken(@NotNull String accountToken) { this.accountToken = accountToken; return this; } @java.lang.Override @JsonSetter("integration") - public _FinalStage integration(AccountIntegration integration) { + public _FinalStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Address.java b/src/main/java/com/merge/api/resources/crm/types/Address.java index 8f2716840..98ddb49c8 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Address.java +++ b/src/main/java/com/merge/api/resources/crm/types/Address.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Address.Builder.class) public final class Address { private final Optional createdAt; @@ -482,7 +482,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -493,7 +493,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -504,7 +504,7 @@ public Builder street1(Optional street1) { } public Builder street1(String street1) { - this.street1 = Optional.of(street1); + this.street1 = Optional.ofNullable(street1); return this; } @@ -515,7 +515,7 @@ public Builder street2(Optional street2) { } public Builder street2(String street2) { - this.street2 = Optional.of(street2); + this.street2 = Optional.ofNullable(street2); return this; } @@ -526,7 +526,7 @@ public Builder city(Optional city) { } public Builder city(String city) { - this.city = Optional.of(city); + this.city = Optional.ofNullable(city); return this; } @@ -537,7 +537,7 @@ public Builder state(Optional state) { } public Builder state(String state) { - this.state = Optional.of(state); + this.state = Optional.ofNullable(state); return this; } @@ -548,7 +548,7 @@ public Builder postalCode(Optional postalCode) { } public Builder postalCode(String postalCode) { - this.postalCode = Optional.of(postalCode); + this.postalCode = Optional.ofNullable(postalCode); return this; } @@ -559,7 +559,7 @@ public Builder country(Optional country) { } public Builder country(AddressCountry country) { - this.country = Optional.of(country); + this.country = Optional.ofNullable(country); return this; } @@ -570,7 +570,7 @@ public Builder addressType(Optional addressType) { } public Builder addressType(AddressAddressType addressType) { - this.addressType = Optional.of(addressType); + this.addressType = Optional.ofNullable(addressType); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AddressRequest.java b/src/main/java/com/merge/api/resources/crm/types/AddressRequest.java index 7f92e7175..3473fed69 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AddressRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/AddressRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AddressRequest.Builder.class) public final class AddressRequest { private final Optional street1; @@ -476,7 +476,7 @@ public Builder street1(Optional street1) { } public Builder street1(String street1) { - this.street1 = Optional.of(street1); + this.street1 = Optional.ofNullable(street1); return this; } @@ -487,7 +487,7 @@ public Builder street2(Optional street2) { } public Builder street2(String street2) { - this.street2 = Optional.of(street2); + this.street2 = Optional.ofNullable(street2); return this; } @@ -498,7 +498,7 @@ public Builder city(Optional city) { } public Builder city(String city) { - this.city = Optional.of(city); + this.city = Optional.ofNullable(city); return this; } @@ -509,7 +509,7 @@ public Builder state(Optional state) { } public Builder state(String state) { - this.state = Optional.of(state); + this.state = Optional.ofNullable(state); return this; } @@ -520,7 +520,7 @@ public Builder postalCode(Optional postalCode) { } public Builder postalCode(String postalCode) { - this.postalCode = Optional.of(postalCode); + this.postalCode = Optional.ofNullable(postalCode); return this; } @@ -531,7 +531,7 @@ public Builder country(Optional country) { } public Builder country(AddressRequestCountry country) { - this.country = Optional.of(country); + this.country = Optional.ofNullable(country); return this; } @@ -542,7 +542,7 @@ public Builder addressType(Optional addressType) { } public Builder addressType(AddressRequestAddressType addressType) { - this.addressType = Optional.of(addressType); + this.addressType = Optional.ofNullable(addressType); return this; } @@ -553,7 +553,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -564,7 +564,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AdvancedMetadata.java b/src/main/java/com/merge/api/resources/crm/types/AdvancedMetadata.java index 6b3393e49..b3943a233 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AdvancedMetadata.java +++ b/src/main/java/com/merge/api/resources/crm/types/AdvancedMetadata.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AdvancedMetadata.Builder.class) public final class AdvancedMetadata { private final String id; @@ -119,7 +120,7 @@ public static IdStage builder() { } public interface IdStage { - _FinalStage id(String id); + _FinalStage id(@NotNull String id); Builder from(AdvancedMetadata other); } @@ -180,14 +181,14 @@ public Builder from(AdvancedMetadata other) { @java.lang.Override @JsonSetter("id") - public _FinalStage id(String id) { + public _FinalStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override public _FinalStage fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -200,7 +201,7 @@ public _FinalStage fieldChoices(Optional> fieldChoices) { @java.lang.Override public _FinalStage isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -213,7 +214,7 @@ public _FinalStage isCustom(Optional isCustom) { @java.lang.Override public _FinalStage isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -226,7 +227,7 @@ public _FinalStage isRequired(Optional isRequired) { @java.lang.Override public _FinalStage description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -239,7 +240,7 @@ public _FinalStage description(Optional description) { @java.lang.Override public _FinalStage displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Association.java b/src/main/java/com/merge/api/resources/crm/types/Association.java index ad0817625..e6bc78676 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Association.java +++ b/src/main/java/com/merge/api/resources/crm/types/Association.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Association.Builder.class) public final class Association { private final Optional createdAt; @@ -149,7 +149,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -160,7 +160,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -171,7 +171,7 @@ public Builder sourceObject(Optional sourceObject) { } public Builder sourceObject(String sourceObject) { - this.sourceObject = Optional.of(sourceObject); + this.sourceObject = Optional.ofNullable(sourceObject); return this; } @@ -182,7 +182,7 @@ public Builder targetObject(Optional targetObject) { } public Builder targetObject(String targetObject) { - this.targetObject = Optional.of(targetObject); + this.targetObject = Optional.ofNullable(targetObject); return this; } @@ -193,7 +193,7 @@ public Builder associationType(Optional associationT } public Builder associationType(AssociationAssociationType associationType) { - this.associationType = Optional.of(associationType); + this.associationType = Optional.ofNullable(associationType); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AssociationSubType.java b/src/main/java/com/merge/api/resources/crm/types/AssociationSubType.java index d96a55572..74e4d7392 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AssociationSubType.java +++ b/src/main/java/com/merge/api/resources/crm/types/AssociationSubType.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AssociationSubType.Builder.class) public final class AssociationSubType { private final Optional id; @@ -132,7 +132,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -143,7 +143,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -154,7 +154,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -165,7 +165,7 @@ public Builder originType(Optional originType) { } public Builder originType(String originType) { - this.originType = Optional.of(originType); + this.originType = Optional.ofNullable(originType); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AssociationType.java b/src/main/java/com/merge/api/resources/crm/types/AssociationType.java index 5d7ecbd31..dec666c7b 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AssociationType.java +++ b/src/main/java/com/merge/api/resources/crm/types/AssociationType.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AssociationType.Builder.class) public final class AssociationType { private final Optional id; @@ -228,7 +228,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -239,7 +239,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -250,7 +250,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -261,7 +261,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -272,7 +272,7 @@ public Builder sourceObjectClass(Optional> sourceObjectCla } public Builder sourceObjectClass(Map sourceObjectClass) { - this.sourceObjectClass = Optional.of(sourceObjectClass); + this.sourceObjectClass = Optional.ofNullable(sourceObjectClass); return this; } @@ -283,7 +283,7 @@ public Builder targetObjectClasses(Optional> targetObje } public Builder targetObjectClasses(List targetObjectClasses) { - this.targetObjectClasses = Optional.of(targetObjectClasses); + this.targetObjectClasses = Optional.ofNullable(targetObjectClasses); return this; } @@ -294,7 +294,7 @@ public Builder remoteKeyName(Optional remoteKeyName) { } public Builder remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } @@ -305,7 +305,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } @@ -316,7 +316,7 @@ public Builder cardinality(Optional cardinality) { } public Builder cardinality(AssociationTypeCardinality cardinality) { - this.cardinality = Optional.of(cardinality); + this.cardinality = Optional.ofNullable(cardinality); return this; } @@ -327,7 +327,7 @@ public Builder isRequired(Optional isRequired) { } public Builder isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AssociationTypeRequestRequest.java b/src/main/java/com/merge/api/resources/crm/types/AssociationTypeRequestRequest.java index 8ed251f25..30f99b39d 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AssociationTypeRequestRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/AssociationTypeRequestRequest.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AssociationTypeRequestRequest.Builder.class) public final class AssociationTypeRequestRequest { private final ObjectClassDescriptionRequest sourceObjectClass; @@ -124,13 +125,13 @@ public static SourceObjectClassStage builder() { } public interface SourceObjectClassStage { - RemoteKeyNameStage sourceObjectClass(ObjectClassDescriptionRequest sourceObjectClass); + RemoteKeyNameStage sourceObjectClass(@NotNull ObjectClassDescriptionRequest sourceObjectClass); Builder from(AssociationTypeRequestRequest other); } public interface RemoteKeyNameStage { - _FinalStage remoteKeyName(String remoteKeyName); + _FinalStage remoteKeyName(@NotNull String remoteKeyName); } public interface _FinalStage { @@ -187,21 +188,21 @@ public Builder from(AssociationTypeRequestRequest other) { @java.lang.Override @JsonSetter("source_object_class") - public RemoteKeyNameStage sourceObjectClass(ObjectClassDescriptionRequest sourceObjectClass) { + public RemoteKeyNameStage sourceObjectClass(@NotNull ObjectClassDescriptionRequest sourceObjectClass) { this.sourceObjectClass = sourceObjectClass; return this; } @java.lang.Override @JsonSetter("remote_key_name") - public _FinalStage remoteKeyName(String remoteKeyName) { + public _FinalStage remoteKeyName(@NotNull String remoteKeyName) { this.remoteKeyName = remoteKeyName; return this; } @java.lang.Override public _FinalStage isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -214,7 +215,7 @@ public _FinalStage isRequired(Optional isRequired) { @java.lang.Override public _FinalStage cardinality(CardinalityEnum cardinality) { - this.cardinality = Optional.of(cardinality); + this.cardinality = Optional.ofNullable(cardinality); return this; } @@ -227,7 +228,7 @@ public _FinalStage cardinality(Optional cardinality) { @java.lang.Override public _FinalStage displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AsyncPassthroughReciept.java b/src/main/java/com/merge/api/resources/crm/types/AsyncPassthroughReciept.java index 3f55b55db..777530118 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AsyncPassthroughReciept.java +++ b/src/main/java/com/merge/api/resources/crm/types/AsyncPassthroughReciept.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPassthroughReciept.Builder.class) public final class AsyncPassthroughReciept { private final String asyncPassthroughReceiptId; @@ -62,7 +63,7 @@ public static AsyncPassthroughReceiptIdStage builder() { } public interface AsyncPassthroughReceiptIdStage { - _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId); + _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId); Builder from(AsyncPassthroughReciept other); } @@ -88,7 +89,7 @@ public Builder from(AsyncPassthroughReciept other) { @java.lang.Override @JsonSetter("async_passthrough_receipt_id") - public _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId) { + public _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId) { this.asyncPassthroughReceiptId = asyncPassthroughReceiptId; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AuditLogEvent.java b/src/main/java/com/merge/api/resources/crm/types/AuditLogEvent.java index 773c182d2..0cb9917e9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/resources/crm/types/AuditLogEvent.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditLogEvent.Builder.class) public final class AuditLogEvent { private final Optional id; @@ -208,21 +209,21 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(AuditLogEventRole role); + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } public interface IpAddressStage { - EventTypeStage ipAddress(String ipAddress); + EventTypeStage ipAddress(@NotNull String ipAddress); } public interface EventTypeStage { - EventDescriptionStage eventType(AuditLogEventEventType eventType); + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { - _FinalStage eventDescription(String eventDescription); + _FinalStage eventDescription(@NotNull String eventDescription); } public interface _FinalStage { @@ -296,14 +297,14 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(AuditLogEventRole role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @java.lang.Override @JsonSetter("ip_address") - public EventTypeStage ipAddress(String ipAddress) { + public EventTypeStage ipAddress(@NotNull String ipAddress) { this.ipAddress = ipAddress; return this; } @@ -357,21 +358,21 @@ public EventTypeStage ipAddress(String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(AuditLogEventEventType eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @java.lang.Override @JsonSetter("event_description") - public _FinalStage eventDescription(String eventDescription) { + public _FinalStage eventDescription(@NotNull String eventDescription) { this.eventDescription = eventDescription; return this; } @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -388,7 +389,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } @@ -405,7 +406,7 @@ public _FinalStage userEmail(Optional userEmail) { */ @java.lang.Override public _FinalStage userName(String userName) { - this.userName = Optional.of(userName); + this.userName = Optional.ofNullable(userName); return this; } @@ -418,7 +419,7 @@ public _FinalStage userName(Optional userName) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/AvailableActions.java b/src/main/java/com/merge/api/resources/crm/types/AvailableActions.java index 7f561d34b..700204186 100644 --- a/src/main/java/com/merge/api/resources/crm/types/AvailableActions.java +++ b/src/main/java/com/merge/api/resources/crm/types/AvailableActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AvailableActions.Builder.class) public final class AvailableActions { private final AccountIntegration integration; @@ -87,7 +88,7 @@ public static IntegrationStage builder() { } public interface IntegrationStage { - PassthroughAvailableStage integration(AccountIntegration integration); + PassthroughAvailableStage integration(@NotNull AccountIntegration integration); Builder from(AvailableActions other); } @@ -127,7 +128,7 @@ public Builder from(AvailableActions other) { @java.lang.Override @JsonSetter("integration") - public PassthroughAvailableStage integration(AccountIntegration integration) { + public PassthroughAvailableStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } @@ -141,7 +142,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/resources/crm/types/CommonModelScopeApi.java index 13ad66260..06cc4635a 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/resources/crm/types/CommonModelScopeApi.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopeApi.Builder.class) public final class CommonModelScopeApi { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/crm/types/CommonModelScopesBodyRequest.java b/src/main/java/com/merge/api/resources/crm/types/CommonModelScopesBodyRequest.java index 19d6a215d..abbb46c84 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CommonModelScopesBodyRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/CommonModelScopesBodyRequest.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopesBodyRequest.Builder.class) public final class CommonModelScopesBodyRequest { private final String modelId; @@ -87,7 +88,7 @@ public static ModelIdStage builder() { } public interface ModelIdStage { - _FinalStage modelId(String modelId); + _FinalStage modelId(@NotNull String modelId); Builder from(CommonModelScopesBodyRequest other); } @@ -131,7 +132,7 @@ public Builder from(CommonModelScopesBodyRequest other) { @java.lang.Override @JsonSetter("model_id") - public _FinalStage modelId(String modelId) { + public _FinalStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Contact.java b/src/main/java/com/merge/api/resources/crm/types/Contact.java index 8fde1f858..a5d6a8501 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Contact.java +++ b/src/main/java/com/merge/api/resources/crm/types/Contact.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Contact.Builder.class) public final class Contact { private final Optional id; @@ -344,7 +344,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -355,7 +355,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -366,7 +366,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -377,7 +377,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -388,7 +388,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -399,7 +399,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -410,7 +410,7 @@ public Builder account(Optional account) { } public Builder account(ContactAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -421,7 +421,7 @@ public Builder owner(Optional owner) { } public Builder owner(ContactOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -432,7 +432,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List
addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -443,7 +443,7 @@ public Builder emailAddresses(Optional> emailAddresses) { } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -454,7 +454,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -465,7 +465,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -476,7 +476,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -487,7 +487,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -498,7 +498,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -509,7 +509,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -520,7 +520,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ContactRequest.java b/src/main/java/com/merge/api/resources/crm/types/ContactRequest.java index 12dead2d4..55a1dbd26 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ContactRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/ContactRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactRequest.Builder.class) public final class ContactRequest { private final Optional firstName; @@ -245,7 +245,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -256,7 +256,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -267,7 +267,7 @@ public Builder account(Optional account) { } public Builder account(ContactRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -278,7 +278,7 @@ public Builder owner(Optional owner) { } public Builder owner(ContactRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -289,7 +289,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -300,7 +300,7 @@ public Builder emailAddresses(Optional> emailAddresses } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -311,7 +311,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -322,7 +322,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -333,7 +333,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -344,7 +344,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -355,7 +355,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CrmAccountResponse.java b/src/main/java/com/merge/api/resources/crm/types/CrmAccountResponse.java index 6a425fd8a..c1264c3e9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CrmAccountResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/CrmAccountResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmAccountResponse.Builder.class) public final class CrmAccountResponse { private final Account model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Account model); + _FinalStage model(@NotNull Account model); Builder from(CrmAccountResponse other); } @@ -149,14 +150,14 @@ public Builder from(CrmAccountResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Account model) { + public _FinalStage model(@NotNull Account model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CrmAssociationTypeResponse.java b/src/main/java/com/merge/api/resources/crm/types/CrmAssociationTypeResponse.java index ade194ed8..a056321d1 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CrmAssociationTypeResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/CrmAssociationTypeResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmAssociationTypeResponse.Builder.class) public final class CrmAssociationTypeResponse { private final AssociationType model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(AssociationType model); + _FinalStage model(@NotNull AssociationType model); Builder from(CrmAssociationTypeResponse other); } @@ -149,14 +150,14 @@ public Builder from(CrmAssociationTypeResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(AssociationType model) { + public _FinalStage model(@NotNull AssociationType model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CrmContactResponse.java b/src/main/java/com/merge/api/resources/crm/types/CrmContactResponse.java index be0b891ec..16ebf5759 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CrmContactResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/CrmContactResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmContactResponse.Builder.class) public final class CrmContactResponse { private final Contact model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Contact model); + _FinalStage model(@NotNull Contact model); Builder from(CrmContactResponse other); } @@ -149,14 +150,14 @@ public Builder from(CrmContactResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Contact model) { + public _FinalStage model(@NotNull Contact model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CrmCustomObjectResponse.java b/src/main/java/com/merge/api/resources/crm/types/CrmCustomObjectResponse.java index 9d4b9d757..751400b34 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CrmCustomObjectResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/CrmCustomObjectResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CrmCustomObjectResponse.Builder.class) public final class CrmCustomObjectResponse { private final CustomObject model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(CustomObject model); + _FinalStage model(@NotNull CustomObject model); Builder from(CrmCustomObjectResponse other); } @@ -149,14 +150,14 @@ public Builder from(CrmCustomObjectResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(CustomObject model) { + public _FinalStage model(@NotNull CustomObject model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CustomObject.java b/src/main/java/com/merge/api/resources/crm/types/CustomObject.java index 0679926fc..31d583081 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CustomObject.java +++ b/src/main/java/com/merge/api/resources/crm/types/CustomObject.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObject.Builder.class) public final class CustomObject { private final Optional id; @@ -189,7 +189,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -200,7 +200,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -211,7 +211,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -222,7 +222,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -233,7 +233,7 @@ public Builder objectClass(Optional objectClass) { } public Builder objectClass(String objectClass) { - this.objectClass = Optional.of(objectClass); + this.objectClass = Optional.ofNullable(objectClass); return this; } @@ -244,7 +244,7 @@ public Builder fields(Optional> fields) { } public Builder fields(Map fields) { - this.fields = Optional.of(fields); + this.fields = Optional.ofNullable(fields); return this; } @@ -255,7 +255,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CustomObjectClass.java b/src/main/java/com/merge/api/resources/crm/types/CustomObjectClass.java index 27e96efda..2516086a9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CustomObjectClass.java +++ b/src/main/java/com/merge/api/resources/crm/types/CustomObjectClass.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectClass.Builder.class) public final class CustomObjectClass { private final Optional id; @@ -217,7 +217,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -228,7 +228,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -239,7 +239,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -250,7 +250,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -261,7 +261,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -272,7 +272,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -283,7 +283,7 @@ public Builder labels(Optional>> labels) { } public Builder labels(Map> labels) { - this.labels = Optional.of(labels); + this.labels = Optional.ofNullable(labels); return this; } @@ -294,7 +294,7 @@ public Builder fields(Optional> field } public Builder fields(List fields) { - this.fields = Optional.of(fields); + this.fields = Optional.ofNullable(fields); return this; } @@ -305,7 +305,7 @@ public Builder associationTypes(Optional>> associatio } public Builder associationTypes(List> associationTypes) { - this.associationTypes = Optional.of(associationTypes); + this.associationTypes = Optional.ofNullable(associationTypes); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/CustomObjectRequest.java b/src/main/java/com/merge/api/resources/crm/types/CustomObjectRequest.java index ca9e33039..34e483b3f 100644 --- a/src/main/java/com/merge/api/resources/crm/types/CustomObjectRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/CustomObjectRequest.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CustomObjectRequest.Builder.class) public final class CustomObjectRequest { private final Map fields; diff --git a/src/main/java/com/merge/api/resources/crm/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/resources/crm/types/DataPassthroughRequest.java index 1b4950bca..dfd4d1805 100644 --- a/src/main/java/com/merge/api/resources/crm/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/DataPassthroughRequest.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DataPassthroughRequest.Builder.class) public final class DataPassthroughRequest { private final MethodEnum method; @@ -164,13 +165,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(MethodEnum method); + PathStage method(@NotNull MethodEnum method); Builder from(DataPassthroughRequest other); } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); } public interface _FinalStage { @@ -239,7 +240,7 @@ public Builder from(DataPassthroughRequest other) { @java.lang.Override @JsonSetter("method") - public PathStage method(MethodEnum method) { + public PathStage method(@NotNull MethodEnum method) { this.method = method; return this; } @@ -250,7 +251,7 @@ public PathStage method(MethodEnum method) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @@ -261,7 +262,7 @@ public _FinalStage path(String path) { */ @java.lang.Override public _FinalStage normalizeResponse(Boolean normalizeResponse) { - this.normalizeResponse = Optional.of(normalizeResponse); + this.normalizeResponse = Optional.ofNullable(normalizeResponse); return this; } @@ -274,7 +275,7 @@ public _FinalStage normalizeResponse(Optional normalizeResponse) { @java.lang.Override public _FinalStage requestFormat(RequestFormatEnum requestFormat) { - this.requestFormat = Optional.of(requestFormat); + this.requestFormat = Optional.ofNullable(requestFormat); return this; } @@ -291,7 +292,7 @@ public _FinalStage requestFormat(Optional requestFormat) { */ @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -308,7 +309,7 @@ public _FinalStage headers(Optional> headers) { */ @java.lang.Override public _FinalStage multipartFormData(List multipartFormData) { - this.multipartFormData = Optional.of(multipartFormData); + this.multipartFormData = Optional.ofNullable(multipartFormData); return this; } @@ -325,7 +326,7 @@ public _FinalStage multipartFormData(Optional> m */ @java.lang.Override public _FinalStage data(String data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } @@ -342,7 +343,7 @@ public _FinalStage data(Optional data) { */ @java.lang.Override public _FinalStage baseUrlOverride(String baseUrlOverride) { - this.baseUrlOverride = Optional.of(baseUrlOverride); + this.baseUrlOverride = Optional.ofNullable(baseUrlOverride); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/DebugModeLog.java b/src/main/java/com/merge/api/resources/crm/types/DebugModeLog.java index b5be6446a..6e83e58f1 100644 --- a/src/main/java/com/merge/api/resources/crm/types/DebugModeLog.java +++ b/src/main/java/com/merge/api/resources/crm/types/DebugModeLog.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModeLog.Builder.class) public final class DebugModeLog { private final String logId; @@ -84,17 +85,17 @@ public static LogIdStage builder() { } public interface LogIdStage { - DashboardViewStage logId(String logId); + DashboardViewStage logId(@NotNull String logId); Builder from(DebugModeLog other); } public interface DashboardViewStage { - LogSummaryStage dashboardView(String dashboardView); + LogSummaryStage dashboardView(@NotNull String dashboardView); } public interface LogSummaryStage { - _FinalStage logSummary(DebugModelLogSummary logSummary); + _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary); } public interface _FinalStage { @@ -124,21 +125,21 @@ public Builder from(DebugModeLog other) { @java.lang.Override @JsonSetter("log_id") - public DashboardViewStage logId(String logId) { + public DashboardViewStage logId(@NotNull String logId) { this.logId = logId; return this; } @java.lang.Override @JsonSetter("dashboard_view") - public LogSummaryStage dashboardView(String dashboardView) { + public LogSummaryStage dashboardView(@NotNull String dashboardView) { this.dashboardView = dashboardView; return this; } @java.lang.Override @JsonSetter("log_summary") - public _FinalStage logSummary(DebugModelLogSummary logSummary) { + public _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary) { this.logSummary = logSummary; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/DebugModelLogSummary.java b/src/main/java/com/merge/api/resources/crm/types/DebugModelLogSummary.java index 4c0f0051f..fbdfe99e9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/DebugModelLogSummary.java +++ b/src/main/java/com/merge/api/resources/crm/types/DebugModelLogSummary.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModelLogSummary.Builder.class) public final class DebugModelLogSummary { private final String url; @@ -78,13 +79,13 @@ public static UrlStage builder() { } public interface UrlStage { - MethodStage url(String url); + MethodStage url(@NotNull String url); Builder from(DebugModelLogSummary other); } public interface MethodStage { - StatusCodeStage method(String method); + StatusCodeStage method(@NotNull String method); } public interface StatusCodeStage { @@ -118,14 +119,14 @@ public Builder from(DebugModelLogSummary other) { @java.lang.Override @JsonSetter("url") - public MethodStage url(String url) { + public MethodStage url(@NotNull String url) { this.url = url; return this; } @java.lang.Override @JsonSetter("method") - public StatusCodeStage method(String method) { + public StatusCodeStage method(@NotNull String method) { this.method = method; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/EmailAddress.java b/src/main/java/com/merge/api/resources/crm/types/EmailAddress.java index d8d265a04..b791acdb0 100644 --- a/src/main/java/com/merge/api/resources/crm/types/EmailAddress.java +++ b/src/main/java/com/merge/api/resources/crm/types/EmailAddress.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmailAddress.Builder.class) public final class EmailAddress { private final Optional createdAt; @@ -138,7 +138,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -149,7 +149,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -160,7 +160,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -171,7 +171,7 @@ public Builder emailAddressType(Optional emailAddressType) { } public Builder emailAddressType(String emailAddressType) { - this.emailAddressType = Optional.of(emailAddressType); + this.emailAddressType = Optional.ofNullable(emailAddressType); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/EmailAddressRequest.java b/src/main/java/com/merge/api/resources/crm/types/EmailAddressRequest.java index 9341a6a73..b6774ae34 100644 --- a/src/main/java/com/merge/api/resources/crm/types/EmailAddressRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/EmailAddressRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmailAddressRequest.Builder.class) public final class EmailAddressRequest { private final Optional emailAddress; @@ -132,7 +132,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -143,7 +143,7 @@ public Builder emailAddressType(Optional emailAddressType) { } public Builder emailAddressType(String emailAddressType) { - this.emailAddressType = Optional.of(emailAddressType); + this.emailAddressType = Optional.ofNullable(emailAddressType); return this; } @@ -154,7 +154,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -165,7 +165,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Engagement.java b/src/main/java/com/merge/api/resources/crm/types/Engagement.java index f7e417bef..9f3e6429b 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Engagement.java +++ b/src/main/java/com/merge/api/resources/crm/types/Engagement.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Engagement.Builder.class) public final class Engagement { private final Optional id; @@ -354,7 +354,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -365,7 +365,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -376,7 +376,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -387,7 +387,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -398,7 +398,7 @@ public Builder owner(Optional owner) { } public Builder owner(EngagementOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -409,7 +409,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -420,7 +420,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -431,7 +431,7 @@ public Builder direction(Optional direction) { } public Builder direction(EngagementDirection direction) { - this.direction = Optional.of(direction); + this.direction = Optional.ofNullable(direction); return this; } @@ -442,7 +442,7 @@ public Builder engagementType(Optional engagementType) } public Builder engagementType(EngagementEngagementType engagementType) { - this.engagementType = Optional.of(engagementType); + this.engagementType = Optional.ofNullable(engagementType); return this; } @@ -453,7 +453,7 @@ public Builder startTime(Optional startTime) { } public Builder startTime(OffsetDateTime startTime) { - this.startTime = Optional.of(startTime); + this.startTime = Optional.ofNullable(startTime); return this; } @@ -464,7 +464,7 @@ public Builder endTime(Optional endTime) { } public Builder endTime(OffsetDateTime endTime) { - this.endTime = Optional.of(endTime); + this.endTime = Optional.ofNullable(endTime); return this; } @@ -475,7 +475,7 @@ public Builder account(Optional account) { } public Builder account(EngagementAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -486,7 +486,7 @@ public Builder contacts(Optional>> contact } public Builder contacts(List> contacts) { - this.contacts = Optional.of(contacts); + this.contacts = Optional.ofNullable(contacts); return this; } @@ -497,7 +497,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -508,7 +508,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -519,7 +519,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -530,7 +530,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/EngagementRequest.java b/src/main/java/com/merge/api/resources/crm/types/EngagementRequest.java index 5b4730f45..dc757eaf1 100644 --- a/src/main/java/com/merge/api/resources/crm/types/EngagementRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/EngagementRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementRequest.Builder.class) public final class EngagementRequest { private final Optional owner; @@ -272,7 +272,7 @@ public Builder owner(Optional owner) { } public Builder owner(EngagementRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -283,7 +283,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -294,7 +294,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -305,7 +305,7 @@ public Builder direction(Optional direction) { } public Builder direction(EngagementRequestDirection direction) { - this.direction = Optional.of(direction); + this.direction = Optional.ofNullable(direction); return this; } @@ -316,7 +316,7 @@ public Builder engagementType(Optional engageme } public Builder engagementType(EngagementRequestEngagementType engagementType) { - this.engagementType = Optional.of(engagementType); + this.engagementType = Optional.ofNullable(engagementType); return this; } @@ -327,7 +327,7 @@ public Builder startTime(Optional startTime) { } public Builder startTime(OffsetDateTime startTime) { - this.startTime = Optional.of(startTime); + this.startTime = Optional.ofNullable(startTime); return this; } @@ -338,7 +338,7 @@ public Builder endTime(Optional endTime) { } public Builder endTime(OffsetDateTime endTime) { - this.endTime = Optional.of(endTime); + this.endTime = Optional.ofNullable(endTime); return this; } @@ -349,7 +349,7 @@ public Builder account(Optional account) { } public Builder account(EngagementRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -360,7 +360,7 @@ public Builder contacts(Optional>> } public Builder contacts(List> contacts) { - this.contacts = Optional.of(contacts); + this.contacts = Optional.ofNullable(contacts); return this; } @@ -371,7 +371,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -382,7 +382,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -393,7 +393,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/EngagementResponse.java b/src/main/java/com/merge/api/resources/crm/types/EngagementResponse.java index 320db81b4..6bb429fe5 100644 --- a/src/main/java/com/merge/api/resources/crm/types/EngagementResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/EngagementResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementResponse.Builder.class) public final class EngagementResponse { private final Engagement model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Engagement model); + _FinalStage model(@NotNull Engagement model); Builder from(EngagementResponse other); } @@ -149,14 +150,14 @@ public Builder from(EngagementResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Engagement model) { + public _FinalStage model(@NotNull Engagement model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/EngagementType.java b/src/main/java/com/merge/api/resources/crm/types/EngagementType.java index 30b320949..730b41a99 100644 --- a/src/main/java/com/merge/api/resources/crm/types/EngagementType.java +++ b/src/main/java/com/merge/api/resources/crm/types/EngagementType.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EngagementType.Builder.class) public final class EngagementType { private final Optional id; @@ -193,7 +193,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -204,7 +204,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -215,7 +215,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -226,7 +226,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -237,7 +237,7 @@ public Builder activityType(Optional activityType) { } public Builder activityType(EngagementTypeActivityType activityType) { - this.activityType = Optional.of(activityType); + this.activityType = Optional.ofNullable(activityType); return this; } @@ -248,7 +248,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -259,7 +259,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ErrorValidationProblem.java b/src/main/java/com/merge/api/resources/crm/types/ErrorValidationProblem.java index a51045930..7d6690ca6 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ErrorValidationProblem.java +++ b/src/main/java/com/merge/api/resources/crm/types/ErrorValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ErrorValidationProblem.Builder.class) public final class ErrorValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(ErrorValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(ErrorValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApi.java b/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApi.java index b937b9928..83203db1e 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApi.java +++ b/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApi.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApi.Builder.class) public final class ExternalTargetFieldApi { private final Optional name; @@ -110,7 +110,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -121,7 +121,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -132,7 +132,7 @@ public Builder isMapped(Optional isMapped) { } public Builder isMapped(String isMapped) { - this.isMapped = Optional.of(isMapped); + this.isMapped = Optional.ofNullable(isMapped); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApiResponse.java b/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApiResponse.java index 127f9cb83..7b1122965 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/ExternalTargetFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApiResponse.Builder.class) public final class ExternalTargetFieldApiResponse { private final Optional> account; @@ -200,7 +200,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -211,7 +211,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -222,7 +222,7 @@ public Builder lead(Optional> lead) { } public Builder lead(List lead) { - this.lead = Optional.of(lead); + this.lead = Optional.ofNullable(lead); return this; } @@ -233,7 +233,7 @@ public Builder note(Optional> note) { } public Builder note(List note) { - this.note = Optional.of(note); + this.note = Optional.ofNullable(note); return this; } @@ -244,7 +244,7 @@ public Builder opportunity(Optional> opportunity) { } public Builder opportunity(List opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -255,7 +255,7 @@ public Builder stage(Optional> stage) { } public Builder stage(List stage) { - this.stage = Optional.of(stage); + this.stage = Optional.ofNullable(stage); return this; } @@ -266,7 +266,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -277,7 +277,7 @@ public Builder task(Optional> task) { } public Builder task(List task) { - this.task = Optional.of(task); + this.task = Optional.ofNullable(task); return this; } @@ -288,7 +288,7 @@ public Builder engagement(Optional> engagement) { } public Builder engagement(List engagement) { - this.engagement = Optional.of(engagement); + this.engagement = Optional.ofNullable(engagement); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstance.java b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstance.java index e3ceea348..3c93bd25c 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstance.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstance.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstance.Builder.class) public final class FieldMappingApiInstance { private final Optional id; @@ -125,7 +125,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -136,7 +136,7 @@ public Builder isIntegrationWide(Optional isIntegrationWide) { } public Builder isIntegrationWide(Boolean isIntegrationWide) { - this.isIntegrationWide = Optional.of(isIntegrationWide); + this.isIntegrationWide = Optional.ofNullable(isIntegrationWide); return this; } @@ -147,7 +147,7 @@ public Builder targetField(Optional targetFi } public Builder targetField(FieldMappingApiInstanceTargetField targetField) { - this.targetField = Optional.of(targetField); + this.targetField = Optional.ofNullable(targetField); return this; } @@ -158,7 +158,7 @@ public Builder remoteField(Optional remoteFi } public Builder remoteField(FieldMappingApiInstanceRemoteField remoteField) { - this.remoteField = Optional.of(remoteField); + this.remoteField = Optional.ofNullable(remoteField); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteField.java b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteField.java index 179ab57c8..f1ddc8ff8 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteField.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteField.Builder.class) public final class FieldMappingApiInstanceRemoteField { private final Optional remoteKeyName; @@ -88,7 +89,8 @@ public static RemoteEndpointInfoStage builder() { } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); Builder from(FieldMappingApiInstanceRemoteField other); } @@ -128,14 +130,15 @@ public Builder from(FieldMappingApiInstanceRemoteField other) { @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage schema(Map schema) { - this.schema = Optional.of(schema); + this.schema = Optional.ofNullable(schema); return this; } @@ -148,7 +151,7 @@ public _FinalStage schema(Optional> schema) { @java.lang.Override public _FinalStage remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java index 8c2be28e3..08b477b22 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Builder.class) public final class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { private final Optional method; @@ -114,7 +114,7 @@ public Builder method(Optional method) { } public Builder method(String method) { - this.method = Optional.of(method); + this.method = Optional.ofNullable(method); return this; } @@ -125,7 +125,7 @@ public Builder urlPath(Optional urlPath) { } public Builder urlPath(String urlPath) { - this.urlPath = Optional.of(urlPath); + this.urlPath = Optional.ofNullable(urlPath); return this; } @@ -136,7 +136,7 @@ public Builder fieldTraversalPath(Optional> fieldTraversalPath) { } public Builder fieldTraversalPath(List fieldTraversalPath) { - this.fieldTraversalPath = Optional.of(fieldTraversalPath); + this.fieldTraversalPath = Optional.ofNullable(fieldTraversalPath); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceResponse.java b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceResponse.java index 59eaa9707..6122d53a8 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceResponse.Builder.class) public final class FieldMappingApiInstanceResponse { private final Optional> account; @@ -200,7 +200,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -211,7 +211,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -222,7 +222,7 @@ public Builder lead(Optional> lead) { } public Builder lead(List lead) { - this.lead = Optional.of(lead); + this.lead = Optional.ofNullable(lead); return this; } @@ -233,7 +233,7 @@ public Builder note(Optional> note) { } public Builder note(List note) { - this.note = Optional.of(note); + this.note = Optional.ofNullable(note); return this; } @@ -244,7 +244,7 @@ public Builder opportunity(Optional> opportunity) } public Builder opportunity(List opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -255,7 +255,7 @@ public Builder stage(Optional> stage) { } public Builder stage(List stage) { - this.stage = Optional.of(stage); + this.stage = Optional.ofNullable(stage); return this; } @@ -266,7 +266,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -277,7 +277,7 @@ public Builder task(Optional> task) { } public Builder task(List task) { - this.task = Optional.of(task); + this.task = Optional.ofNullable(task); return this; } @@ -288,7 +288,7 @@ public Builder engagement(Optional> engagement) { } public Builder engagement(List engagement) { - this.engagement = Optional.of(engagement); + this.engagement = Optional.ofNullable(engagement); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceTargetField.java b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceTargetField.java index 4365b8cf0..bbd88cbba 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceTargetField.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldMappingApiInstanceTargetField.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceTargetField.Builder.class) public final class FieldMappingApiInstanceTargetField { private final String name; @@ -82,13 +83,13 @@ public static NameStage builder() { } public interface NameStage { - DescriptionStage name(String name); + DescriptionStage name(@NotNull String name); Builder from(FieldMappingApiInstanceTargetField other); } public interface DescriptionStage { - IsOrganizationWideStage description(String description); + IsOrganizationWideStage description(@NotNull String description); } public interface IsOrganizationWideStage { @@ -122,14 +123,14 @@ public Builder from(FieldMappingApiInstanceTargetField other) { @java.lang.Override @JsonSetter("name") - public DescriptionStage name(String name) { + public DescriptionStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("description") - public IsOrganizationWideStage description(String description) { + public IsOrganizationWideStage description(@NotNull String description) { this.description = description; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldMappingInstanceResponse.java b/src/main/java/com/merge/api/resources/crm/types/FieldMappingInstanceResponse.java index 4a560ff16..2c22ebce2 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldMappingInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldMappingInstanceResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingInstanceResponse.Builder.class) public final class FieldMappingInstanceResponse { private final FieldMappingApiInstance model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FieldMappingApiInstance model); + _FinalStage model(@NotNull FieldMappingApiInstance model); Builder from(FieldMappingInstanceResponse other); } @@ -149,14 +150,14 @@ public Builder from(FieldMappingInstanceResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FieldMappingApiInstance model) { + public _FinalStage model(@NotNull FieldMappingApiInstance model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializer.java b/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializer.java index b22e4d9cb..6e7919881 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializer.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializer.Builder.class) public final class FieldPermissionDeserializer { private final Optional> enabledFields; @@ -100,7 +100,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -111,7 +111,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializerRequest.java index c6d7c43bb..bee65205a 100644 --- a/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/FieldPermissionDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializerRequest.Builder.class) public final class FieldPermissionDeserializerRequest { private final Optional> enabledFields; @@ -101,7 +101,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -112,7 +112,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/IgnoreCommonModelRequest.java b/src/main/java/com/merge/api/resources/crm/types/IgnoreCommonModelRequest.java index f4ac50333..95b3b6835 100644 --- a/src/main/java/com/merge/api/resources/crm/types/IgnoreCommonModelRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/IgnoreCommonModelRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IgnoreCommonModelRequest.Builder.class) public final class IgnoreCommonModelRequest { private final ReasonEnum reason; @@ -73,7 +74,7 @@ public static ReasonStage builder() { } public interface ReasonStage { - _FinalStage reason(ReasonEnum reason); + _FinalStage reason(@NotNull ReasonEnum reason); Builder from(IgnoreCommonModelRequest other); } @@ -106,14 +107,14 @@ public Builder from(IgnoreCommonModelRequest other) { @java.lang.Override @JsonSetter("reason") - public _FinalStage reason(ReasonEnum reason) { + public _FinalStage reason(@NotNull ReasonEnum reason) { this.reason = reason; return this; } @java.lang.Override public _FinalStage message(String message) { - this.message = Optional.of(message); + this.message = Optional.ofNullable(message); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializer.java b/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializer.java index ffb28a4f6..3fb1f876f 100644 --- a/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializer.java +++ b/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializer.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializer.Builder.class) public final class IndividualCommonModelScopeDeserializer { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializer other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializer other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializer fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional fieldP @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.java index 3faa3eb1d..f67fec9f7 100644 --- a/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/IndividualCommonModelScopeDeserializerRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializerRequest.Builder.class) public final class IndividualCommonModelScopeDeserializerRequest { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializerRequest other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializerRequest other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializerRequest fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Issue.java b/src/main/java/com/merge/api/resources/crm/types/Issue.java index d70bce431..16b5c2b67 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Issue.java +++ b/src/main/java/com/merge/api/resources/crm/types/Issue.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Issue.Builder.class) public final class Issue { private final Optional id; @@ -154,7 +155,7 @@ public static ErrorDescriptionStage builder() { } public interface ErrorDescriptionStage { - _FinalStage errorDescription(String errorDescription); + _FinalStage errorDescription(@NotNull String errorDescription); Builder from(Issue other); } @@ -229,14 +230,14 @@ public Builder from(Issue other) { @java.lang.Override @JsonSetter("error_description") - public _FinalStage errorDescription(String errorDescription) { + public _FinalStage errorDescription(@NotNull String errorDescription) { this.errorDescription = errorDescription; return this; } @java.lang.Override public _FinalStage errorDetails(List errorDetails) { - this.errorDetails = Optional.of(errorDetails); + this.errorDetails = Optional.ofNullable(errorDetails); return this; } @@ -249,7 +250,7 @@ public _FinalStage errorDetails(Optional> errorDetails) { @java.lang.Override public _FinalStage isMuted(Boolean isMuted) { - this.isMuted = Optional.of(isMuted); + this.isMuted = Optional.ofNullable(isMuted); return this; } @@ -262,7 +263,7 @@ public _FinalStage isMuted(Optional isMuted) { @java.lang.Override public _FinalStage lastIncidentTime(OffsetDateTime lastIncidentTime) { - this.lastIncidentTime = Optional.of(lastIncidentTime); + this.lastIncidentTime = Optional.ofNullable(lastIncidentTime); return this; } @@ -275,7 +276,7 @@ public _FinalStage lastIncidentTime(Optional lastIncidentTime) { @java.lang.Override public _FinalStage firstIncidentTime(OffsetDateTime firstIncidentTime) { - this.firstIncidentTime = Optional.of(firstIncidentTime); + this.firstIncidentTime = Optional.ofNullable(firstIncidentTime); return this; } @@ -288,7 +289,7 @@ public _FinalStage firstIncidentTime(Optional firstIncidentTime) @java.lang.Override public _FinalStage endUser(Map endUser) { - this.endUser = Optional.of(endUser); + this.endUser = Optional.ofNullable(endUser); return this; } @@ -309,7 +310,7 @@ public _FinalStage endUser(Optional> endUser) { */ @java.lang.Override public _FinalStage status(IssueStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -322,7 +323,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ItemSchema.java b/src/main/java/com/merge/api/resources/crm/types/ItemSchema.java index 0076e0b94..76817ca34 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ItemSchema.java +++ b/src/main/java/com/merge/api/resources/crm/types/ItemSchema.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ItemSchema.Builder.class) public final class ItemSchema { private final Optional itemType; @@ -113,7 +113,7 @@ public Builder itemType(Optional itemType) { } public Builder itemType(ItemTypeEnum itemType) { - this.itemType = Optional.of(itemType); + this.itemType = Optional.ofNullable(itemType); return this; } @@ -124,7 +124,7 @@ public Builder itemFormat(Optional itemFormat) { } public Builder itemFormat(ItemFormatEnum itemFormat) { - this.itemFormat = Optional.of(itemFormat); + this.itemFormat = Optional.ofNullable(itemFormat); return this; } @@ -135,7 +135,7 @@ public Builder itemChoices(Optional> itemChoices) { } public Builder itemChoices(List itemChoices) { - this.itemChoices = Optional.of(itemChoices); + this.itemChoices = Optional.ofNullable(itemChoices); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Lead.java b/src/main/java/com/merge/api/resources/crm/types/Lead.java index c46791603..acf832812 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Lead.java +++ b/src/main/java/com/merge/api/resources/crm/types/Lead.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Lead.Builder.class) public final class Lead { private final Optional id; @@ -429,7 +429,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -440,7 +440,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -451,7 +451,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -462,7 +462,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -473,7 +473,7 @@ public Builder owner(Optional owner) { } public Builder owner(LeadOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -484,7 +484,7 @@ public Builder leadSource(Optional leadSource) { } public Builder leadSource(String leadSource) { - this.leadSource = Optional.of(leadSource); + this.leadSource = Optional.ofNullable(leadSource); return this; } @@ -495,7 +495,7 @@ public Builder title(Optional title) { } public Builder title(String title) { - this.title = Optional.of(title); + this.title = Optional.ofNullable(title); return this; } @@ -506,7 +506,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -517,7 +517,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -528,7 +528,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -539,7 +539,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List
addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -550,7 +550,7 @@ public Builder emailAddresses(Optional> emailAddresses) { } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -561,7 +561,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -572,7 +572,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -583,7 +583,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -594,7 +594,7 @@ public Builder convertedDate(Optional convertedDate) { } public Builder convertedDate(OffsetDateTime convertedDate) { - this.convertedDate = Optional.of(convertedDate); + this.convertedDate = Optional.ofNullable(convertedDate); return this; } @@ -605,7 +605,7 @@ public Builder convertedContact(Optional convertedContact) } public Builder convertedContact(LeadConvertedContact convertedContact) { - this.convertedContact = Optional.of(convertedContact); + this.convertedContact = Optional.ofNullable(convertedContact); return this; } @@ -616,7 +616,7 @@ public Builder convertedAccount(Optional convertedAccount) } public Builder convertedAccount(LeadConvertedAccount convertedAccount) { - this.convertedAccount = Optional.of(convertedAccount); + this.convertedAccount = Optional.ofNullable(convertedAccount); return this; } @@ -627,7 +627,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -638,7 +638,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -649,7 +649,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -660,7 +660,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/LeadRequest.java b/src/main/java/com/merge/api/resources/crm/types/LeadRequest.java index 5da8306d2..7ee5460b6 100644 --- a/src/main/java/com/merge/api/resources/crm/types/LeadRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/LeadRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LeadRequest.Builder.class) public final class LeadRequest { private final Optional owner; @@ -313,7 +313,7 @@ public Builder owner(Optional owner) { } public Builder owner(LeadRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -324,7 +324,7 @@ public Builder leadSource(Optional leadSource) { } public Builder leadSource(String leadSource) { - this.leadSource = Optional.of(leadSource); + this.leadSource = Optional.ofNullable(leadSource); return this; } @@ -335,7 +335,7 @@ public Builder title(Optional title) { } public Builder title(String title) { - this.title = Optional.of(title); + this.title = Optional.ofNullable(title); return this; } @@ -346,7 +346,7 @@ public Builder company(Optional company) { } public Builder company(String company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -357,7 +357,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -368,7 +368,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -379,7 +379,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -390,7 +390,7 @@ public Builder emailAddresses(Optional> emailAddresses } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -401,7 +401,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -412,7 +412,7 @@ public Builder convertedDate(Optional convertedDate) { } public Builder convertedDate(OffsetDateTime convertedDate) { - this.convertedDate = Optional.of(convertedDate); + this.convertedDate = Optional.ofNullable(convertedDate); return this; } @@ -423,7 +423,7 @@ public Builder convertedContact(Optional convertedC } public Builder convertedContact(LeadRequestConvertedContact convertedContact) { - this.convertedContact = Optional.of(convertedContact); + this.convertedContact = Optional.ofNullable(convertedContact); return this; } @@ -434,7 +434,7 @@ public Builder convertedAccount(Optional convertedA } public Builder convertedAccount(LeadRequestConvertedAccount convertedAccount) { - this.convertedAccount = Optional.of(convertedAccount); + this.convertedAccount = Optional.ofNullable(convertedAccount); return this; } @@ -445,7 +445,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -456,7 +456,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -467,7 +467,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/LeadResponse.java b/src/main/java/com/merge/api/resources/crm/types/LeadResponse.java index 023e1ffdc..681f5a9c4 100644 --- a/src/main/java/com/merge/api/resources/crm/types/LeadResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/LeadResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LeadResponse.Builder.class) public final class LeadResponse { private final Lead model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Lead model); + _FinalStage model(@NotNull Lead model); Builder from(LeadResponse other); } @@ -149,14 +150,14 @@ public Builder from(LeadResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Lead model) { + public _FinalStage model(@NotNull Lead model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/LinkToken.java b/src/main/java/com/merge/api/resources/crm/types/LinkToken.java index b30c31a38..bf7d72a74 100644 --- a/src/main/java/com/merge/api/resources/crm/types/LinkToken.java +++ b/src/main/java/com/merge/api/resources/crm/types/LinkToken.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkToken.Builder.class) public final class LinkToken { private final String linkToken; @@ -86,7 +87,7 @@ public static LinkTokenStage builder() { } public interface LinkTokenStage { - _FinalStage linkToken(String linkToken); + _FinalStage linkToken(@NotNull String linkToken); Builder from(LinkToken other); } @@ -126,14 +127,14 @@ public Builder from(LinkToken other) { @java.lang.Override @JsonSetter("link_token") - public _FinalStage linkToken(String linkToken) { + public _FinalStage linkToken(@NotNull String linkToken) { this.linkToken = linkToken; return this; } @java.lang.Override public _FinalStage magicLinkUrl(String magicLinkUrl) { - this.magicLinkUrl = Optional.of(magicLinkUrl); + this.magicLinkUrl = Optional.ofNullable(magicLinkUrl); return this; } @@ -146,7 +147,7 @@ public _FinalStage magicLinkUrl(Optional magicLinkUrl) { @java.lang.Override public _FinalStage integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/LinkedAccountStatus.java b/src/main/java/com/merge/api/resources/crm/types/LinkedAccountStatus.java index c0312f23f..6e71c3ee5 100644 --- a/src/main/java/com/merge/api/resources/crm/types/LinkedAccountStatus.java +++ b/src/main/java/com/merge/api/resources/crm/types/LinkedAccountStatus.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountStatus.Builder.class) public final class LinkedAccountStatus { private final String linkedAccountStatus; @@ -71,7 +72,7 @@ public static LinkedAccountStatusStage builder() { } public interface LinkedAccountStatusStage { - CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus); + CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus); Builder from(LinkedAccountStatus other); } @@ -104,7 +105,7 @@ public Builder from(LinkedAccountStatus other) { @java.lang.Override @JsonSetter("linked_account_status") - public CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus) { + public CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus) { this.linkedAccountStatus = linkedAccountStatus; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/MetaResponse.java b/src/main/java/com/merge/api/resources/crm/types/MetaResponse.java index f696a9782..081777027 100644 --- a/src/main/java/com/merge/api/resources/crm/types/MetaResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/MetaResponse.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MetaResponse.Builder.class) public final class MetaResponse { private final Map requestSchema; @@ -184,7 +184,7 @@ public _FinalStage hasRequiredLinkedAccountParams(boolean hasRequiredLinkedAccou @java.lang.Override public _FinalStage status(LinkedAccountStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -197,7 +197,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage remoteFieldClasses(Map remoteFieldClasses) { - this.remoteFieldClasses = Optional.of(remoteFieldClasses); + this.remoteFieldClasses = Optional.ofNullable(remoteFieldClasses); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ModelOperation.java b/src/main/java/com/merge/api/resources/crm/types/ModelOperation.java index ab84faa72..851dc8c6f 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ModelOperation.java +++ b/src/main/java/com/merge/api/resources/crm/types/ModelOperation.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelOperation.Builder.class) public final class ModelOperation { private final String modelName; @@ -98,7 +99,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(ModelOperation other); } @@ -151,7 +152,7 @@ public Builder from(ModelOperation other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializer.java b/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializer.java index ce260e233..1861eb478 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializer.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializer.Builder.class) public final class ModelPermissionDeserializer { private final Optional isEnabled; @@ -84,7 +84,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializerRequest.java index 8077286df..54c481bc9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/ModelPermissionDeserializerRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializerRequest.Builder.class) public final class ModelPermissionDeserializerRequest { private final Optional isEnabled; @@ -85,7 +85,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/resources/crm/types/MultipartFormFieldRequest.java index c9038890e..185fc16ff 100644 --- a/src/main/java/com/merge/api/resources/crm/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/MultipartFormFieldRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MultipartFormFieldRequest.Builder.class) public final class MultipartFormFieldRequest { private final String name; @@ -126,13 +127,13 @@ public static NameStage builder() { } public interface NameStage { - DataStage name(String name); + DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { - _FinalStage data(String data); + _FinalStage data(@NotNull String data); } public interface _FinalStage { @@ -184,7 +185,7 @@ public Builder from(MultipartFormFieldRequest other) { */ @java.lang.Override @JsonSetter("name") - public DataStage name(String name) { + public DataStage name(@NotNull String name) { this.name = name; return this; } @@ -195,7 +196,7 @@ public DataStage name(String name) { */ @java.lang.Override @JsonSetter("data") - public _FinalStage data(String data) { + public _FinalStage data(@NotNull String data) { this.data = data; return this; } @@ -206,7 +207,7 @@ public _FinalStage data(String data) { */ @java.lang.Override public _FinalStage contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -223,7 +224,7 @@ public _FinalStage contentType(Optional contentType) { */ @java.lang.Override public _FinalStage fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -245,7 +246,7 @@ public _FinalStage fileName(Optional fileName) { */ @java.lang.Override public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { - this.encoding = Optional.of(encoding); + this.encoding = Optional.ofNullable(encoding); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Note.java b/src/main/java/com/merge/api/resources/crm/types/Note.java index 3012f5c3f..a9d6d2761 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Note.java +++ b/src/main/java/com/merge/api/resources/crm/types/Note.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Note.Builder.class) public final class Note { private final Optional id; @@ -319,7 +319,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -330,7 +330,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -341,7 +341,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -352,7 +352,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -363,7 +363,7 @@ public Builder owner(Optional owner) { } public Builder owner(NoteOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -374,7 +374,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -385,7 +385,7 @@ public Builder contact(Optional contact) { } public Builder contact(NoteContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -396,7 +396,7 @@ public Builder account(Optional account) { } public Builder account(NoteAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -407,7 +407,7 @@ public Builder opportunity(Optional opportunity) { } public Builder opportunity(NoteOpportunity opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -418,7 +418,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -429,7 +429,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -440,7 +440,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -451,7 +451,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -462,7 +462,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -473,7 +473,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/NoteRequest.java b/src/main/java/com/merge/api/resources/crm/types/NoteRequest.java index 0105e01de..177bdeae4 100644 --- a/src/main/java/com/merge/api/resources/crm/types/NoteRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/NoteRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = NoteRequest.Builder.class) public final class NoteRequest { private final Optional owner; @@ -202,7 +202,7 @@ public Builder owner(Optional owner) { } public Builder owner(NoteRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -213,7 +213,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -224,7 +224,7 @@ public Builder contact(Optional contact) { } public Builder contact(NoteRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -235,7 +235,7 @@ public Builder account(Optional account) { } public Builder account(NoteRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -246,7 +246,7 @@ public Builder opportunity(Optional opportunity) { } public Builder opportunity(NoteRequestOpportunity opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -257,7 +257,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -268,7 +268,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -279,7 +279,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/NoteResponse.java b/src/main/java/com/merge/api/resources/crm/types/NoteResponse.java index 626bdf0d0..76bb73763 100644 --- a/src/main/java/com/merge/api/resources/crm/types/NoteResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/NoteResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = NoteResponse.Builder.class) public final class NoteResponse { private final Note model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Note model); + _FinalStage model(@NotNull Note model); Builder from(NoteResponse other); } @@ -149,14 +150,14 @@ public Builder from(NoteResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Note model) { + public _FinalStage model(@NotNull Note model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ObjectClassDescriptionRequest.java b/src/main/java/com/merge/api/resources/crm/types/ObjectClassDescriptionRequest.java index 07148de5a..93a098b79 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ObjectClassDescriptionRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/ObjectClassDescriptionRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ObjectClassDescriptionRequest.Builder.class) public final class ObjectClassDescriptionRequest { private final String id; @@ -71,13 +72,13 @@ public static IdStage builder() { } public interface IdStage { - OriginTypeStage id(String id); + OriginTypeStage id(@NotNull String id); Builder from(ObjectClassDescriptionRequest other); } public interface OriginTypeStage { - _FinalStage originType(OriginTypeEnum originType); + _FinalStage originType(@NotNull OriginTypeEnum originType); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(ObjectClassDescriptionRequest other) { @java.lang.Override @JsonSetter("id") - public OriginTypeStage id(String id) { + public OriginTypeStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override @JsonSetter("origin_type") - public _FinalStage originType(OriginTypeEnum originType) { + public _FinalStage originType(@NotNull OriginTypeEnum originType) { this.originType = originType; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Opportunity.java b/src/main/java/com/merge/api/resources/crm/types/Opportunity.java index ac88bdbb9..71a6e2809 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Opportunity.java +++ b/src/main/java/com/merge/api/resources/crm/types/Opportunity.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Opportunity.Builder.class) public final class Opportunity { private final Optional id; @@ -375,7 +375,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -386,7 +386,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -397,7 +397,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -408,7 +408,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -419,7 +419,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -430,7 +430,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -441,7 +441,7 @@ public Builder amount(Optional amount) { } public Builder amount(Integer amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -452,7 +452,7 @@ public Builder owner(Optional owner) { } public Builder owner(OpportunityOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -463,7 +463,7 @@ public Builder account(Optional account) { } public Builder account(OpportunityAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -474,7 +474,7 @@ public Builder stage(Optional stage) { } public Builder stage(OpportunityStage stage) { - this.stage = Optional.of(stage); + this.stage = Optional.ofNullable(stage); return this; } @@ -485,7 +485,7 @@ public Builder status(Optional status) { } public Builder status(OpportunityStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -496,7 +496,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -507,7 +507,7 @@ public Builder closeDate(Optional closeDate) { } public Builder closeDate(OffsetDateTime closeDate) { - this.closeDate = Optional.of(closeDate); + this.closeDate = Optional.ofNullable(closeDate); return this; } @@ -518,7 +518,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -529,7 +529,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -540,7 +540,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -551,7 +551,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -562,7 +562,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/OpportunityRequest.java b/src/main/java/com/merge/api/resources/crm/types/OpportunityRequest.java index 09c5fd4bf..c2bced6f1 100644 --- a/src/main/java/com/merge/api/resources/crm/types/OpportunityRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/OpportunityRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OpportunityRequest.Builder.class) public final class OpportunityRequest { private final Optional name; @@ -276,7 +276,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -287,7 +287,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -298,7 +298,7 @@ public Builder amount(Optional amount) { } public Builder amount(Integer amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -309,7 +309,7 @@ public Builder owner(Optional owner) { } public Builder owner(OpportunityRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -320,7 +320,7 @@ public Builder account(Optional account) { } public Builder account(OpportunityRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -331,7 +331,7 @@ public Builder stage(Optional stage) { } public Builder stage(OpportunityRequestStage stage) { - this.stage = Optional.of(stage); + this.stage = Optional.ofNullable(stage); return this; } @@ -342,7 +342,7 @@ public Builder status(Optional status) { } public Builder status(OpportunityRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -353,7 +353,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -364,7 +364,7 @@ public Builder closeDate(Optional closeDate) { } public Builder closeDate(OffsetDateTime closeDate) { - this.closeDate = Optional.of(closeDate); + this.closeDate = Optional.ofNullable(closeDate); return this; } @@ -375,7 +375,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -386,7 +386,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -397,7 +397,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/OpportunityResponse.java b/src/main/java/com/merge/api/resources/crm/types/OpportunityResponse.java index 3deef6881..88c2493b4 100644 --- a/src/main/java/com/merge/api/resources/crm/types/OpportunityResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/OpportunityResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = OpportunityResponse.Builder.class) public final class OpportunityResponse { private final Opportunity model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Opportunity model); + _FinalStage model(@NotNull Opportunity model); Builder from(OpportunityResponse other); } @@ -149,14 +150,14 @@ public Builder from(OpportunityResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Opportunity model) { + public _FinalStage model(@NotNull Opportunity model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.java index ae33eb14e..c9d8873d9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountDetailsAndActionsList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountDetailsAndActionsList.Builder.class) public final class PaginatedAccountDetailsAndActionsList { private final Optional next; @@ -112,7 +112,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -123,7 +123,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -134,7 +134,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountList.java index c90a8c80a..838025575 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedAccountList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountList.Builder.class) public final class PaginatedAccountList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationList.java index 6d5f54313..bef9d5b6f 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAssociationList.Builder.class) public final class PaginatedAssociationList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationTypeList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationTypeList.java index f2386cf5f..d1b0a48ca 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationTypeList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedAssociationTypeList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAssociationTypeList.Builder.class) public final class PaginatedAssociationTypeList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedAuditLogEventList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedAuditLogEventList.java index 9ad002746..1ae686ff2 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedAuditLogEventList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedAuditLogEventList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAuditLogEventList.Builder.class) public final class PaginatedAuditLogEventList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedContactList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedContactList.java index 129c6fbfb..17e97a5eb 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedContactList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedContactList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedContactList.Builder.class) public final class PaginatedContactList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectClassList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectClassList.java index 7fc0dcb6e..034c3de3f 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectClassList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectClassList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCustomObjectClassList.Builder.class) public final class PaginatedCustomObjectClassList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectList.java index 5e8209c27..7a37a4ffd 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedCustomObjectList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCustomObjectList.Builder.class) public final class PaginatedCustomObjectList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementList.java index 7850f566b..cee531b62 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEngagementList.Builder.class) public final class PaginatedEngagementList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementTypeList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementTypeList.java index ed052381e..15face72d 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementTypeList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedEngagementTypeList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEngagementTypeList.Builder.class) public final class PaginatedEngagementTypeList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedIssueList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedIssueList.java index 6f869d2a8..f81be200b 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedIssueList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedIssueList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedIssueList.Builder.class) public final class PaginatedIssueList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedLeadList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedLeadList.java index c4b927602..69446d700 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedLeadList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedLeadList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedLeadList.Builder.class) public final class PaginatedLeadList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedNoteList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedNoteList.java index df98ea218..dfcecc85c 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedNoteList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedNoteList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedNoteList.Builder.class) public final class PaginatedNoteList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedOpportunityList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedOpportunityList.java index 8a03933cf..8a077aacd 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedOpportunityList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedOpportunityList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedOpportunityList.Builder.class) public final class PaginatedOpportunityList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedRemoteFieldClassList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedRemoteFieldClassList.java index 6d3f03a17..7debd7043 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedRemoteFieldClassList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedRemoteFieldClassList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedRemoteFieldClassList.Builder.class) public final class PaginatedRemoteFieldClassList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedStageList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedStageList.java index 6af184816..f788255a5 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedStageList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedStageList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedStageList.Builder.class) public final class PaginatedStageList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedSyncStatusList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedSyncStatusList.java index 79bf13275..c9bb4851b 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedSyncStatusList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedSyncStatusList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedSyncStatusList.Builder.class) public final class PaginatedSyncStatusList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedTaskList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedTaskList.java index e01874877..8133b2283 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedTaskList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedTaskList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTaskList.Builder.class) public final class PaginatedTaskList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PaginatedUserList.java b/src/main/java/com/merge/api/resources/crm/types/PaginatedUserList.java index d15766fc9..70f022774 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PaginatedUserList.java +++ b/src/main/java/com/merge/api/resources/crm/types/PaginatedUserList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedUserList.Builder.class) public final class PaginatedUserList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PatchedAccountRequest.java b/src/main/java/com/merge/api/resources/crm/types/PatchedAccountRequest.java index 87ae88363..a6e4b1ab5 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PatchedAccountRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/PatchedAccountRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedAccountRequest.Builder.class) public final class PatchedAccountRequest { private final Optional owner; @@ -251,7 +251,7 @@ public Builder owner(Optional owner) { } public Builder owner(String owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -262,7 +262,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -273,7 +273,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -284,7 +284,7 @@ public Builder industry(Optional industry) { } public Builder industry(String industry) { - this.industry = Optional.of(industry); + this.industry = Optional.ofNullable(industry); return this; } @@ -295,7 +295,7 @@ public Builder website(Optional website) { } public Builder website(String website) { - this.website = Optional.of(website); + this.website = Optional.ofNullable(website); return this; } @@ -306,7 +306,7 @@ public Builder numberOfEmployees(Optional numberOfEmployees) { } public Builder numberOfEmployees(Integer numberOfEmployees) { - this.numberOfEmployees = Optional.of(numberOfEmployees); + this.numberOfEmployees = Optional.ofNullable(numberOfEmployees); return this; } @@ -317,7 +317,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -328,7 +328,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -339,7 +339,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -350,7 +350,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -361,7 +361,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PatchedContactRequest.java b/src/main/java/com/merge/api/resources/crm/types/PatchedContactRequest.java index 3373d0559..f5187d156 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PatchedContactRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/PatchedContactRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedContactRequest.Builder.class) public final class PatchedContactRequest { private final Optional firstName; @@ -245,7 +245,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -256,7 +256,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -267,7 +267,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -278,7 +278,7 @@ public Builder owner(Optional owner) { } public Builder owner(PatchedContactRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -289,7 +289,7 @@ public Builder addresses(Optional> addresses) { } public Builder addresses(List addresses) { - this.addresses = Optional.of(addresses); + this.addresses = Optional.ofNullable(addresses); return this; } @@ -300,7 +300,7 @@ public Builder emailAddresses(Optional> emailAddresses } public Builder emailAddresses(List emailAddresses) { - this.emailAddresses = Optional.of(emailAddresses); + this.emailAddresses = Optional.ofNullable(emailAddresses); return this; } @@ -311,7 +311,7 @@ public Builder phoneNumbers(Optional> phoneNumbers) { } public Builder phoneNumbers(List phoneNumbers) { - this.phoneNumbers = Optional.of(phoneNumbers); + this.phoneNumbers = Optional.ofNullable(phoneNumbers); return this; } @@ -322,7 +322,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -333,7 +333,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -344,7 +344,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -355,7 +355,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PatchedEngagementRequest.java b/src/main/java/com/merge/api/resources/crm/types/PatchedEngagementRequest.java index 692771cea..e989fb0a7 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PatchedEngagementRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/PatchedEngagementRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEngagementRequest.Builder.class) public final class PatchedEngagementRequest { private final Optional owner; @@ -272,7 +272,7 @@ public Builder owner(Optional owner) { } public Builder owner(String owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -283,7 +283,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -294,7 +294,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -305,7 +305,7 @@ public Builder direction(Optional direction) } public Builder direction(PatchedEngagementRequestDirection direction) { - this.direction = Optional.of(direction); + this.direction = Optional.ofNullable(direction); return this; } @@ -316,7 +316,7 @@ public Builder engagementType(Optional engagementType) { } public Builder engagementType(String engagementType) { - this.engagementType = Optional.of(engagementType); + this.engagementType = Optional.ofNullable(engagementType); return this; } @@ -327,7 +327,7 @@ public Builder startTime(Optional startTime) { } public Builder startTime(OffsetDateTime startTime) { - this.startTime = Optional.of(startTime); + this.startTime = Optional.ofNullable(startTime); return this; } @@ -338,7 +338,7 @@ public Builder endTime(Optional endTime) { } public Builder endTime(OffsetDateTime endTime) { - this.endTime = Optional.of(endTime); + this.endTime = Optional.ofNullable(endTime); return this; } @@ -349,7 +349,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -360,7 +360,7 @@ public Builder contacts(Optional>> contacts) { } public Builder contacts(List> contacts) { - this.contacts = Optional.of(contacts); + this.contacts = Optional.ofNullable(contacts); return this; } @@ -371,7 +371,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -382,7 +382,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -393,7 +393,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PatchedOpportunityRequest.java b/src/main/java/com/merge/api/resources/crm/types/PatchedOpportunityRequest.java index 5bc722131..5a03c865e 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PatchedOpportunityRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/PatchedOpportunityRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedOpportunityRequest.Builder.class) public final class PatchedOpportunityRequest { private final Optional name; @@ -276,7 +276,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -287,7 +287,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -298,7 +298,7 @@ public Builder amount(Optional amount) { } public Builder amount(Integer amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -309,7 +309,7 @@ public Builder owner(Optional owner) { } public Builder owner(String owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -320,7 +320,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -331,7 +331,7 @@ public Builder stage(Optional stage) { } public Builder stage(String stage) { - this.stage = Optional.of(stage); + this.stage = Optional.ofNullable(stage); return this; } @@ -342,7 +342,7 @@ public Builder status(Optional status) { } public Builder status(PatchedOpportunityRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -353,7 +353,7 @@ public Builder lastActivityAt(Optional lastActivityAt) { } public Builder lastActivityAt(OffsetDateTime lastActivityAt) { - this.lastActivityAt = Optional.of(lastActivityAt); + this.lastActivityAt = Optional.ofNullable(lastActivityAt); return this; } @@ -364,7 +364,7 @@ public Builder closeDate(Optional closeDate) { } public Builder closeDate(OffsetDateTime closeDate) { - this.closeDate = Optional.of(closeDate); + this.closeDate = Optional.ofNullable(closeDate); return this; } @@ -375,7 +375,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -386,7 +386,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -397,7 +397,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PatchedTaskRequest.java b/src/main/java/com/merge/api/resources/crm/types/PatchedTaskRequest.java index cfc656dba..c7f75e730 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PatchedTaskRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/PatchedTaskRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedTaskRequest.Builder.class) public final class PatchedTaskRequest { private final Optional subject; @@ -258,7 +258,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -269,7 +269,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -280,7 +280,7 @@ public Builder owner(Optional owner) { } public Builder owner(String owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -291,7 +291,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -302,7 +302,7 @@ public Builder opportunity(Optional opportunity) { } public Builder opportunity(String opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -313,7 +313,7 @@ public Builder completedDate(Optional completedDate) { } public Builder completedDate(OffsetDateTime completedDate) { - this.completedDate = Optional.of(completedDate); + this.completedDate = Optional.ofNullable(completedDate); return this; } @@ -324,7 +324,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -335,7 +335,7 @@ public Builder status(Optional status) { } public Builder status(PatchedTaskRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -346,7 +346,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -357,7 +357,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -368,7 +368,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PhoneNumber.java b/src/main/java/com/merge/api/resources/crm/types/PhoneNumber.java index c2821b189..f8a745885 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PhoneNumber.java +++ b/src/main/java/com/merge/api/resources/crm/types/PhoneNumber.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PhoneNumber.Builder.class) public final class PhoneNumber { private final Optional createdAt; @@ -138,7 +138,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -149,7 +149,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -160,7 +160,7 @@ public Builder phoneNumber(Optional phoneNumber) { } public Builder phoneNumber(String phoneNumber) { - this.phoneNumber = Optional.of(phoneNumber); + this.phoneNumber = Optional.ofNullable(phoneNumber); return this; } @@ -171,7 +171,7 @@ public Builder phoneNumberType(Optional phoneNumberType) { } public Builder phoneNumberType(String phoneNumberType) { - this.phoneNumberType = Optional.of(phoneNumberType); + this.phoneNumberType = Optional.ofNullable(phoneNumberType); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/PhoneNumberRequest.java b/src/main/java/com/merge/api/resources/crm/types/PhoneNumberRequest.java index df67fa730..d13137329 100644 --- a/src/main/java/com/merge/api/resources/crm/types/PhoneNumberRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/PhoneNumberRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PhoneNumberRequest.Builder.class) public final class PhoneNumberRequest { private final Optional phoneNumber; @@ -132,7 +132,7 @@ public Builder phoneNumber(Optional phoneNumber) { } public Builder phoneNumber(String phoneNumber) { - this.phoneNumber = Optional.of(phoneNumber); + this.phoneNumber = Optional.ofNullable(phoneNumber); return this; } @@ -143,7 +143,7 @@ public Builder phoneNumberType(Optional phoneNumberType) { } public Builder phoneNumberType(String phoneNumberType) { - this.phoneNumberType = Optional.of(phoneNumberType); + this.phoneNumberType = Optional.ofNullable(phoneNumberType); return this; } @@ -154,7 +154,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -165,7 +165,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteData.java b/src/main/java/com/merge/api/resources/crm/types/RemoteData.java index 8657b2980..24e2d15e2 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteData.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteData.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteData.Builder.class) public final class RemoteData { private final String path; @@ -76,7 +77,7 @@ public static PathStage builder() { } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); Builder from(RemoteData other); } @@ -113,14 +114,14 @@ public Builder from(RemoteData other) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @java.lang.Override public _FinalStage data(JsonNode data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/crm/types/RemoteEndpointInfo.java index aff6a9756..93e435e7d 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteEndpointInfo.java @@ -18,8 +18,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteEndpointInfo.Builder.class) public final class RemoteEndpointInfo { private final String method; @@ -88,13 +89,13 @@ public static MethodStage builder() { } public interface MethodStage { - UrlPathStage method(String method); + UrlPathStage method(@NotNull String method); Builder from(RemoteEndpointInfo other); } public interface UrlPathStage { - _FinalStage urlPath(String urlPath); + _FinalStage urlPath(@NotNull String urlPath); } public interface _FinalStage { @@ -130,14 +131,14 @@ public Builder from(RemoteEndpointInfo other) { @java.lang.Override @JsonSetter("method") - public UrlPathStage method(String method) { + public UrlPathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("url_path") - public _FinalStage urlPath(String urlPath) { + public _FinalStage urlPath(@NotNull String urlPath) { this.urlPath = urlPath; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteField.java b/src/main/java/com/merge/api/resources/crm/types/RemoteField.java index 044d71745..6d33e45c1 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteField.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteField.Builder.class) public final class RemoteField { private final RemoteFieldRemoteFieldClass remoteFieldClass; @@ -76,7 +77,7 @@ public static RemoteFieldClassStage builder() { } public interface RemoteFieldClassStage { - _FinalStage remoteFieldClass(RemoteFieldRemoteFieldClass remoteFieldClass); + _FinalStage remoteFieldClass(@NotNull RemoteFieldRemoteFieldClass remoteFieldClass); Builder from(RemoteField other); } @@ -109,14 +110,14 @@ public Builder from(RemoteField other) { @java.lang.Override @JsonSetter("remote_field_class") - public _FinalStage remoteFieldClass(RemoteFieldRemoteFieldClass remoteFieldClass) { + public _FinalStage remoteFieldClass(@NotNull RemoteFieldRemoteFieldClass remoteFieldClass) { this.remoteFieldClass = remoteFieldClass; return this; } @java.lang.Override public _FinalStage value(JsonNode value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApi.java b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApi.java index a8bd09244..0a77b87ce 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApi.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApi.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApi.Builder.class) public final class RemoteFieldApi { private final Map schema; @@ -125,13 +126,13 @@ public static RemoteKeyNameStage builder() { } public interface RemoteKeyNameStage { - RemoteEndpointInfoStage remoteKeyName(String remoteKeyName); + RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName); Builder from(RemoteFieldApi other); } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo); } public interface _FinalStage { @@ -188,21 +189,21 @@ public Builder from(RemoteFieldApi other) { @java.lang.Override @JsonSetter("remote_key_name") - public RemoteEndpointInfoStage remoteKeyName(String remoteKeyName) { + public RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName) { this.remoteKeyName = remoteKeyName; return this; } @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage coverage(RemoteFieldApiCoverage coverage) { - this.coverage = Optional.of(coverage); + this.coverage = Optional.ofNullable(coverage); return this; } @@ -215,7 +216,7 @@ public _FinalStage coverage(Optional coverage) { @java.lang.Override public _FinalStage advancedMetadata(AdvancedMetadata advancedMetadata) { - this.advancedMetadata = Optional.of(advancedMetadata); + this.advancedMetadata = Optional.ofNullable(advancedMetadata); return this; } @@ -228,7 +229,7 @@ public _FinalStage advancedMetadata(Optional advancedMetadata) @java.lang.Override public _FinalStage exampleValues(List exampleValues) { - this.exampleValues = Optional.of(exampleValues); + this.exampleValues = Optional.ofNullable(exampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApiResponse.java b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApiResponse.java index b6e31a756..24b6e731c 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApiResponse.Builder.class) public final class RemoteFieldApiResponse { private final Optional> account; @@ -200,7 +200,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -211,7 +211,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -222,7 +222,7 @@ public Builder lead(Optional> lead) { } public Builder lead(List lead) { - this.lead = Optional.of(lead); + this.lead = Optional.ofNullable(lead); return this; } @@ -233,7 +233,7 @@ public Builder note(Optional> note) { } public Builder note(List note) { - this.note = Optional.of(note); + this.note = Optional.ofNullable(note); return this; } @@ -244,7 +244,7 @@ public Builder opportunity(Optional> opportunity) { } public Builder opportunity(List opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -255,7 +255,7 @@ public Builder stage(Optional> stage) { } public Builder stage(List stage) { - this.stage = Optional.of(stage); + this.stage = Optional.ofNullable(stage); return this; } @@ -266,7 +266,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -277,7 +277,7 @@ public Builder task(Optional> task) { } public Builder task(List task) { - this.task = Optional.of(task); + this.task = Optional.ofNullable(task); return this; } @@ -288,7 +288,7 @@ public Builder engagement(Optional> engagement) { } public Builder engagement(List engagement) { - this.engagement = Optional.of(engagement); + this.engagement = Optional.ofNullable(engagement); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClass.java b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClass.java index 5a8ee9662..41cf8c49a 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClass.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClass.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldClass.Builder.class) public final class RemoteFieldClass { private final Optional id; @@ -214,7 +214,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -225,7 +225,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } @@ -236,7 +236,7 @@ public Builder remoteKeyName(Optional remoteKeyName) { } public Builder remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } @@ -247,7 +247,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -258,7 +258,7 @@ public Builder isCustom(Optional isCustom) { } public Builder isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -269,7 +269,7 @@ public Builder isRequired(Optional isRequired) { } public Builder isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -280,7 +280,7 @@ public Builder fieldType(Optional fieldType) { } public Builder fieldType(RemoteFieldClassFieldType fieldType) { - this.fieldType = Optional.of(fieldType); + this.fieldType = Optional.ofNullable(fieldType); return this; } @@ -291,7 +291,7 @@ public Builder fieldFormat(Optional fieldFormat) { } public Builder fieldFormat(RemoteFieldClassFieldFormat fieldFormat) { - this.fieldFormat = Optional.of(fieldFormat); + this.fieldFormat = Optional.ofNullable(fieldFormat); return this; } @@ -302,7 +302,7 @@ public Builder fieldChoices(Optional> fie } public Builder fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -313,7 +313,7 @@ public Builder itemSchema(Optional itemSchema) { } public Builder itemSchema(ItemSchema itemSchema) { - this.itemSchema = Optional.of(itemSchema); + this.itemSchema = Optional.ofNullable(itemSchema); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassFieldChoicesItem.java b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassFieldChoicesItem.java index 6aaf8c70c..c75af89d4 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassFieldChoicesItem.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassFieldChoicesItem.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldClassFieldChoicesItem.Builder.class) public final class RemoteFieldClassFieldChoicesItem { private final Optional value; @@ -97,7 +97,7 @@ public Builder value(Optional value) { } public Builder value(JsonNode value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -108,7 +108,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.java b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.java index c322eddac..095ef21d3 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClass.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldClassForCustomObjectClass.Builder.class) public final class RemoteFieldClassForCustomObjectClass { private final Optional createdAt; @@ -222,7 +222,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -233,7 +233,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -244,7 +244,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } @@ -255,7 +255,7 @@ public Builder remoteKeyName(Optional remoteKeyName) { } public Builder remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } @@ -266,7 +266,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -277,7 +277,7 @@ public Builder isRequired(Optional isRequired) { } public Builder isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -288,7 +288,7 @@ public Builder fieldType(Optional } public Builder fieldType(RemoteFieldClassForCustomObjectClassFieldType fieldType) { - this.fieldType = Optional.of(fieldType); + this.fieldType = Optional.ofNullable(fieldType); return this; } @@ -299,7 +299,7 @@ public Builder fieldFormat(Optional fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -321,7 +321,7 @@ public Builder itemSchema(Optional value; @@ -98,7 +98,7 @@ public Builder value(Optional value) { } public Builder value(JsonNode value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -109,7 +109,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.java b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.java index cb94ec195..907e27181 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldClassForCustomObjectClassItemSchema.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldClassForCustomObjectClassItemSchema.Builder.class) public final class RemoteFieldClassForCustomObjectClassItemSchema { private final Optional itemType; @@ -114,7 +114,7 @@ public Builder itemType(Optional itemType) { } public Builder itemType(String itemType) { - this.itemType = Optional.of(itemType); + this.itemType = Optional.ofNullable(itemType); return this; } @@ -125,7 +125,7 @@ public Builder itemFormat(Optional itemFormat) { } public Builder itemFormat(String itemFormat) { - this.itemFormat = Optional.of(itemFormat); + this.itemFormat = Optional.ofNullable(itemFormat); return this; } @@ -136,7 +136,7 @@ public Builder itemChoices(Optional>> itemChoices) { } public Builder itemChoices(List> itemChoices) { - this.itemChoices = Optional.of(itemChoices); + this.itemChoices = Optional.ofNullable(itemChoices); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldRequest.java b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldRequest.java index f042bcab2..50479cb77 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteFieldRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteFieldRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldRequest.Builder.class) public final class RemoteFieldRequest { private final RemoteFieldRequestRemoteFieldClass remoteFieldClass; @@ -76,7 +77,7 @@ public static RemoteFieldClassStage builder() { } public interface RemoteFieldClassStage { - _FinalStage remoteFieldClass(RemoteFieldRequestRemoteFieldClass remoteFieldClass); + _FinalStage remoteFieldClass(@NotNull RemoteFieldRequestRemoteFieldClass remoteFieldClass); Builder from(RemoteFieldRequest other); } @@ -109,14 +110,14 @@ public Builder from(RemoteFieldRequest other) { @java.lang.Override @JsonSetter("remote_field_class") - public _FinalStage remoteFieldClass(RemoteFieldRequestRemoteFieldClass remoteFieldClass) { + public _FinalStage remoteFieldClass(@NotNull RemoteFieldRequestRemoteFieldClass remoteFieldClass) { this.remoteFieldClass = remoteFieldClass; return this; } @java.lang.Override public _FinalStage value(JsonNode value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteKey.java b/src/main/java/com/merge/api/resources/crm/types/RemoteKey.java index ecbc43877..7b86bc718 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteKey.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteKey.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKey.Builder.class) public final class RemoteKey { private final String name; @@ -70,13 +71,13 @@ public static NameStage builder() { } public interface NameStage { - KeyStage name(String name); + KeyStage name(@NotNull String name); Builder from(RemoteKey other); } public interface KeyStage { - _FinalStage key(String key); + _FinalStage key(@NotNull String key); } public interface _FinalStage { @@ -103,14 +104,14 @@ public Builder from(RemoteKey other) { @java.lang.Override @JsonSetter("name") - public KeyStage name(String name) { + public KeyStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("key") - public _FinalStage key(String key) { + public _FinalStage key(@NotNull String key) { this.key = key; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/RemoteResponse.java b/src/main/java/com/merge/api/resources/crm/types/RemoteResponse.java index d03c4e44c..91c7894d9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/RemoteResponse.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteResponse.Builder.class) public final class RemoteResponse { private final String method; @@ -134,13 +135,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(String method); + PathStage method(@NotNull String method); Builder from(RemoteResponse other); } public interface PathStage { - StatusStage path(String path); + StatusStage path(@NotNull String path); } public interface StatusStage { @@ -148,7 +149,7 @@ public interface StatusStage { } public interface ResponseStage { - _FinalStage response(JsonNode response); + _FinalStage response(@NotNull JsonNode response); } public interface _FinalStage { @@ -202,14 +203,14 @@ public Builder from(RemoteResponse other) { @java.lang.Override @JsonSetter("method") - public PathStage method(String method) { + public PathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("path") - public StatusStage path(String path) { + public StatusStage path(@NotNull String path) { this.path = path; return this; } @@ -223,14 +224,14 @@ public ResponseStage status(int status) { @java.lang.Override @JsonSetter("response") - public _FinalStage response(JsonNode response) { + public _FinalStage response(@NotNull JsonNode response) { this.response = response; return this; } @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -243,7 +244,7 @@ public _FinalStage headers(Optional> headers) { @java.lang.Override public _FinalStage responseType(ResponseTypeEnum responseType) { - this.responseType = Optional.of(responseType); + this.responseType = Optional.ofNullable(responseType); return this; } @@ -256,7 +257,7 @@ public _FinalStage responseType(Optional responseType) { @java.lang.Override public _FinalStage responseHeaders(Map responseHeaders) { - this.responseHeaders = Optional.of(responseHeaders); + this.responseHeaders = Optional.ofNullable(responseHeaders); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Stage.java b/src/main/java/com/merge/api/resources/crm/types/Stage.java index 59cd37a5e..1fca9fcfe 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Stage.java +++ b/src/main/java/com/merge/api/resources/crm/types/Stage.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Stage.Builder.class) public final class Stage { private final Optional id; @@ -217,7 +217,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -228,7 +228,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -239,7 +239,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -250,7 +250,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -261,7 +261,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -272,7 +272,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -283,7 +283,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -294,7 +294,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -305,7 +305,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/SyncStatus.java b/src/main/java/com/merge/api/resources/crm/types/SyncStatus.java index 4235106b9..022bc4d71 100644 --- a/src/main/java/com/merge/api/resources/crm/types/SyncStatus.java +++ b/src/main/java/com/merge/api/resources/crm/types/SyncStatus.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatus.Builder.class) public final class SyncStatus { private final String modelName; @@ -134,17 +135,17 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - ModelIdStage modelName(String modelName); + ModelIdStage modelName(@NotNull String modelName); Builder from(SyncStatus other); } public interface ModelIdStage { - StatusStage modelId(String modelId); + StatusStage modelId(@NotNull String modelId); } public interface StatusStage { - IsInitialSyncStage status(SyncStatusStatusEnum status); + IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status); } public interface IsInitialSyncStage { @@ -205,21 +206,21 @@ public Builder from(SyncStatus other) { @java.lang.Override @JsonSetter("model_name") - public ModelIdStage modelName(String modelName) { + public ModelIdStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override @JsonSetter("model_id") - public StatusStage modelId(String modelId) { + public StatusStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(SyncStatusStatusEnum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status) { this.status = status; return this; } @@ -234,7 +235,7 @@ public _FinalStage isInitialSync(boolean isInitialSync) { @java.lang.Override public _FinalStage selectiveSyncConfigurationsUsage( SelectiveSyncConfigurationsUsageEnum selectiveSyncConfigurationsUsage) { - this.selectiveSyncConfigurationsUsage = Optional.of(selectiveSyncConfigurationsUsage); + this.selectiveSyncConfigurationsUsage = Optional.ofNullable(selectiveSyncConfigurationsUsage); return this; } @@ -248,7 +249,7 @@ public _FinalStage selectiveSyncConfigurationsUsage( @java.lang.Override public _FinalStage nextSyncStart(OffsetDateTime nextSyncStart) { - this.nextSyncStart = Optional.of(nextSyncStart); + this.nextSyncStart = Optional.ofNullable(nextSyncStart); return this; } @@ -261,7 +262,7 @@ public _FinalStage nextSyncStart(Optional nextSyncStart) { @java.lang.Override public _FinalStage lastSyncStart(OffsetDateTime lastSyncStart) { - this.lastSyncStart = Optional.of(lastSyncStart); + this.lastSyncStart = Optional.ofNullable(lastSyncStart); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/Task.java b/src/main/java/com/merge/api/resources/crm/types/Task.java index b2a653664..78a64c54d 100644 --- a/src/main/java/com/merge/api/resources/crm/types/Task.java +++ b/src/main/java/com/merge/api/resources/crm/types/Task.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Task.Builder.class) public final class Task { private final Optional id; @@ -340,7 +340,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -351,7 +351,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -362,7 +362,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -373,7 +373,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -384,7 +384,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -395,7 +395,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -406,7 +406,7 @@ public Builder owner(Optional owner) { } public Builder owner(TaskOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -417,7 +417,7 @@ public Builder account(Optional account) { } public Builder account(TaskAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -428,7 +428,7 @@ public Builder opportunity(Optional opportunity) { } public Builder opportunity(TaskOpportunity opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -439,7 +439,7 @@ public Builder completedDate(Optional completedDate) { } public Builder completedDate(OffsetDateTime completedDate) { - this.completedDate = Optional.of(completedDate); + this.completedDate = Optional.ofNullable(completedDate); return this; } @@ -450,7 +450,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -461,7 +461,7 @@ public Builder status(Optional status) { } public Builder status(TaskStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -472,7 +472,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -483,7 +483,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -494,7 +494,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -505,7 +505,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/TaskRequest.java b/src/main/java/com/merge/api/resources/crm/types/TaskRequest.java index 66fff879e..92cf769d9 100644 --- a/src/main/java/com/merge/api/resources/crm/types/TaskRequest.java +++ b/src/main/java/com/merge/api/resources/crm/types/TaskRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TaskRequest.Builder.class) public final class TaskRequest { private final Optional subject; @@ -258,7 +258,7 @@ public Builder subject(Optional subject) { } public Builder subject(String subject) { - this.subject = Optional.of(subject); + this.subject = Optional.ofNullable(subject); return this; } @@ -269,7 +269,7 @@ public Builder content(Optional content) { } public Builder content(String content) { - this.content = Optional.of(content); + this.content = Optional.ofNullable(content); return this; } @@ -280,7 +280,7 @@ public Builder owner(Optional owner) { } public Builder owner(TaskRequestOwner owner) { - this.owner = Optional.of(owner); + this.owner = Optional.ofNullable(owner); return this; } @@ -291,7 +291,7 @@ public Builder account(Optional account) { } public Builder account(TaskRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -302,7 +302,7 @@ public Builder opportunity(Optional opportunity) { } public Builder opportunity(TaskRequestOpportunity opportunity) { - this.opportunity = Optional.of(opportunity); + this.opportunity = Optional.ofNullable(opportunity); return this; } @@ -313,7 +313,7 @@ public Builder completedDate(Optional completedDate) { } public Builder completedDate(OffsetDateTime completedDate) { - this.completedDate = Optional.of(completedDate); + this.completedDate = Optional.ofNullable(completedDate); return this; } @@ -324,7 +324,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -335,7 +335,7 @@ public Builder status(Optional status) { } public Builder status(TaskRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -346,7 +346,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -357,7 +357,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -368,7 +368,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/TaskResponse.java b/src/main/java/com/merge/api/resources/crm/types/TaskResponse.java index 452fb45a9..a6be4acaa 100644 --- a/src/main/java/com/merge/api/resources/crm/types/TaskResponse.java +++ b/src/main/java/com/merge/api/resources/crm/types/TaskResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TaskResponse.Builder.class) public final class TaskResponse { private final Task model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Task model); + _FinalStage model(@NotNull Task model); Builder from(TaskResponse other); } @@ -149,14 +150,14 @@ public Builder from(TaskResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Task model) { + public _FinalStage model(@NotNull Task model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/User.java b/src/main/java/com/merge/api/resources/crm/types/User.java index 07ed35012..c67bb3b3a 100644 --- a/src/main/java/com/merge/api/resources/crm/types/User.java +++ b/src/main/java/com/merge/api/resources/crm/types/User.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = User.Builder.class) public final class User { private final Optional id; @@ -251,7 +251,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -262,7 +262,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -273,7 +273,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -284,7 +284,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -295,7 +295,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -306,7 +306,7 @@ public Builder email(Optional email) { } public Builder email(String email) { - this.email = Optional.of(email); + this.email = Optional.ofNullable(email); return this; } @@ -317,7 +317,7 @@ public Builder isActive(Optional isActive) { } public Builder isActive(Boolean isActive) { - this.isActive = Optional.of(isActive); + this.isActive = Optional.ofNullable(isActive); return this; } @@ -328,7 +328,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -339,7 +339,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -350,7 +350,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -361,7 +361,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/ValidationProblemSource.java b/src/main/java/com/merge/api/resources/crm/types/ValidationProblemSource.java index ba943a4e5..a600fa73b 100644 --- a/src/main/java/com/merge/api/resources/crm/types/ValidationProblemSource.java +++ b/src/main/java/com/merge/api/resources/crm/types/ValidationProblemSource.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ValidationProblemSource.Builder.class) public final class ValidationProblemSource { private final String pointer; @@ -62,7 +63,7 @@ public static PointerStage builder() { } public interface PointerStage { - _FinalStage pointer(String pointer); + _FinalStage pointer(@NotNull String pointer); Builder from(ValidationProblemSource other); } @@ -88,7 +89,7 @@ public Builder from(ValidationProblemSource other) { @java.lang.Override @JsonSetter("pointer") - public _FinalStage pointer(String pointer) { + public _FinalStage pointer(@NotNull String pointer) { this.pointer = pointer; return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/WarningValidationProblem.java b/src/main/java/com/merge/api/resources/crm/types/WarningValidationProblem.java index 0d176d9de..8865e6098 100644 --- a/src/main/java/com/merge/api/resources/crm/types/WarningValidationProblem.java +++ b/src/main/java/com/merge/api/resources/crm/types/WarningValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WarningValidationProblem.Builder.class) public final class WarningValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(WarningValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(WarningValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/types/WebhookReceiver.java b/src/main/java/com/merge/api/resources/crm/types/WebhookReceiver.java index a0cb6df45..2dbcdcf50 100644 --- a/src/main/java/com/merge/api/resources/crm/types/WebhookReceiver.java +++ b/src/main/java/com/merge/api/resources/crm/types/WebhookReceiver.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiver.Builder.class) public final class WebhookReceiver { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiver other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiver other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/users/UsersClient.java b/src/main/java/com/merge/api/resources/crm/users/UsersClient.java index 89b190131..58ef5eb1e 100644 --- a/src/main/java/com/merge/api/resources/crm/users/UsersClient.java +++ b/src/main/java/com/merge/api/resources/crm/users/UsersClient.java @@ -104,7 +104,8 @@ public PaginatedUserList list(UsersListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -125,13 +126,6 @@ public PaginatedUserList list(UsersListRequest request, RequestOptions requestOp } } - /** - * Returns a User object with the given id. - */ - public User retrieve(String id) { - return retrieve(id, UsersRetrieveRequest.builder().build()); - } - /** * Returns a User object with the given id. */ @@ -160,7 +154,8 @@ public User retrieve(String id, UsersRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -285,7 +280,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/users/requests/UsersListRequest.java b/src/main/java/com/merge/api/resources/crm/users/requests/UsersListRequest.java index 6719b3df8..e3a22b60b 100644 --- a/src/main/java/com/merge/api/resources/crm/users/requests/UsersListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/users/requests/UsersListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersListRequest.Builder.class) public final class UsersListRequest { private final Optional createdAfter; @@ -278,7 +278,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -289,7 +289,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -300,7 +300,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -311,7 +311,7 @@ public Builder email(Optional email) { } public Builder email(String email) { - this.email = Optional.of(email); + this.email = Optional.ofNullable(email); return this; } @@ -322,7 +322,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -333,7 +333,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -344,7 +344,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -355,7 +355,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/users/requests/UsersRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/crm/users/requests/UsersRemoteFieldClassesListRequest.java index 1c385f713..2ee77f95d 100644 --- a/src/main/java/com/merge/api/resources/crm/users/requests/UsersRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/crm/users/requests/UsersRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersRemoteFieldClassesListRequest.Builder.class) public final class UsersRemoteFieldClassesListRequest { private final Optional cursor; @@ -193,7 +193,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -204,7 +204,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -215,7 +215,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -226,7 +226,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -237,7 +237,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -248,7 +248,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -259,7 +259,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/users/requests/UsersRetrieveRequest.java b/src/main/java/com/merge/api/resources/crm/users/requests/UsersRetrieveRequest.java index a66a17467..41c2f2f97 100644 --- a/src/main/java/com/merge/api/resources/crm/users/requests/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/crm/users/requests/UsersRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersRetrieveRequest.Builder.class) public final class UsersRetrieveRequest { private final Optional includeRemoteData; @@ -105,7 +105,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/crm/webhookreceivers/WebhookReceiversClient.java b/src/main/java/com/merge/api/resources/crm/webhookreceivers/WebhookReceiversClient.java index 65fef77f6..00f82834d 100644 --- a/src/main/java/com/merge/api/resources/crm/webhookreceivers/WebhookReceiversClient.java +++ b/src/main/java/com/merge/api/resources/crm/webhookreceivers/WebhookReceiversClient.java @@ -50,6 +50,7 @@ public List list(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,6 +99,7 @@ public WebhookReceiver create(WebhookReceiverRequest request, RequestOptions req .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/crm/webhookreceivers/requests/WebhookReceiverRequest.java b/src/main/java/com/merge/api/resources/crm/webhookreceivers/requests/WebhookReceiverRequest.java index e035bce4c..19dab68e4 100644 --- a/src/main/java/com/merge/api/resources/crm/webhookreceivers/requests/WebhookReceiverRequest.java +++ b/src/main/java/com/merge/api/resources/crm/webhookreceivers/requests/WebhookReceiverRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiverRequest.Builder.class) public final class WebhookReceiverRequest { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiverRequest other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiverRequest other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/accountdetails/AccountDetailsClient.java b/src/main/java/com/merge/api/resources/filestorage/accountdetails/AccountDetailsClient.java index f138b8e49..84b0f6054 100644 --- a/src/main/java/com/merge/api/resources/filestorage/accountdetails/AccountDetailsClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/accountdetails/AccountDetailsClient.java @@ -44,6 +44,7 @@ public AccountDetails retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/accounttoken/AccountTokenClient.java b/src/main/java/com/merge/api/resources/filestorage/accounttoken/AccountTokenClient.java index 4c739a4d9..b9296cd78 100644 --- a/src/main/java/com/merge/api/resources/filestorage/accounttoken/AccountTokenClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/accounttoken/AccountTokenClient.java @@ -45,6 +45,7 @@ public AccountToken retrieve(String publicToken, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/asyncpassthrough/AsyncPassthroughClient.java b/src/main/java/com/merge/api/resources/filestorage/asyncpassthrough/AsyncPassthroughClient.java index 7441d2526..a2f98a5b6 100644 --- a/src/main/java/com/merge/api/resources/filestorage/asyncpassthrough/AsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/asyncpassthrough/AsyncPassthroughClient.java @@ -97,6 +97,7 @@ public AsyncPassthroughRetrieveResponse retrieve(String asyncPassthroughReceiptI .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/audittrail/AuditTrailClient.java b/src/main/java/com/merge/api/resources/filestorage/audittrail/AuditTrailClient.java index b322ae0a4..77b43d27d 100644 --- a/src/main/java/com/merge/api/resources/filestorage/audittrail/AuditTrailClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/audittrail/AuditTrailClient.java @@ -68,7 +68,8 @@ public PaginatedAuditLogEventList list(AuditTrailListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/audittrail/requests/AuditTrailListRequest.java b/src/main/java/com/merge/api/resources/filestorage/audittrail/requests/AuditTrailListRequest.java index c2d58654d..66dd4574b 100644 --- a/src/main/java/com/merge/api/resources/filestorage/audittrail/requests/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/audittrail/requests/AuditTrailListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditTrailListRequest.Builder.class) public final class AuditTrailListRequest { private final Optional cursor; @@ -169,7 +169,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -180,7 +180,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -191,7 +191,7 @@ public Builder eventType(Optional eventType) { } public Builder eventType(String eventType) { - this.eventType = Optional.of(eventType); + this.eventType = Optional.ofNullable(eventType); return this; } @@ -202,7 +202,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -213,7 +213,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -224,7 +224,7 @@ public Builder userEmail(Optional userEmail) { } public Builder userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/availableactions/AvailableActionsClient.java b/src/main/java/com/merge/api/resources/filestorage/availableactions/AvailableActionsClient.java index 83af84df1..3a77382a4 100644 --- a/src/main/java/com/merge/api/resources/filestorage/availableactions/AvailableActionsClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/availableactions/AvailableActionsClient.java @@ -44,6 +44,7 @@ public AvailableActions retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/drives/DrivesClient.java b/src/main/java/com/merge/api/resources/filestorage/drives/DrivesClient.java index e4e680d7e..abcd508a0 100644 --- a/src/main/java/com/merge/api/resources/filestorage/drives/DrivesClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/drives/DrivesClient.java @@ -93,7 +93,8 @@ public PaginatedDriveList list(DrivesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -114,13 +115,6 @@ public PaginatedDriveList list(DrivesListRequest request, RequestOptions request } } - /** - * Returns a Drive object with the given id. - */ - public Drive retrieve(String id) { - return retrieve(id, DrivesRetrieveRequest.builder().build()); - } - /** * Returns a Drive object with the given id. */ @@ -144,7 +138,8 @@ public Drive retrieve(String id, DrivesRetrieveRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesListRequest.java b/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesListRequest.java index 7261352f4..12b800361 100644 --- a/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DrivesListRequest.Builder.class) public final class DrivesListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -305,7 +305,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -316,7 +316,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -327,7 +327,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -338,7 +338,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -349,7 +349,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesRetrieveRequest.java index 3d50ef513..f168df918 100644 --- a/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/drives/requests/DrivesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DrivesRetrieveRequest.Builder.class) public final class DrivesRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/FieldMappingClient.java b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/FieldMappingClient.java index 9a44596c9..11d59930f 100644 --- a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/FieldMappingClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/FieldMappingClient.java @@ -67,7 +67,8 @@ public FieldMappingApiInstanceResponse fieldMappingsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -127,7 +128,8 @@ public FieldMappingInstanceResponse fieldMappingsCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,6 +171,7 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, .method("DELETE", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -189,14 +192,6 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, } } - /** - * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. - */ - public FieldMappingInstanceResponse fieldMappingsPartialUpdate(String fieldMappingId) { - return fieldMappingsPartialUpdate( - fieldMappingId, PatchedEditFieldMappingRequest.builder().build()); - } - /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. */ @@ -227,6 +222,7 @@ public FieldMappingInstanceResponse fieldMappingsPartialUpdate( .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,7 +276,8 @@ public RemoteFieldApiResponse remoteFieldsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -321,6 +318,7 @@ public ExternalTargetFieldApiResponse targetFieldsRetrieve(RequestOptions reques .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/CreateFieldMappingRequest.java index 5cbb0211e..8a65b66a4 100644 --- a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/CreateFieldMappingRequest.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateFieldMappingRequest.Builder.class) public final class CreateFieldMappingRequest { private final Optional excludeRemoteFieldMetadata; @@ -157,25 +158,25 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { - TargetFieldDescriptionStage targetFieldName(String targetFieldName); + TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { - RemoteMethodStage targetFieldDescription(String targetFieldDescription); + RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { - RemoteUrlPathStage remoteMethod(String remoteMethod); + RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { - CommonModelNameStage remoteUrlPath(String remoteUrlPath); + CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { - _FinalStage commonModelName(String commonModelName); + _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { @@ -237,7 +238,7 @@ public Builder from(CreateFieldMappingRequest other) { */ @java.lang.Override @JsonSetter("target_field_name") - public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { + public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName) { this.targetFieldName = targetFieldName; return this; } @@ -248,7 +249,7 @@ public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { */ @java.lang.Override @JsonSetter("target_field_description") - public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { + public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription) { this.targetFieldDescription = targetFieldDescription; return this; } @@ -259,7 +260,7 @@ public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { */ @java.lang.Override @JsonSetter("remote_method") - public RemoteUrlPathStage remoteMethod(String remoteMethod) { + public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { this.remoteMethod = remoteMethod; return this; } @@ -270,7 +271,7 @@ public RemoteUrlPathStage remoteMethod(String remoteMethod) { */ @java.lang.Override @JsonSetter("remote_url_path") - public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { + public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; return this; } @@ -281,7 +282,7 @@ public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { */ @java.lang.Override @JsonSetter("common_model_name") - public _FinalStage commonModelName(String commonModelName) { + public _FinalStage commonModelName(@NotNull String commonModelName) { this.commonModelName = commonModelName; return this; } @@ -320,7 +321,7 @@ public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalP */ @java.lang.Override public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/FieldMappingsRetrieveRequest.java index 08b66bb7e..fe032465e 100644 --- a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/FieldMappingsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingsRetrieveRequest.Builder.class) public final class FieldMappingsRetrieveRequest { private final Optional excludeRemoteFieldMetadata; @@ -88,7 +88,7 @@ public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMe } public Builder excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/PatchedEditFieldMappingRequest.java index 4518c04a4..608fa3770 100644 --- a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/PatchedEditFieldMappingRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEditFieldMappingRequest.Builder.class) public final class PatchedEditFieldMappingRequest { private final Optional> remoteFieldTraversalPath; @@ -123,7 +123,7 @@ public Builder remoteFieldTraversalPath(Optional> remoteFieldTrav } public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) { - this.remoteFieldTraversalPath = Optional.of(remoteFieldTraversalPath); + this.remoteFieldTraversalPath = Optional.ofNullable(remoteFieldTraversalPath); return this; } @@ -134,7 +134,7 @@ public Builder remoteMethod(Optional remoteMethod) { } public Builder remoteMethod(String remoteMethod) { - this.remoteMethod = Optional.of(remoteMethod); + this.remoteMethod = Optional.ofNullable(remoteMethod); return this; } @@ -145,7 +145,7 @@ public Builder remoteUrlPath(Optional remoteUrlPath) { } public Builder remoteUrlPath(String remoteUrlPath) { - this.remoteUrlPath = Optional.of(remoteUrlPath); + this.remoteUrlPath = Optional.ofNullable(remoteUrlPath); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/RemoteFieldsRetrieveRequest.java index eb784bc0e..0f682eb07 100644 --- a/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/fieldmapping/requests/RemoteFieldsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldsRetrieveRequest.Builder.class) public final class RemoteFieldsRetrieveRequest { private final Optional commonModels; @@ -104,7 +104,7 @@ public Builder commonModels(Optional commonModels) { } public Builder commonModels(String commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -115,7 +115,7 @@ public Builder includeExampleValues(Optional includeExampleValues) { } public Builder includeExampleValues(String includeExampleValues) { - this.includeExampleValues = Optional.of(includeExampleValues); + this.includeExampleValues = Optional.ofNullable(includeExampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/files/FilesClient.java b/src/main/java/com/merge/api/resources/filestorage/files/FilesClient.java index 5b528b551..948462525 100644 --- a/src/main/java/com/merge/api/resources/filestorage/files/FilesClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/files/FilesClient.java @@ -9,6 +9,7 @@ import com.merge.api.core.MergeException; import com.merge.api.core.ObjectMappers; import com.merge.api.core.RequestOptions; +import com.merge.api.core.ResponseBodyInputStream; import com.merge.api.resources.filestorage.files.requests.FileStorageFileEndpointRequest; import com.merge.api.resources.filestorage.files.requests.FilesDownloadRetrieveRequest; import com.merge.api.resources.filestorage.files.requests.FilesListRequest; @@ -114,7 +115,8 @@ public PaginatedFileList list(FilesListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,7 +171,8 @@ public FileStorageFileResponse create(FileStorageFileEndpointRequest request, Re .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -190,13 +193,6 @@ public FileStorageFileResponse create(FileStorageFileEndpointRequest request, Re } } - /** - * Returns a File object with the given id. - */ - public File retrieve(String id) { - return retrieve(id, FilesRetrieveRequest.builder().build()); - } - /** * Returns a File object with the given id. */ @@ -223,7 +219,8 @@ public File retrieve(String id, FilesRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -244,13 +241,6 @@ public File retrieve(String id, FilesRetrieveRequest request, RequestOptions req } } - /** - * Returns the File content with the given id as a stream of bytes. - */ - public InputStream downloadRetrieve(String id) { - return downloadRetrieve(id, FilesDownloadRetrieveRequest.builder().build()); - } - /** * Returns the File content with the given id as a stream of bytes. */ @@ -281,10 +271,11 @@ public InputStream downloadRetrieve( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - try (Response response = client.newCall(okhttpRequest).execute()) { + try { + Response response = client.newCall(okhttpRequest).execute(); ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - return responseBody.byteStream(); + return new ResponseBodyInputStream(response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; throw new ApiError( @@ -316,6 +307,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/files/requests/FileStorageFileEndpointRequest.java b/src/main/java/com/merge/api/resources/filestorage/files/requests/FileStorageFileEndpointRequest.java index 9e1df2027..8c1a1029f 100644 --- a/src/main/java/com/merge/api/resources/filestorage/files/requests/FileStorageFileEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/files/requests/FileStorageFileEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FileStorageFileEndpointRequest.Builder.class) public final class FileStorageFileEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FileRequest model); + _FinalStage model(@NotNull FileRequest model); Builder from(FileStorageFileEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(FileStorageFileEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FileRequest model) { + public _FinalStage model(@NotNull FileRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(FileRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesDownloadRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesDownloadRetrieveRequest.java index 8954b9e9c..d96f7c137 100644 --- a/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesDownloadRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesDownloadRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FilesDownloadRetrieveRequest.Builder.class) public final class FilesDownloadRetrieveRequest { private final Optional mimeType; @@ -87,7 +87,7 @@ public Builder mimeType(Optional mimeType) { } public Builder mimeType(String mimeType) { - this.mimeType = Optional.of(mimeType); + this.mimeType = Optional.ofNullable(mimeType); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesListRequest.java b/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesListRequest.java index a42628cc1..486716aa1 100644 --- a/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FilesListRequest.Builder.class) public final class FilesListRequest { private final Optional createdAfter; @@ -330,7 +330,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -341,7 +341,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -352,7 +352,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -363,7 +363,7 @@ public Builder driveId(Optional driveId) { } public Builder driveId(String driveId) { - this.driveId = Optional.of(driveId); + this.driveId = Optional.ofNullable(driveId); return this; } @@ -374,7 +374,7 @@ public Builder expand(Optional expand) { } public Builder expand(FilesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -385,7 +385,7 @@ public Builder folderId(Optional folderId) { } public Builder folderId(String folderId) { - this.folderId = Optional.of(folderId); + this.folderId = Optional.ofNullable(folderId); return this; } @@ -396,7 +396,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -407,7 +407,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -418,7 +418,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -429,7 +429,7 @@ public Builder mimeType(Optional mimeType) { } public Builder mimeType(String mimeType) { - this.mimeType = Optional.of(mimeType); + this.mimeType = Optional.ofNullable(mimeType); return this; } @@ -440,7 +440,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -451,7 +451,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -462,7 +462,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -473,7 +473,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -484,7 +484,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesRetrieveRequest.java index 19f452111..1aedaca8c 100644 --- a/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/files/requests/FilesRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FilesRetrieveRequest.Builder.class) public final class FilesRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(FilesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/folders/FoldersClient.java b/src/main/java/com/merge/api/resources/filestorage/folders/FoldersClient.java index 690247d65..50a81f7c7 100644 --- a/src/main/java/com/merge/api/resources/filestorage/folders/FoldersClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/folders/FoldersClient.java @@ -110,7 +110,8 @@ public PaginatedFolderList list(FoldersListRequest request, RequestOptions reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -165,7 +166,8 @@ public FileStorageFolderResponse create(FileStorageFolderEndpointRequest request .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -186,13 +188,6 @@ public FileStorageFolderResponse create(FileStorageFolderEndpointRequest request } } - /** - * Returns a Folder object with the given id. - */ - public Folder retrieve(String id) { - return retrieve(id, FoldersRetrieveRequest.builder().build()); - } - /** * Returns a Folder object with the given id. */ @@ -219,7 +214,8 @@ public Folder retrieve(String id, FoldersRetrieveRequest request, RequestOptions .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -260,6 +256,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/folders/requests/FileStorageFolderEndpointRequest.java b/src/main/java/com/merge/api/resources/filestorage/folders/requests/FileStorageFolderEndpointRequest.java index d543f43aa..7017a4907 100644 --- a/src/main/java/com/merge/api/resources/filestorage/folders/requests/FileStorageFolderEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/folders/requests/FileStorageFolderEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FileStorageFolderEndpointRequest.Builder.class) public final class FileStorageFolderEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FolderRequest model); + _FinalStage model(@NotNull FolderRequest model); Builder from(FileStorageFolderEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(FileStorageFolderEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FolderRequest model) { + public _FinalStage model(@NotNull FolderRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(FolderRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersListRequest.java b/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersListRequest.java index 5636ba396..906b75c01 100644 --- a/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FoldersListRequest.Builder.class) public final class FoldersListRequest { private final Optional createdAfter; @@ -313,7 +313,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -324,7 +324,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -335,7 +335,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -346,7 +346,7 @@ public Builder driveId(Optional driveId) { } public Builder driveId(String driveId) { - this.driveId = Optional.of(driveId); + this.driveId = Optional.ofNullable(driveId); return this; } @@ -357,7 +357,7 @@ public Builder expand(Optional expand) { } public Builder expand(FoldersListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -368,7 +368,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -379,7 +379,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -390,7 +390,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -401,7 +401,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -412,7 +412,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -423,7 +423,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -434,7 +434,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -445,7 +445,7 @@ public Builder parentFolderId(Optional parentFolderId) { } public Builder parentFolderId(String parentFolderId) { - this.parentFolderId = Optional.of(parentFolderId); + this.parentFolderId = Optional.ofNullable(parentFolderId); return this; } @@ -456,7 +456,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersRetrieveRequest.java index 11d8068a1..e63f10763 100644 --- a/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/folders/requests/FoldersRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FoldersRetrieveRequest.Builder.class) public final class FoldersRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(FoldersRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/forceresync/ForceResyncClient.java b/src/main/java/com/merge/api/resources/filestorage/forceresync/ForceResyncClient.java index f1dcd77b3..dce262465 100644 --- a/src/main/java/com/merge/api/resources/filestorage/forceresync/ForceResyncClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/forceresync/ForceResyncClient.java @@ -47,6 +47,7 @@ public List syncStatusResyncCreate(RequestOptions requestOptions) { .method("POST", RequestBody.create("", null)) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/generatekey/GenerateKeyClient.java b/src/main/java/com/merge/api/resources/filestorage/generatekey/GenerateKeyClient.java index 042917e7d..e78d528d0 100644 --- a/src/main/java/com/merge/api/resources/filestorage/generatekey/GenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/generatekey/GenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(GenerateRemoteKeyRequest request, RequestOptions request .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/generatekey/requests/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/resources/filestorage/generatekey/requests/GenerateRemoteKeyRequest.java index 2da1610cd..4bf11f233 100644 --- a/src/main/java/com/merge/api/resources/filestorage/generatekey/requests/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/generatekey/requests/GenerateRemoteKeyRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GenerateRemoteKeyRequest.Builder.class) public final class GenerateRemoteKeyRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); } @@ -95,7 +96,7 @@ public Builder from(GenerateRemoteKeyRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/groups/GroupsClient.java b/src/main/java/com/merge/api/resources/filestorage/groups/GroupsClient.java index e44e637d4..2858342d9 100644 --- a/src/main/java/com/merge/api/resources/filestorage/groups/GroupsClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/groups/GroupsClient.java @@ -93,7 +93,8 @@ public PaginatedGroupList list(GroupsListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -114,13 +115,6 @@ public PaginatedGroupList list(GroupsListRequest request, RequestOptions request } } - /** - * Returns a Group object with the given id. - */ - public Group retrieve(String id) { - return retrieve(id, GroupsRetrieveRequest.builder().build()); - } - /** * Returns a Group object with the given id. */ @@ -147,7 +141,8 @@ public Group retrieve(String id, GroupsRetrieveRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsListRequest.java b/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsListRequest.java index ad73436d9..dc153eeb5 100644 --- a/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GroupsListRequest.Builder.class) public final class GroupsListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -305,7 +305,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -316,7 +316,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -327,7 +327,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsRetrieveRequest.java index 493c10ec1..5b4cade80 100644 --- a/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/groups/requests/GroupsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GroupsRetrieveRequest.Builder.class) public final class GroupsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/issues/IssuesClient.java b/src/main/java/com/merge/api/resources/filestorage/issues/IssuesClient.java index e49a13209..b259f9023 100644 --- a/src/main/java/com/merge/api/resources/filestorage/issues/IssuesClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/issues/IssuesClient.java @@ -105,7 +105,8 @@ public PaginatedIssueList list(IssuesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -147,6 +148,7 @@ public Issue retrieve(String id, RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/issues/requests/IssuesListRequest.java b/src/main/java/com/merge/api/resources/filestorage/issues/requests/IssuesListRequest.java index 6026b9ddc..056285851 100644 --- a/src/main/java/com/merge/api/resources/filestorage/issues/requests/IssuesListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/issues/requests/IssuesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IssuesListRequest.Builder.class) public final class IssuesListRequest { private final Optional accountToken; @@ -308,7 +308,7 @@ public Builder accountToken(Optional accountToken) { } public Builder accountToken(String accountToken) { - this.accountToken = Optional.of(accountToken); + this.accountToken = Optional.ofNullable(accountToken); return this; } @@ -319,7 +319,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -330,7 +330,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -341,7 +341,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -352,7 +352,7 @@ public Builder firstIncidentTimeAfter(Optional firstIncidentTime } public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { - this.firstIncidentTimeAfter = Optional.of(firstIncidentTimeAfter); + this.firstIncidentTimeAfter = Optional.ofNullable(firstIncidentTimeAfter); return this; } @@ -363,7 +363,7 @@ public Builder firstIncidentTimeBefore(Optional firstIncidentTim } public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { - this.firstIncidentTimeBefore = Optional.of(firstIncidentTimeBefore); + this.firstIncidentTimeBefore = Optional.ofNullable(firstIncidentTimeBefore); return this; } @@ -374,7 +374,7 @@ public Builder includeMuted(Optional includeMuted) { } public Builder includeMuted(String includeMuted) { - this.includeMuted = Optional.of(includeMuted); + this.includeMuted = Optional.ofNullable(includeMuted); return this; } @@ -385,7 +385,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -396,7 +396,7 @@ public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAf } public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { - this.lastIncidentTimeAfter = Optional.of(lastIncidentTimeAfter); + this.lastIncidentTimeAfter = Optional.ofNullable(lastIncidentTimeAfter); return this; } @@ -407,7 +407,7 @@ public Builder lastIncidentTimeBefore(Optional lastIncidentTimeB } public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { - this.lastIncidentTimeBefore = Optional.of(lastIncidentTimeBefore); + this.lastIncidentTimeBefore = Optional.ofNullable(lastIncidentTimeBefore); return this; } @@ -418,7 +418,7 @@ public Builder linkedAccountId(Optional linkedAccountId) { } public Builder linkedAccountId(String linkedAccountId) { - this.linkedAccountId = Optional.of(linkedAccountId); + this.linkedAccountId = Optional.ofNullable(linkedAccountId); return this; } @@ -429,7 +429,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -440,7 +440,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -451,7 +451,7 @@ public Builder status(Optional status) { } public Builder status(IssuesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/LinkedAccountsClient.java b/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/LinkedAccountsClient.java index 80bd262bb..19e083762 100644 --- a/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/LinkedAccountsClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/LinkedAccountsClient.java @@ -98,7 +98,8 @@ public PaginatedAccountDetailsAndActionsList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/requests/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/requests/LinkedAccountsListRequest.java index ce30f74c6..8e44f0b27 100644 --- a/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/requests/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/linkedaccounts/requests/LinkedAccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountsListRequest.Builder.class) public final class LinkedAccountsListRequest { private final Optional category; @@ -301,7 +301,7 @@ public Builder category(Optional category) { } public Builder category(LinkedAccountsListRequestCategory category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -312,7 +312,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -323,7 +323,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -334,7 +334,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -345,7 +345,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -356,7 +356,7 @@ public Builder endUserOriginIds(Optional endUserOriginIds) { } public Builder endUserOriginIds(String endUserOriginIds) { - this.endUserOriginIds = Optional.of(endUserOriginIds); + this.endUserOriginIds = Optional.ofNullable(endUserOriginIds); return this; } @@ -367,7 +367,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -378,7 +378,7 @@ public Builder ids(Optional ids) { } public Builder ids(String ids) { - this.ids = Optional.of(ids); + this.ids = Optional.ofNullable(ids); return this; } @@ -389,7 +389,7 @@ public Builder includeDuplicates(Optional includeDuplicates) { } public Builder includeDuplicates(Boolean includeDuplicates) { - this.includeDuplicates = Optional.of(includeDuplicates); + this.includeDuplicates = Optional.ofNullable(includeDuplicates); return this; } @@ -400,7 +400,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -411,7 +411,7 @@ public Builder isTestAccount(Optional isTestAccount) { } public Builder isTestAccount(String isTestAccount) { - this.isTestAccount = Optional.of(isTestAccount); + this.isTestAccount = Optional.ofNullable(isTestAccount); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/linktoken/LinkTokenClient.java b/src/main/java/com/merge/api/resources/filestorage/linktoken/LinkTokenClient.java index 7e718ff10..445a4c7df 100644 --- a/src/main/java/com/merge/api/resources/filestorage/linktoken/LinkTokenClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/linktoken/LinkTokenClient.java @@ -55,6 +55,7 @@ public LinkToken create(EndUserDetailsRequest request, RequestOptions requestOpt .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/linktoken/requests/EndUserDetailsRequest.java b/src/main/java/com/merge/api/resources/filestorage/linktoken/requests/EndUserDetailsRequest.java index 7aaf26030..5dd21076a 100644 --- a/src/main/java/com/merge/api/resources/filestorage/linktoken/requests/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/linktoken/requests/EndUserDetailsRequest.java @@ -23,8 +23,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EndUserDetailsRequest.Builder.class) public final class EndUserDetailsRequest { private final String endUserEmailAddress; @@ -252,17 +253,17 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { - EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress); + EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { - EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName); + EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { - _FinalStage endUserOriginId(String endUserOriginId); + _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { @@ -373,7 +374,7 @@ public Builder from(EndUserDetailsRequest other) { */ @java.lang.Override @JsonSetter("end_user_email_address") - public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress) { + public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @@ -384,7 +385,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddre */ @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @@ -395,7 +396,7 @@ public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationNa */ @java.lang.Override @JsonSetter("end_user_origin_id") - public _FinalStage endUserOriginId(String endUserOriginId) { + public _FinalStage endUserOriginId(@NotNull String endUserOriginId) { this.endUserOriginId = endUserOriginId; return this; } @@ -406,7 +407,7 @@ public _FinalStage endUserOriginId(String endUserOriginId) { */ @java.lang.Override public _FinalStage integrationSpecificConfig(Map integrationSpecificConfig) { - this.integrationSpecificConfig = Optional.of(integrationSpecificConfig); + this.integrationSpecificConfig = Optional.ofNullable(integrationSpecificConfig); return this; } @@ -423,7 +424,7 @@ public _FinalStage integrationSpecificConfig(Optional> int */ @java.lang.Override public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { - this.areSyncsDisabled = Optional.of(areSyncsDisabled); + this.areSyncsDisabled = Optional.ofNullable(areSyncsDisabled); return this; } @@ -444,7 +445,7 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { */ @java.lang.Override public _FinalStage language(LanguageEnum language) { - this.language = Optional.of(language); + this.language = Optional.ofNullable(language); return this; } @@ -462,7 +463,7 @@ public _FinalStage language(Optional language) { @java.lang.Override public _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes) { - this.categoryCommonModelScopes = Optional.of(categoryCommonModelScopes); + this.categoryCommonModelScopes = Optional.ofNullable(categoryCommonModelScopes); return this; } @@ -481,7 +482,7 @@ public _FinalStage categoryCommonModelScopes( */ @java.lang.Override public _FinalStage commonModels(List commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -498,7 +499,7 @@ public _FinalStage commonModels(Optional> com */ @java.lang.Override public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { - this.hideAdminMagicLink = Optional.of(hideAdminMagicLink); + this.hideAdminMagicLink = Optional.ofNullable(hideAdminMagicLink); return this; } @@ -515,7 +516,7 @@ public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { */ @java.lang.Override public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { - this.shouldCreateMagicLinkUrl = Optional.of(shouldCreateMagicLinkUrl); + this.shouldCreateMagicLinkUrl = Optional.ofNullable(shouldCreateMagicLinkUrl); return this; } @@ -532,7 +533,7 @@ public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicL */ @java.lang.Override public _FinalStage linkExpiryMins(Integer linkExpiryMins) { - this.linkExpiryMins = Optional.of(linkExpiryMins); + this.linkExpiryMins = Optional.ofNullable(linkExpiryMins); return this; } @@ -549,7 +550,7 @@ public _FinalStage linkExpiryMins(Optional linkExpiryMins) { */ @java.lang.Override public _FinalStage integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/regeneratekey/RegenerateKeyClient.java b/src/main/java/com/merge/api/resources/filestorage/regeneratekey/RegenerateKeyClient.java index 64f009455..cf8d0d7d1 100644 --- a/src/main/java/com/merge/api/resources/filestorage/regeneratekey/RegenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/regeneratekey/RegenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(RemoteKeyForRegenerationRequest request, RequestOptions .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/regeneratekey/requests/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/resources/filestorage/regeneratekey/requests/RemoteKeyForRegenerationRequest.java index 4dca339d5..f70ffb519 100644 --- a/src/main/java/com/merge/api/resources/filestorage/regeneratekey/requests/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/regeneratekey/requests/RemoteKeyForRegenerationRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKeyForRegenerationRequest.Builder.class) public final class RemoteKeyForRegenerationRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); } @@ -95,7 +96,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/scopes/ScopesClient.java b/src/main/java/com/merge/api/resources/filestorage/scopes/ScopesClient.java index fb9f362ae..926bfe9d9 100644 --- a/src/main/java/com/merge/api/resources/filestorage/scopes/ScopesClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/scopes/ScopesClient.java @@ -48,6 +48,7 @@ public CommonModelScopeApi defaultScopesRetrieve(RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -88,6 +89,7 @@ public CommonModelScopeApi linkedAccountScopesRetrieve(RequestOptions requestOpt .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -136,6 +138,7 @@ public CommonModelScopeApi linkedAccountScopesCreate( .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/filestorage/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java index 52a7497ce..01b303860 100644 --- a/src/main/java/com/merge/api/resources/filestorage/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountCommonModelScopeDeserializerRequest.Builder.class) public final class LinkedAccountCommonModelScopeDeserializerRequest { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/filestorage/syncstatus/SyncStatusClient.java b/src/main/java/com/merge/api/resources/filestorage/syncstatus/SyncStatusClient.java index 04529079a..ad80aa4cb 100644 --- a/src/main/java/com/merge/api/resources/filestorage/syncstatus/SyncStatusClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/syncstatus/SyncStatusClient.java @@ -56,7 +56,8 @@ public PaginatedSyncStatusList list(SyncStatusListRequest request, RequestOption .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/syncstatus/requests/SyncStatusListRequest.java b/src/main/java/com/merge/api/resources/filestorage/syncstatus/requests/SyncStatusListRequest.java index 5e97a24b2..c5109a05e 100644 --- a/src/main/java/com/merge/api/resources/filestorage/syncstatus/requests/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/syncstatus/requests/SyncStatusListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatusListRequest.Builder.class) public final class SyncStatusListRequest { private final Optional cursor; @@ -102,7 +102,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -113,7 +113,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AccountDetails.java b/src/main/java/com/merge/api/resources/filestorage/types/AccountDetails.java index a3bb5898f..acc440e59 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AccountDetails.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AccountDetails.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetails.Builder.class) public final class AccountDetails { private final Optional id; @@ -248,7 +248,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -259,7 +259,7 @@ public Builder integration(Optional integration) { } public Builder integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -270,7 +270,7 @@ public Builder integrationSlug(Optional integrationSlug) { } public Builder integrationSlug(String integrationSlug) { - this.integrationSlug = Optional.of(integrationSlug); + this.integrationSlug = Optional.ofNullable(integrationSlug); return this; } @@ -281,7 +281,7 @@ public Builder category(Optional category) { } public Builder category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -292,7 +292,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -303,7 +303,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -314,7 +314,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -325,7 +325,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -336,7 +336,7 @@ public Builder webhookListenerUrl(Optional webhookListenerUrl) { } public Builder webhookListenerUrl(String webhookListenerUrl) { - this.webhookListenerUrl = Optional.of(webhookListenerUrl); + this.webhookListenerUrl = Optional.ofNullable(webhookListenerUrl); return this; } @@ -347,7 +347,7 @@ public Builder isDuplicate(Optional isDuplicate) { } public Builder isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -358,7 +358,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(String accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -369,7 +369,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActions.java index 229182f6f..27a66c422 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActions.Builder.class) public final class AccountDetailsAndActions { private final String id; @@ -206,33 +207,33 @@ public static IdStage builder() { } public interface IdStage { - StatusStage id(String id); + StatusStage id(@NotNull String id); Builder from(AccountDetailsAndActions other); } public interface StatusStage { - EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); } public interface EndUserOrganizationNameStage { - EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName); + EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserEmailAddressStage { - WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress); + WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress); } public interface WebhookListenerUrlStage { - AccountTypeStage webhookListenerUrl(String webhookListenerUrl); + AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl); } public interface AccountTypeStage { - CompletedAtStage accountType(String accountType); + CompletedAtStage accountType(@NotNull String accountType); } public interface CompletedAtStage { - _FinalStage completedAt(OffsetDateTime completedAt); + _FinalStage completedAt(@NotNull OffsetDateTime completedAt); } public interface _FinalStage { @@ -324,56 +325,56 @@ public Builder from(AccountDetailsAndActions other) { @java.lang.Override @JsonSetter("id") - public StatusStage id(String id) { + public StatusStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { this.status = status; return this; } @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @java.lang.Override @JsonSetter("end_user_email_address") - public WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress) { + public WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @java.lang.Override @JsonSetter("webhook_listener_url") - public AccountTypeStage webhookListenerUrl(String webhookListenerUrl) { + public AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl) { this.webhookListenerUrl = webhookListenerUrl; return this; } @java.lang.Override @JsonSetter("account_type") - public CompletedAtStage accountType(String accountType) { + public CompletedAtStage accountType(@NotNull String accountType) { this.accountType = accountType; return this; } @java.lang.Override @JsonSetter("completed_at") - public _FinalStage completedAt(OffsetDateTime completedAt) { + public _FinalStage completedAt(@NotNull OffsetDateTime completedAt) { this.completedAt = completedAt; return this; } @java.lang.Override public _FinalStage integration(AccountDetailsAndActionsIntegration integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -390,7 +391,7 @@ public _FinalStage integration(Optional int */ @java.lang.Override public _FinalStage isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -407,7 +408,7 @@ public _FinalStage isDuplicate(Optional isDuplicate) { */ @java.lang.Override public _FinalStage subdomain(String subdomain) { - this.subdomain = Optional.of(subdomain); + this.subdomain = Optional.ofNullable(subdomain); return this; } @@ -420,7 +421,7 @@ public _FinalStage subdomain(Optional subdomain) { @java.lang.Override public _FinalStage endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -433,7 +434,7 @@ public _FinalStage endUserOriginId(Optional endUserOriginId) { @java.lang.Override public _FinalStage statusDetail(String statusDetail) { - this.statusDetail = Optional.of(statusDetail); + this.statusDetail = Optional.ofNullable(statusDetail); return this; } @@ -446,7 +447,7 @@ public _FinalStage statusDetail(Optional statusDetail) { @java.lang.Override public _FinalStage category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.java b/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.java index 7cdf1b814..307d1e46d 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AccountDetailsAndActionsIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActionsIntegration.Builder.class) public final class AccountDetailsAndActionsIntegration { private final String name; @@ -147,17 +148,17 @@ public static NameStage builder() { } public interface NameStage { - ColorStage name(String name); + ColorStage name(@NotNull String name); Builder from(AccountDetailsAndActionsIntegration other); } public interface ColorStage { - SlugStage color(String color); + SlugStage color(@NotNull String color); } public interface SlugStage { - PassthroughAvailableStage slug(String slug); + PassthroughAvailableStage slug(@NotNull String slug); } public interface PassthroughAvailableStage { @@ -225,21 +226,21 @@ public Builder from(AccountDetailsAndActionsIntegration other) { @java.lang.Override @JsonSetter("name") - public ColorStage name(String name) { + public ColorStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("color") - public SlugStage color(String color) { + public SlugStage color(@NotNull String color) { this.color = color; return this; } @java.lang.Override @JsonSetter("slug") - public PassthroughAvailableStage slug(String slug) { + public PassthroughAvailableStage slug(@NotNull String slug) { this.slug = slug; return this; } @@ -253,7 +254,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } @@ -266,7 +267,7 @@ public _FinalStage availableModelOperations(Optional> avail @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -279,7 +280,7 @@ public _FinalStage squareImage(Optional squareImage) { @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AccountIntegration.java b/src/main/java/com/merge/api/resources/filestorage/types/AccountIntegration.java index 881444401..c00b38a50 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AccountIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountIntegration.Builder.class) public final class AccountIntegration { private final String name; @@ -195,7 +196,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); } @@ -288,7 +289,7 @@ public Builder from(AccountIntegration other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } @@ -299,7 +300,7 @@ public _FinalStage name(String name) { */ @java.lang.Override public _FinalStage categoryBetaStatus(Map categoryBetaStatus) { - this.categoryBetaStatus = Optional.of(categoryBetaStatus); + this.categoryBetaStatus = Optional.ofNullable(categoryBetaStatus); return this; } @@ -316,7 +317,7 @@ public _FinalStage categoryBetaStatus(Optional> categoryBe */ @java.lang.Override public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { - this.webhookSetupGuideUrl = Optional.of(webhookSetupGuideUrl); + this.webhookSetupGuideUrl = Optional.ofNullable(webhookSetupGuideUrl); return this; } @@ -333,7 +334,7 @@ public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { */ @java.lang.Override public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls) { - this.apiEndpointsToDocumentationUrls = Optional.of(apiEndpointsToDocumentationUrls); + this.apiEndpointsToDocumentationUrls = Optional.ofNullable(apiEndpointsToDocumentationUrls); return this; } @@ -347,7 +348,7 @@ public _FinalStage apiEndpointsToDocumentationUrls( @java.lang.Override public _FinalStage slug(String slug) { - this.slug = Optional.of(slug); + this.slug = Optional.ofNullable(slug); return this; } @@ -364,7 +365,7 @@ public _FinalStage slug(Optional slug) { */ @java.lang.Override public _FinalStage color(String color) { - this.color = Optional.of(color); + this.color = Optional.ofNullable(color); return this; } @@ -381,7 +382,7 @@ public _FinalStage color(Optional color) { */ @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -398,7 +399,7 @@ public _FinalStage squareImage(Optional squareImage) { */ @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } @@ -415,7 +416,7 @@ public _FinalStage image(Optional image) { */ @java.lang.Override public _FinalStage categories(List categories) { - this.categories = Optional.of(categories); + this.categories = Optional.ofNullable(categories); return this; } @@ -432,7 +433,7 @@ public _FinalStage categories(Optional> categories) { */ @java.lang.Override public _FinalStage abbreviatedName(String abbreviatedName) { - this.abbreviatedName = Optional.of(abbreviatedName); + this.abbreviatedName = Optional.ofNullable(abbreviatedName); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AccountToken.java b/src/main/java/com/merge/api/resources/filestorage/types/AccountToken.java index c8072139a..d275c147f 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AccountToken.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AccountToken.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountToken.Builder.class) public final class AccountToken { private final String accountToken; @@ -71,13 +72,13 @@ public static AccountTokenStage builder() { } public interface AccountTokenStage { - IntegrationStage accountToken(String accountToken); + IntegrationStage accountToken(@NotNull String accountToken); Builder from(AccountToken other); } public interface IntegrationStage { - _FinalStage integration(AccountIntegration integration); + _FinalStage integration(@NotNull AccountIntegration integration); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(AccountToken other) { @java.lang.Override @JsonSetter("account_token") - public IntegrationStage accountToken(String accountToken) { + public IntegrationStage accountToken(@NotNull String accountToken) { this.accountToken = accountToken; return this; } @java.lang.Override @JsonSetter("integration") - public _FinalStage integration(AccountIntegration integration) { + public _FinalStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AdvancedMetadata.java b/src/main/java/com/merge/api/resources/filestorage/types/AdvancedMetadata.java index e07fc6fef..59289b7d7 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AdvancedMetadata.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AdvancedMetadata.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AdvancedMetadata.Builder.class) public final class AdvancedMetadata { private final String id; @@ -119,7 +120,7 @@ public static IdStage builder() { } public interface IdStage { - _FinalStage id(String id); + _FinalStage id(@NotNull String id); Builder from(AdvancedMetadata other); } @@ -180,14 +181,14 @@ public Builder from(AdvancedMetadata other) { @java.lang.Override @JsonSetter("id") - public _FinalStage id(String id) { + public _FinalStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override public _FinalStage fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -200,7 +201,7 @@ public _FinalStage fieldChoices(Optional> fieldChoices) { @java.lang.Override public _FinalStage isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -213,7 +214,7 @@ public _FinalStage isCustom(Optional isCustom) { @java.lang.Override public _FinalStage isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -226,7 +227,7 @@ public _FinalStage isRequired(Optional isRequired) { @java.lang.Override public _FinalStage description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -239,7 +240,7 @@ public _FinalStage description(Optional description) { @java.lang.Override public _FinalStage displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AsyncPassthroughReciept.java b/src/main/java/com/merge/api/resources/filestorage/types/AsyncPassthroughReciept.java index 35648f0a3..5ca3d1df2 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AsyncPassthroughReciept.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AsyncPassthroughReciept.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPassthroughReciept.Builder.class) public final class AsyncPassthroughReciept { private final String asyncPassthroughReceiptId; @@ -62,7 +63,7 @@ public static AsyncPassthroughReceiptIdStage builder() { } public interface AsyncPassthroughReceiptIdStage { - _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId); + _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId); Builder from(AsyncPassthroughReciept other); } @@ -88,7 +89,7 @@ public Builder from(AsyncPassthroughReciept other) { @java.lang.Override @JsonSetter("async_passthrough_receipt_id") - public _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId) { + public _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId) { this.asyncPassthroughReceiptId = asyncPassthroughReceiptId; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AuditLogEvent.java b/src/main/java/com/merge/api/resources/filestorage/types/AuditLogEvent.java index 0cfa80050..a8a631241 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AuditLogEvent.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditLogEvent.Builder.class) public final class AuditLogEvent { private final Optional id; @@ -208,21 +209,21 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(AuditLogEventRole role); + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } public interface IpAddressStage { - EventTypeStage ipAddress(String ipAddress); + EventTypeStage ipAddress(@NotNull String ipAddress); } public interface EventTypeStage { - EventDescriptionStage eventType(AuditLogEventEventType eventType); + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { - _FinalStage eventDescription(String eventDescription); + _FinalStage eventDescription(@NotNull String eventDescription); } public interface _FinalStage { @@ -296,14 +297,14 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(AuditLogEventRole role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @java.lang.Override @JsonSetter("ip_address") - public EventTypeStage ipAddress(String ipAddress) { + public EventTypeStage ipAddress(@NotNull String ipAddress) { this.ipAddress = ipAddress; return this; } @@ -357,21 +358,21 @@ public EventTypeStage ipAddress(String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(AuditLogEventEventType eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @java.lang.Override @JsonSetter("event_description") - public _FinalStage eventDescription(String eventDescription) { + public _FinalStage eventDescription(@NotNull String eventDescription) { this.eventDescription = eventDescription; return this; } @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -388,7 +389,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } @@ -405,7 +406,7 @@ public _FinalStage userEmail(Optional userEmail) { */ @java.lang.Override public _FinalStage userName(String userName) { - this.userName = Optional.of(userName); + this.userName = Optional.ofNullable(userName); return this; } @@ -418,7 +419,7 @@ public _FinalStage userName(Optional userName) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/AvailableActions.java b/src/main/java/com/merge/api/resources/filestorage/types/AvailableActions.java index d1384f15f..6865141f4 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/AvailableActions.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/AvailableActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AvailableActions.Builder.class) public final class AvailableActions { private final AccountIntegration integration; @@ -87,7 +88,7 @@ public static IntegrationStage builder() { } public interface IntegrationStage { - PassthroughAvailableStage integration(AccountIntegration integration); + PassthroughAvailableStage integration(@NotNull AccountIntegration integration); Builder from(AvailableActions other); } @@ -127,7 +128,7 @@ public Builder from(AvailableActions other) { @java.lang.Override @JsonSetter("integration") - public PassthroughAvailableStage integration(AccountIntegration integration) { + public PassthroughAvailableStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } @@ -141,7 +142,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopeApi.java index 356e41934..273346ba3 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopeApi.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopeApi.Builder.class) public final class CommonModelScopeApi { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopesBodyRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopesBodyRequest.java index 191a4e307..84275974c 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopesBodyRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/CommonModelScopesBodyRequest.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopesBodyRequest.Builder.class) public final class CommonModelScopesBodyRequest { private final String modelId; @@ -87,7 +88,7 @@ public static ModelIdStage builder() { } public interface ModelIdStage { - _FinalStage modelId(String modelId); + _FinalStage modelId(@NotNull String modelId); Builder from(CommonModelScopesBodyRequest other); } @@ -131,7 +132,7 @@ public Builder from(CommonModelScopesBodyRequest other) { @java.lang.Override @JsonSetter("model_id") - public _FinalStage modelId(String modelId) { + public _FinalStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/DataPassthroughRequest.java index 409556bb2..69d77ddfe 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/DataPassthroughRequest.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DataPassthroughRequest.Builder.class) public final class DataPassthroughRequest { private final MethodEnum method; @@ -164,13 +165,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(MethodEnum method); + PathStage method(@NotNull MethodEnum method); Builder from(DataPassthroughRequest other); } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); } public interface _FinalStage { @@ -239,7 +240,7 @@ public Builder from(DataPassthroughRequest other) { @java.lang.Override @JsonSetter("method") - public PathStage method(MethodEnum method) { + public PathStage method(@NotNull MethodEnum method) { this.method = method; return this; } @@ -250,7 +251,7 @@ public PathStage method(MethodEnum method) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @@ -261,7 +262,7 @@ public _FinalStage path(String path) { */ @java.lang.Override public _FinalStage normalizeResponse(Boolean normalizeResponse) { - this.normalizeResponse = Optional.of(normalizeResponse); + this.normalizeResponse = Optional.ofNullable(normalizeResponse); return this; } @@ -274,7 +275,7 @@ public _FinalStage normalizeResponse(Optional normalizeResponse) { @java.lang.Override public _FinalStage requestFormat(RequestFormatEnum requestFormat) { - this.requestFormat = Optional.of(requestFormat); + this.requestFormat = Optional.ofNullable(requestFormat); return this; } @@ -291,7 +292,7 @@ public _FinalStage requestFormat(Optional requestFormat) { */ @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -308,7 +309,7 @@ public _FinalStage headers(Optional> headers) { */ @java.lang.Override public _FinalStage multipartFormData(List multipartFormData) { - this.multipartFormData = Optional.of(multipartFormData); + this.multipartFormData = Optional.ofNullable(multipartFormData); return this; } @@ -325,7 +326,7 @@ public _FinalStage multipartFormData(Optional> m */ @java.lang.Override public _FinalStage data(String data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } @@ -342,7 +343,7 @@ public _FinalStage data(Optional data) { */ @java.lang.Override public _FinalStage baseUrlOverride(String baseUrlOverride) { - this.baseUrlOverride = Optional.of(baseUrlOverride); + this.baseUrlOverride = Optional.ofNullable(baseUrlOverride); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/DebugModeLog.java b/src/main/java/com/merge/api/resources/filestorage/types/DebugModeLog.java index acd66f4e5..90d389766 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/DebugModeLog.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/DebugModeLog.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModeLog.Builder.class) public final class DebugModeLog { private final String logId; @@ -84,17 +85,17 @@ public static LogIdStage builder() { } public interface LogIdStage { - DashboardViewStage logId(String logId); + DashboardViewStage logId(@NotNull String logId); Builder from(DebugModeLog other); } public interface DashboardViewStage { - LogSummaryStage dashboardView(String dashboardView); + LogSummaryStage dashboardView(@NotNull String dashboardView); } public interface LogSummaryStage { - _FinalStage logSummary(DebugModelLogSummary logSummary); + _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary); } public interface _FinalStage { @@ -124,21 +125,21 @@ public Builder from(DebugModeLog other) { @java.lang.Override @JsonSetter("log_id") - public DashboardViewStage logId(String logId) { + public DashboardViewStage logId(@NotNull String logId) { this.logId = logId; return this; } @java.lang.Override @JsonSetter("dashboard_view") - public LogSummaryStage dashboardView(String dashboardView) { + public LogSummaryStage dashboardView(@NotNull String dashboardView) { this.dashboardView = dashboardView; return this; } @java.lang.Override @JsonSetter("log_summary") - public _FinalStage logSummary(DebugModelLogSummary logSummary) { + public _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary) { this.logSummary = logSummary; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/DebugModelLogSummary.java b/src/main/java/com/merge/api/resources/filestorage/types/DebugModelLogSummary.java index b387b2923..ccf96bd22 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/DebugModelLogSummary.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/DebugModelLogSummary.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModelLogSummary.Builder.class) public final class DebugModelLogSummary { private final String url; @@ -78,13 +79,13 @@ public static UrlStage builder() { } public interface UrlStage { - MethodStage url(String url); + MethodStage url(@NotNull String url); Builder from(DebugModelLogSummary other); } public interface MethodStage { - StatusCodeStage method(String method); + StatusCodeStage method(@NotNull String method); } public interface StatusCodeStage { @@ -118,14 +119,14 @@ public Builder from(DebugModelLogSummary other) { @java.lang.Override @JsonSetter("url") - public MethodStage url(String url) { + public MethodStage url(@NotNull String url) { this.url = url; return this; } @java.lang.Override @JsonSetter("method") - public StatusCodeStage method(String method) { + public StatusCodeStage method(@NotNull String method) { this.method = method; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/Drive.java b/src/main/java/com/merge/api/resources/filestorage/types/Drive.java index 51264500a..8bca14b9a 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/Drive.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/Drive.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Drive.Builder.class) public final class Drive { private final Optional id; @@ -237,7 +237,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -248,7 +248,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -259,7 +259,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -270,7 +270,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -281,7 +281,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -292,7 +292,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -303,7 +303,7 @@ public Builder driveUrl(Optional driveUrl) { } public Builder driveUrl(String driveUrl) { - this.driveUrl = Optional.of(driveUrl); + this.driveUrl = Optional.ofNullable(driveUrl); return this; } @@ -314,7 +314,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -325,7 +325,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -336,7 +336,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/ErrorValidationProblem.java b/src/main/java/com/merge/api/resources/filestorage/types/ErrorValidationProblem.java index ea938034e..ddd605854 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/ErrorValidationProblem.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/ErrorValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ErrorValidationProblem.Builder.class) public final class ErrorValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(ErrorValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(ErrorValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApi.java b/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApi.java index 68050de2f..87641e254 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApi.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApi.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApi.Builder.class) public final class ExternalTargetFieldApi { private final Optional name; @@ -110,7 +110,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -121,7 +121,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -132,7 +132,7 @@ public Builder isMapped(Optional isMapped) { } public Builder isMapped(String isMapped) { - this.isMapped = Optional.of(isMapped); + this.isMapped = Optional.ofNullable(isMapped); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApiResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApiResponse.java index 1255ac359..c8cecda03 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/ExternalTargetFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApiResponse.Builder.class) public final class ExternalTargetFieldApiResponse { private final Optional> file; @@ -139,7 +139,7 @@ public Builder file(Optional> file) { } public Builder file(List file) { - this.file = Optional.of(file); + this.file = Optional.ofNullable(file); return this; } @@ -150,7 +150,7 @@ public Builder folder(Optional> folder) { } public Builder folder(List folder) { - this.folder = Optional.of(folder); + this.folder = Optional.ofNullable(folder); return this; } @@ -161,7 +161,7 @@ public Builder drive(Optional> drive) { } public Builder drive(List drive) { - this.drive = Optional.of(drive); + this.drive = Optional.ofNullable(drive); return this; } @@ -172,7 +172,7 @@ public Builder group(Optional> group) { } public Builder group(List group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -183,7 +183,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstance.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstance.java index f9c4a298b..71114c2e6 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstance.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstance.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstance.Builder.class) public final class FieldMappingApiInstance { private final Optional id; @@ -125,7 +125,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -136,7 +136,7 @@ public Builder isIntegrationWide(Optional isIntegrationWide) { } public Builder isIntegrationWide(Boolean isIntegrationWide) { - this.isIntegrationWide = Optional.of(isIntegrationWide); + this.isIntegrationWide = Optional.ofNullable(isIntegrationWide); return this; } @@ -147,7 +147,7 @@ public Builder targetField(Optional targetFi } public Builder targetField(FieldMappingApiInstanceTargetField targetField) { - this.targetField = Optional.of(targetField); + this.targetField = Optional.ofNullable(targetField); return this; } @@ -158,7 +158,7 @@ public Builder remoteField(Optional remoteFi } public Builder remoteField(FieldMappingApiInstanceRemoteField remoteField) { - this.remoteField = Optional.of(remoteField); + this.remoteField = Optional.ofNullable(remoteField); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.java index dffc6db8e..f863bec58 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteField.Builder.class) public final class FieldMappingApiInstanceRemoteField { private final Optional remoteKeyName; @@ -88,7 +89,8 @@ public static RemoteEndpointInfoStage builder() { } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); Builder from(FieldMappingApiInstanceRemoteField other); } @@ -128,14 +130,15 @@ public Builder from(FieldMappingApiInstanceRemoteField other) { @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage schema(Map schema) { - this.schema = Optional.of(schema); + this.schema = Optional.ofNullable(schema); return this; } @@ -148,7 +151,7 @@ public _FinalStage schema(Optional> schema) { @java.lang.Override public _FinalStage remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java index 113d79187..68fbe7fb1 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Builder.class) public final class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { private final Optional method; @@ -114,7 +114,7 @@ public Builder method(Optional method) { } public Builder method(String method) { - this.method = Optional.of(method); + this.method = Optional.ofNullable(method); return this; } @@ -125,7 +125,7 @@ public Builder urlPath(Optional urlPath) { } public Builder urlPath(String urlPath) { - this.urlPath = Optional.of(urlPath); + this.urlPath = Optional.ofNullable(urlPath); return this; } @@ -136,7 +136,7 @@ public Builder fieldTraversalPath(Optional> fieldTraversalPath) { } public Builder fieldTraversalPath(List fieldTraversalPath) { - this.fieldTraversalPath = Optional.of(fieldTraversalPath); + this.fieldTraversalPath = Optional.ofNullable(fieldTraversalPath); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceResponse.java index da1137663..7438196df 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceResponse.Builder.class) public final class FieldMappingApiInstanceResponse { private final Optional> file; @@ -139,7 +139,7 @@ public Builder file(Optional> file) { } public Builder file(List file) { - this.file = Optional.of(file); + this.file = Optional.ofNullable(file); return this; } @@ -150,7 +150,7 @@ public Builder folder(Optional> folder) { } public Builder folder(List folder) { - this.folder = Optional.of(folder); + this.folder = Optional.ofNullable(folder); return this; } @@ -161,7 +161,7 @@ public Builder drive(Optional> drive) { } public Builder drive(List drive) { - this.drive = Optional.of(drive); + this.drive = Optional.ofNullable(drive); return this; } @@ -172,7 +172,7 @@ public Builder group(Optional> group) { } public Builder group(List group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -183,7 +183,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceTargetField.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceTargetField.java index d71adefb2..ec4625e0e 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceTargetField.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingApiInstanceTargetField.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceTargetField.Builder.class) public final class FieldMappingApiInstanceTargetField { private final String name; @@ -82,13 +83,13 @@ public static NameStage builder() { } public interface NameStage { - DescriptionStage name(String name); + DescriptionStage name(@NotNull String name); Builder from(FieldMappingApiInstanceTargetField other); } public interface DescriptionStage { - IsOrganizationWideStage description(String description); + IsOrganizationWideStage description(@NotNull String description); } public interface IsOrganizationWideStage { @@ -122,14 +123,14 @@ public Builder from(FieldMappingApiInstanceTargetField other) { @java.lang.Override @JsonSetter("name") - public DescriptionStage name(String name) { + public DescriptionStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("description") - public IsOrganizationWideStage description(String description) { + public IsOrganizationWideStage description(@NotNull String description) { this.description = description; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingInstanceResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingInstanceResponse.java index b80f556f9..20b12661f 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldMappingInstanceResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingInstanceResponse.Builder.class) public final class FieldMappingInstanceResponse { private final FieldMappingApiInstance model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FieldMappingApiInstance model); + _FinalStage model(@NotNull FieldMappingApiInstance model); Builder from(FieldMappingInstanceResponse other); } @@ -149,14 +150,14 @@ public Builder from(FieldMappingInstanceResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FieldMappingApiInstance model) { + public _FinalStage model(@NotNull FieldMappingApiInstance model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializer.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializer.java index d5a1271c9..5e6143022 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializer.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializer.Builder.class) public final class FieldPermissionDeserializer { private final Optional> enabledFields; @@ -100,7 +100,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -111,7 +111,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializerRequest.java index 3efd8412e..f3579fe46 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FieldPermissionDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializerRequest.Builder.class) public final class FieldPermissionDeserializerRequest { private final Optional> enabledFields; @@ -101,7 +101,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -112,7 +112,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/File.java b/src/main/java/com/merge/api/resources/filestorage/types/File.java index 42cf38fd8..a33712511 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/File.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/File.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = File.Builder.class) public final class File { private final Optional id; @@ -373,7 +373,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -384,7 +384,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -395,7 +395,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -406,7 +406,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -417,7 +417,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -428,7 +428,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -439,7 +439,7 @@ public Builder fileThumbnailUrl(Optional fileThumbnailUrl) { } public Builder fileThumbnailUrl(String fileThumbnailUrl) { - this.fileThumbnailUrl = Optional.of(fileThumbnailUrl); + this.fileThumbnailUrl = Optional.ofNullable(fileThumbnailUrl); return this; } @@ -450,7 +450,7 @@ public Builder size(Optional size) { } public Builder size(Long size) { - this.size = Optional.of(size); + this.size = Optional.ofNullable(size); return this; } @@ -461,7 +461,7 @@ public Builder mimeType(Optional mimeType) { } public Builder mimeType(String mimeType) { - this.mimeType = Optional.of(mimeType); + this.mimeType = Optional.ofNullable(mimeType); return this; } @@ -472,7 +472,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -483,7 +483,7 @@ public Builder folder(Optional folder) { } public Builder folder(FileFolder folder) { - this.folder = Optional.of(folder); + this.folder = Optional.ofNullable(folder); return this; } @@ -494,7 +494,7 @@ public Builder permissions(Optional permissions) { } public Builder permissions(FilePermissions permissions) { - this.permissions = Optional.of(permissions); + this.permissions = Optional.ofNullable(permissions); return this; } @@ -505,7 +505,7 @@ public Builder drive(Optional drive) { } public Builder drive(FileDrive drive) { - this.drive = Optional.of(drive); + this.drive = Optional.ofNullable(drive); return this; } @@ -516,7 +516,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -527,7 +527,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -538,7 +538,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -549,7 +549,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -560,7 +560,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FileRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/FileRequest.java index b42e0bf08..396483ee1 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FileRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FileRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FileRequest.Builder.class) public final class FileRequest { private final Optional name; @@ -255,7 +255,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -266,7 +266,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -277,7 +277,7 @@ public Builder fileThumbnailUrl(Optional fileThumbnailUrl) { } public Builder fileThumbnailUrl(String fileThumbnailUrl) { - this.fileThumbnailUrl = Optional.of(fileThumbnailUrl); + this.fileThumbnailUrl = Optional.ofNullable(fileThumbnailUrl); return this; } @@ -288,7 +288,7 @@ public Builder size(Optional size) { } public Builder size(Long size) { - this.size = Optional.of(size); + this.size = Optional.ofNullable(size); return this; } @@ -299,7 +299,7 @@ public Builder mimeType(Optional mimeType) { } public Builder mimeType(String mimeType) { - this.mimeType = Optional.of(mimeType); + this.mimeType = Optional.ofNullable(mimeType); return this; } @@ -310,7 +310,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -321,7 +321,7 @@ public Builder folder(Optional folder) { } public Builder folder(FileRequestFolder folder) { - this.folder = Optional.of(folder); + this.folder = Optional.ofNullable(folder); return this; } @@ -332,7 +332,7 @@ public Builder permissions(Optional permissions) { } public Builder permissions(FileRequestPermissions permissions) { - this.permissions = Optional.of(permissions); + this.permissions = Optional.ofNullable(permissions); return this; } @@ -343,7 +343,7 @@ public Builder drive(Optional drive) { } public Builder drive(FileRequestDrive drive) { - this.drive = Optional.of(drive); + this.drive = Optional.ofNullable(drive); return this; } @@ -354,7 +354,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -365,7 +365,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFileResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFileResponse.java index 0b93beac6..6c0d3716c 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFileResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFileResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FileStorageFileResponse.Builder.class) public final class FileStorageFileResponse { private final File model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(File model); + _FinalStage model(@NotNull File model); Builder from(FileStorageFileResponse other); } @@ -149,14 +150,14 @@ public Builder from(FileStorageFileResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(File model) { + public _FinalStage model(@NotNull File model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFolderResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFolderResponse.java index 61ace9d44..8ddb79a41 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFolderResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FileStorageFolderResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FileStorageFolderResponse.Builder.class) public final class FileStorageFolderResponse { private final Folder model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Folder model); + _FinalStage model(@NotNull Folder model); Builder from(FileStorageFolderResponse other); } @@ -149,14 +150,14 @@ public Builder from(FileStorageFolderResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Folder model) { + public _FinalStage model(@NotNull Folder model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/Folder.java b/src/main/java/com/merge/api/resources/filestorage/types/Folder.java index 80792e7f5..dc528a05d 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/Folder.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/Folder.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Folder.Builder.class) public final class Folder { private final Optional id; @@ -339,7 +339,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -350,7 +350,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -361,7 +361,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -372,7 +372,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -383,7 +383,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -394,7 +394,7 @@ public Builder folderUrl(Optional folderUrl) { } public Builder folderUrl(String folderUrl) { - this.folderUrl = Optional.of(folderUrl); + this.folderUrl = Optional.ofNullable(folderUrl); return this; } @@ -405,7 +405,7 @@ public Builder size(Optional size) { } public Builder size(Long size) { - this.size = Optional.of(size); + this.size = Optional.ofNullable(size); return this; } @@ -416,7 +416,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -427,7 +427,7 @@ public Builder parentFolder(Optional parentFolder) { } public Builder parentFolder(FolderParentFolder parentFolder) { - this.parentFolder = Optional.of(parentFolder); + this.parentFolder = Optional.ofNullable(parentFolder); return this; } @@ -438,7 +438,7 @@ public Builder drive(Optional drive) { } public Builder drive(FolderDrive drive) { - this.drive = Optional.of(drive); + this.drive = Optional.ofNullable(drive); return this; } @@ -449,7 +449,7 @@ public Builder permissions(Optional permissions) { } public Builder permissions(FolderPermissions permissions) { - this.permissions = Optional.of(permissions); + this.permissions = Optional.ofNullable(permissions); return this; } @@ -460,7 +460,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -471,7 +471,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -482,7 +482,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -493,7 +493,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -504,7 +504,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/FolderRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/FolderRequest.java index 36c800ee6..5c1dc2c7f 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/FolderRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/FolderRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FolderRequest.Builder.class) public final class FolderRequest { private final Optional name; @@ -221,7 +221,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -232,7 +232,7 @@ public Builder folderUrl(Optional folderUrl) { } public Builder folderUrl(String folderUrl) { - this.folderUrl = Optional.of(folderUrl); + this.folderUrl = Optional.ofNullable(folderUrl); return this; } @@ -243,7 +243,7 @@ public Builder size(Optional size) { } public Builder size(Long size) { - this.size = Optional.of(size); + this.size = Optional.ofNullable(size); return this; } @@ -254,7 +254,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -265,7 +265,7 @@ public Builder parentFolder(Optional parentFolder) { } public Builder parentFolder(FolderRequestParentFolder parentFolder) { - this.parentFolder = Optional.of(parentFolder); + this.parentFolder = Optional.ofNullable(parentFolder); return this; } @@ -276,7 +276,7 @@ public Builder drive(Optional drive) { } public Builder drive(FolderRequestDrive drive) { - this.drive = Optional.of(drive); + this.drive = Optional.ofNullable(drive); return this; } @@ -287,7 +287,7 @@ public Builder permissions(Optional permissions) { } public Builder permissions(FolderRequestPermissions permissions) { - this.permissions = Optional.of(permissions); + this.permissions = Optional.ofNullable(permissions); return this; } @@ -298,7 +298,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -309,7 +309,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/Group.java b/src/main/java/com/merge/api/resources/filestorage/types/Group.java index 36ce7916f..8dff8e855 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/Group.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/Group.java @@ -21,7 +21,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Group.Builder.class) public final class Group { private final Optional id; @@ -238,7 +238,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -249,7 +249,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -260,7 +260,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -271,7 +271,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -282,7 +282,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -310,7 +310,7 @@ public Builder childGroups(Optional> childGroups) { } public Builder childGroups(List childGroups) { - this.childGroups = Optional.of(childGroups); + this.childGroups = Optional.ofNullable(childGroups); return this; } @@ -321,7 +321,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -332,7 +332,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -343,7 +343,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.java b/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.java index c4c4e4eee..5fd34e25c 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializer.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializer.Builder.class) public final class IndividualCommonModelScopeDeserializer { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializer other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializer other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializer fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional fieldP @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.java index 7c828cf85..3bd1c5aa0 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/IndividualCommonModelScopeDeserializerRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializerRequest.Builder.class) public final class IndividualCommonModelScopeDeserializerRequest { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializerRequest other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializerRequest other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializerRequest fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/Issue.java b/src/main/java/com/merge/api/resources/filestorage/types/Issue.java index a9a9ba7f8..1dcd8706f 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/Issue.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/Issue.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Issue.Builder.class) public final class Issue { private final Optional id; @@ -154,7 +155,7 @@ public static ErrorDescriptionStage builder() { } public interface ErrorDescriptionStage { - _FinalStage errorDescription(String errorDescription); + _FinalStage errorDescription(@NotNull String errorDescription); Builder from(Issue other); } @@ -229,14 +230,14 @@ public Builder from(Issue other) { @java.lang.Override @JsonSetter("error_description") - public _FinalStage errorDescription(String errorDescription) { + public _FinalStage errorDescription(@NotNull String errorDescription) { this.errorDescription = errorDescription; return this; } @java.lang.Override public _FinalStage errorDetails(List errorDetails) { - this.errorDetails = Optional.of(errorDetails); + this.errorDetails = Optional.ofNullable(errorDetails); return this; } @@ -249,7 +250,7 @@ public _FinalStage errorDetails(Optional> errorDetails) { @java.lang.Override public _FinalStage isMuted(Boolean isMuted) { - this.isMuted = Optional.of(isMuted); + this.isMuted = Optional.ofNullable(isMuted); return this; } @@ -262,7 +263,7 @@ public _FinalStage isMuted(Optional isMuted) { @java.lang.Override public _FinalStage lastIncidentTime(OffsetDateTime lastIncidentTime) { - this.lastIncidentTime = Optional.of(lastIncidentTime); + this.lastIncidentTime = Optional.ofNullable(lastIncidentTime); return this; } @@ -275,7 +276,7 @@ public _FinalStage lastIncidentTime(Optional lastIncidentTime) { @java.lang.Override public _FinalStage firstIncidentTime(OffsetDateTime firstIncidentTime) { - this.firstIncidentTime = Optional.of(firstIncidentTime); + this.firstIncidentTime = Optional.ofNullable(firstIncidentTime); return this; } @@ -288,7 +289,7 @@ public _FinalStage firstIncidentTime(Optional firstIncidentTime) @java.lang.Override public _FinalStage endUser(Map endUser) { - this.endUser = Optional.of(endUser); + this.endUser = Optional.ofNullable(endUser); return this; } @@ -309,7 +310,7 @@ public _FinalStage endUser(Optional> endUser) { */ @java.lang.Override public _FinalStage status(IssueStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -322,7 +323,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/LinkToken.java b/src/main/java/com/merge/api/resources/filestorage/types/LinkToken.java index fcf32341a..0ba7623bb 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/LinkToken.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/LinkToken.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkToken.Builder.class) public final class LinkToken { private final String linkToken; @@ -86,7 +87,7 @@ public static LinkTokenStage builder() { } public interface LinkTokenStage { - _FinalStage linkToken(String linkToken); + _FinalStage linkToken(@NotNull String linkToken); Builder from(LinkToken other); } @@ -126,14 +127,14 @@ public Builder from(LinkToken other) { @java.lang.Override @JsonSetter("link_token") - public _FinalStage linkToken(String linkToken) { + public _FinalStage linkToken(@NotNull String linkToken) { this.linkToken = linkToken; return this; } @java.lang.Override public _FinalStage magicLinkUrl(String magicLinkUrl) { - this.magicLinkUrl = Optional.of(magicLinkUrl); + this.magicLinkUrl = Optional.ofNullable(magicLinkUrl); return this; } @@ -146,7 +147,7 @@ public _FinalStage magicLinkUrl(Optional magicLinkUrl) { @java.lang.Override public _FinalStage integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/LinkedAccountStatus.java b/src/main/java/com/merge/api/resources/filestorage/types/LinkedAccountStatus.java index 58feee084..6622fd700 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/LinkedAccountStatus.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/LinkedAccountStatus.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountStatus.Builder.class) public final class LinkedAccountStatus { private final String linkedAccountStatus; @@ -71,7 +72,7 @@ public static LinkedAccountStatusStage builder() { } public interface LinkedAccountStatusStage { - CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus); + CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus); Builder from(LinkedAccountStatus other); } @@ -104,7 +105,7 @@ public Builder from(LinkedAccountStatus other) { @java.lang.Override @JsonSetter("linked_account_status") - public CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus) { + public CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus) { this.linkedAccountStatus = linkedAccountStatus; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/MetaResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/MetaResponse.java index 46a30e26a..e3699b18e 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/MetaResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/MetaResponse.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MetaResponse.Builder.class) public final class MetaResponse { private final Map requestSchema; @@ -184,7 +184,7 @@ public _FinalStage hasRequiredLinkedAccountParams(boolean hasRequiredLinkedAccou @java.lang.Override public _FinalStage status(LinkedAccountStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -197,7 +197,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage remoteFieldClasses(Map remoteFieldClasses) { - this.remoteFieldClasses = Optional.of(remoteFieldClasses); + this.remoteFieldClasses = Optional.ofNullable(remoteFieldClasses); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/ModelOperation.java b/src/main/java/com/merge/api/resources/filestorage/types/ModelOperation.java index 0549535bb..e47821240 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/ModelOperation.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/ModelOperation.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelOperation.Builder.class) public final class ModelOperation { private final String modelName; @@ -98,7 +99,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(ModelOperation other); } @@ -151,7 +152,7 @@ public Builder from(ModelOperation other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializer.java b/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializer.java index 9e8aaaafb..7317bdbb6 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializer.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializer.Builder.class) public final class ModelPermissionDeserializer { private final Optional isEnabled; @@ -84,7 +84,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializerRequest.java index 7013a857d..576b58e3a 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/ModelPermissionDeserializerRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializerRequest.Builder.class) public final class ModelPermissionDeserializerRequest { private final Optional isEnabled; @@ -85,7 +85,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/MultipartFormFieldRequest.java index e54cae77f..b982e3d76 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/MultipartFormFieldRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MultipartFormFieldRequest.Builder.class) public final class MultipartFormFieldRequest { private final String name; @@ -126,13 +127,13 @@ public static NameStage builder() { } public interface NameStage { - DataStage name(String name); + DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { - _FinalStage data(String data); + _FinalStage data(@NotNull String data); } public interface _FinalStage { @@ -184,7 +185,7 @@ public Builder from(MultipartFormFieldRequest other) { */ @java.lang.Override @JsonSetter("name") - public DataStage name(String name) { + public DataStage name(@NotNull String name) { this.name = name; return this; } @@ -195,7 +196,7 @@ public DataStage name(String name) { */ @java.lang.Override @JsonSetter("data") - public _FinalStage data(String data) { + public _FinalStage data(@NotNull String data) { this.data = data; return this; } @@ -206,7 +207,7 @@ public _FinalStage data(String data) { */ @java.lang.Override public _FinalStage contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -223,7 +224,7 @@ public _FinalStage contentType(Optional contentType) { */ @java.lang.Override public _FinalStage fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -245,7 +246,7 @@ public _FinalStage fileName(Optional fileName) { */ @java.lang.Override public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { - this.encoding = Optional.of(encoding); + this.encoding = Optional.ofNullable(encoding); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.java index 5b412964d..d9b25c3e8 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAccountDetailsAndActionsList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountDetailsAndActionsList.Builder.class) public final class PaginatedAccountDetailsAndActionsList { private final Optional next; @@ -112,7 +112,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -123,7 +123,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -134,7 +134,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAuditLogEventList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAuditLogEventList.java index 7c4f5b50e..b8a64979e 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAuditLogEventList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedAuditLogEventList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAuditLogEventList.Builder.class) public final class PaginatedAuditLogEventList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedDriveList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedDriveList.java index 886af1b59..030ecf685 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedDriveList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedDriveList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedDriveList.Builder.class) public final class PaginatedDriveList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFileList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFileList.java index c27de27b0..904e23c88 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFileList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFileList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedFileList.Builder.class) public final class PaginatedFileList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFolderList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFolderList.java index 56da881f6..d8e40774d 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFolderList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedFolderList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedFolderList.Builder.class) public final class PaginatedFolderList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedGroupList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedGroupList.java index e932b6657..91a33672a 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedGroupList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedGroupList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedGroupList.Builder.class) public final class PaginatedGroupList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedIssueList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedIssueList.java index edc2f7590..fc2db8dd3 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedIssueList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedIssueList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedIssueList.Builder.class) public final class PaginatedIssueList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedSyncStatusList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedSyncStatusList.java index 090468e73..3b57618d3 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedSyncStatusList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedSyncStatusList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedSyncStatusList.Builder.class) public final class PaginatedSyncStatusList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedUserList.java b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedUserList.java index 60d0cdc6f..45d845336 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PaginatedUserList.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PaginatedUserList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedUserList.Builder.class) public final class PaginatedUserList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/Permission.java b/src/main/java/com/merge/api/resources/filestorage/types/Permission.java index 3add86cc5..add248c84 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/Permission.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/Permission.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Permission.Builder.class) public final class Permission { private final Optional id; @@ -207,7 +207,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -218,7 +218,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -229,7 +229,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -240,7 +240,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -251,7 +251,7 @@ public Builder user(Optional user) { } public Builder user(PermissionUser user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -262,7 +262,7 @@ public Builder group(Optional group) { } public Builder group(PermissionGroup group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -273,7 +273,7 @@ public Builder type(Optional type) { } public Builder type(PermissionType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -284,7 +284,7 @@ public Builder roles(Optional>> roles) { } public Builder roles(List> roles) { - this.roles = Optional.of(roles); + this.roles = Optional.ofNullable(roles); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/PermissionRequest.java b/src/main/java/com/merge/api/resources/filestorage/types/PermissionRequest.java index 4dab3f1ad..aae51beb4 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/PermissionRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/PermissionRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PermissionRequest.Builder.class) public final class PermissionRequest { private final Optional remoteId; @@ -194,7 +194,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -205,7 +205,7 @@ public Builder user(Optional user) { } public Builder user(PermissionRequestUser user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -216,7 +216,7 @@ public Builder group(Optional group) { } public Builder group(PermissionRequestGroup group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -227,7 +227,7 @@ public Builder type(Optional type) { } public Builder type(PermissionRequestType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -238,7 +238,7 @@ public Builder roles(Optional>> roles) } public Builder roles(List> roles) { - this.roles = Optional.of(roles); + this.roles = Optional.ofNullable(roles); return this; } @@ -249,7 +249,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -260,7 +260,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/RemoteData.java b/src/main/java/com/merge/api/resources/filestorage/types/RemoteData.java index 84186c56c..5f7dee53c 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/RemoteData.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/RemoteData.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteData.Builder.class) public final class RemoteData { private final String path; @@ -76,7 +77,7 @@ public static PathStage builder() { } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); Builder from(RemoteData other); } @@ -113,14 +114,14 @@ public Builder from(RemoteData other) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @java.lang.Override public _FinalStage data(JsonNode data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/RemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/filestorage/types/RemoteEndpointInfo.java index 2a2ca6ea4..a57b0fd1a 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/RemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/RemoteEndpointInfo.java @@ -18,8 +18,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteEndpointInfo.Builder.class) public final class RemoteEndpointInfo { private final String method; @@ -88,13 +89,13 @@ public static MethodStage builder() { } public interface MethodStage { - UrlPathStage method(String method); + UrlPathStage method(@NotNull String method); Builder from(RemoteEndpointInfo other); } public interface UrlPathStage { - _FinalStage urlPath(String urlPath); + _FinalStage urlPath(@NotNull String urlPath); } public interface _FinalStage { @@ -130,14 +131,14 @@ public Builder from(RemoteEndpointInfo other) { @java.lang.Override @JsonSetter("method") - public UrlPathStage method(String method) { + public UrlPathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("url_path") - public _FinalStage urlPath(String urlPath) { + public _FinalStage urlPath(@NotNull String urlPath) { this.urlPath = urlPath; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApi.java b/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApi.java index 07ad116c0..544c1cb45 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApi.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApi.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApi.Builder.class) public final class RemoteFieldApi { private final Map schema; @@ -125,13 +126,13 @@ public static RemoteKeyNameStage builder() { } public interface RemoteKeyNameStage { - RemoteEndpointInfoStage remoteKeyName(String remoteKeyName); + RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName); Builder from(RemoteFieldApi other); } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo); } public interface _FinalStage { @@ -188,21 +189,21 @@ public Builder from(RemoteFieldApi other) { @java.lang.Override @JsonSetter("remote_key_name") - public RemoteEndpointInfoStage remoteKeyName(String remoteKeyName) { + public RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName) { this.remoteKeyName = remoteKeyName; return this; } @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage coverage(RemoteFieldApiCoverage coverage) { - this.coverage = Optional.of(coverage); + this.coverage = Optional.ofNullable(coverage); return this; } @@ -215,7 +216,7 @@ public _FinalStage coverage(Optional coverage) { @java.lang.Override public _FinalStage advancedMetadata(AdvancedMetadata advancedMetadata) { - this.advancedMetadata = Optional.of(advancedMetadata); + this.advancedMetadata = Optional.ofNullable(advancedMetadata); return this; } @@ -228,7 +229,7 @@ public _FinalStage advancedMetadata(Optional advancedMetadata) @java.lang.Override public _FinalStage exampleValues(List exampleValues) { - this.exampleValues = Optional.of(exampleValues); + this.exampleValues = Optional.ofNullable(exampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApiResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApiResponse.java index 5baa790ea..9464902a6 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/RemoteFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApiResponse.Builder.class) public final class RemoteFieldApiResponse { private final Optional> file; @@ -139,7 +139,7 @@ public Builder file(Optional> file) { } public Builder file(List file) { - this.file = Optional.of(file); + this.file = Optional.ofNullable(file); return this; } @@ -150,7 +150,7 @@ public Builder folder(Optional> folder) { } public Builder folder(List folder) { - this.folder = Optional.of(folder); + this.folder = Optional.ofNullable(folder); return this; } @@ -161,7 +161,7 @@ public Builder drive(Optional> drive) { } public Builder drive(List drive) { - this.drive = Optional.of(drive); + this.drive = Optional.ofNullable(drive); return this; } @@ -172,7 +172,7 @@ public Builder group(Optional> group) { } public Builder group(List group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -183,7 +183,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/RemoteKey.java b/src/main/java/com/merge/api/resources/filestorage/types/RemoteKey.java index 728b74b63..2b7882b45 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/RemoteKey.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/RemoteKey.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKey.Builder.class) public final class RemoteKey { private final String name; @@ -70,13 +71,13 @@ public static NameStage builder() { } public interface NameStage { - KeyStage name(String name); + KeyStage name(@NotNull String name); Builder from(RemoteKey other); } public interface KeyStage { - _FinalStage key(String key); + _FinalStage key(@NotNull String key); } public interface _FinalStage { @@ -103,14 +104,14 @@ public Builder from(RemoteKey other) { @java.lang.Override @JsonSetter("name") - public KeyStage name(String name) { + public KeyStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("key") - public _FinalStage key(String key) { + public _FinalStage key(@NotNull String key) { this.key = key; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/RemoteResponse.java b/src/main/java/com/merge/api/resources/filestorage/types/RemoteResponse.java index 58184efe2..5dcc62a3b 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/RemoteResponse.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteResponse.Builder.class) public final class RemoteResponse { private final String method; @@ -134,13 +135,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(String method); + PathStage method(@NotNull String method); Builder from(RemoteResponse other); } public interface PathStage { - StatusStage path(String path); + StatusStage path(@NotNull String path); } public interface StatusStage { @@ -148,7 +149,7 @@ public interface StatusStage { } public interface ResponseStage { - _FinalStage response(JsonNode response); + _FinalStage response(@NotNull JsonNode response); } public interface _FinalStage { @@ -202,14 +203,14 @@ public Builder from(RemoteResponse other) { @java.lang.Override @JsonSetter("method") - public PathStage method(String method) { + public PathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("path") - public StatusStage path(String path) { + public StatusStage path(@NotNull String path) { this.path = path; return this; } @@ -223,14 +224,14 @@ public ResponseStage status(int status) { @java.lang.Override @JsonSetter("response") - public _FinalStage response(JsonNode response) { + public _FinalStage response(@NotNull JsonNode response) { this.response = response; return this; } @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -243,7 +244,7 @@ public _FinalStage headers(Optional> headers) { @java.lang.Override public _FinalStage responseType(ResponseTypeEnum responseType) { - this.responseType = Optional.of(responseType); + this.responseType = Optional.ofNullable(responseType); return this; } @@ -256,7 +257,7 @@ public _FinalStage responseType(Optional responseType) { @java.lang.Override public _FinalStage responseHeaders(Map responseHeaders) { - this.responseHeaders = Optional.of(responseHeaders); + this.responseHeaders = Optional.ofNullable(responseHeaders); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/SyncStatus.java b/src/main/java/com/merge/api/resources/filestorage/types/SyncStatus.java index 33fdb2026..a3733ef3c 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/SyncStatus.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/SyncStatus.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatus.Builder.class) public final class SyncStatus { private final String modelName; @@ -134,17 +135,17 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - ModelIdStage modelName(String modelName); + ModelIdStage modelName(@NotNull String modelName); Builder from(SyncStatus other); } public interface ModelIdStage { - StatusStage modelId(String modelId); + StatusStage modelId(@NotNull String modelId); } public interface StatusStage { - IsInitialSyncStage status(SyncStatusStatusEnum status); + IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status); } public interface IsInitialSyncStage { @@ -205,21 +206,21 @@ public Builder from(SyncStatus other) { @java.lang.Override @JsonSetter("model_name") - public ModelIdStage modelName(String modelName) { + public ModelIdStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override @JsonSetter("model_id") - public StatusStage modelId(String modelId) { + public StatusStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(SyncStatusStatusEnum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status) { this.status = status; return this; } @@ -234,7 +235,7 @@ public _FinalStage isInitialSync(boolean isInitialSync) { @java.lang.Override public _FinalStage selectiveSyncConfigurationsUsage( SelectiveSyncConfigurationsUsageEnum selectiveSyncConfigurationsUsage) { - this.selectiveSyncConfigurationsUsage = Optional.of(selectiveSyncConfigurationsUsage); + this.selectiveSyncConfigurationsUsage = Optional.ofNullable(selectiveSyncConfigurationsUsage); return this; } @@ -248,7 +249,7 @@ public _FinalStage selectiveSyncConfigurationsUsage( @java.lang.Override public _FinalStage nextSyncStart(OffsetDateTime nextSyncStart) { - this.nextSyncStart = Optional.of(nextSyncStart); + this.nextSyncStart = Optional.ofNullable(nextSyncStart); return this; } @@ -261,7 +262,7 @@ public _FinalStage nextSyncStart(Optional nextSyncStart) { @java.lang.Override public _FinalStage lastSyncStart(OffsetDateTime lastSyncStart) { - this.lastSyncStart = Optional.of(lastSyncStart); + this.lastSyncStart = Optional.ofNullable(lastSyncStart); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/User.java b/src/main/java/com/merge/api/resources/filestorage/types/User.java index 165e7aa74..5152ddc77 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/User.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/User.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = User.Builder.class) public final class User { private final Optional id; @@ -237,7 +237,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -248,7 +248,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -259,7 +259,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -270,7 +270,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -281,7 +281,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -292,7 +292,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -303,7 +303,7 @@ public Builder isMe(Optional isMe) { } public Builder isMe(Boolean isMe) { - this.isMe = Optional.of(isMe); + this.isMe = Optional.ofNullable(isMe); return this; } @@ -314,7 +314,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -325,7 +325,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -336,7 +336,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/ValidationProblemSource.java b/src/main/java/com/merge/api/resources/filestorage/types/ValidationProblemSource.java index dab011d8d..2acfdb98a 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/ValidationProblemSource.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/ValidationProblemSource.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ValidationProblemSource.Builder.class) public final class ValidationProblemSource { private final String pointer; @@ -62,7 +63,7 @@ public static PointerStage builder() { } public interface PointerStage { - _FinalStage pointer(String pointer); + _FinalStage pointer(@NotNull String pointer); Builder from(ValidationProblemSource other); } @@ -88,7 +89,7 @@ public Builder from(ValidationProblemSource other) { @java.lang.Override @JsonSetter("pointer") - public _FinalStage pointer(String pointer) { + public _FinalStage pointer(@NotNull String pointer) { this.pointer = pointer; return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/WarningValidationProblem.java b/src/main/java/com/merge/api/resources/filestorage/types/WarningValidationProblem.java index ddbb1fba7..78f1e4cb6 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/WarningValidationProblem.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/WarningValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WarningValidationProblem.Builder.class) public final class WarningValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(WarningValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(WarningValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/types/WebhookReceiver.java b/src/main/java/com/merge/api/resources/filestorage/types/WebhookReceiver.java index 80ac26cd3..3cf4b93bd 100644 --- a/src/main/java/com/merge/api/resources/filestorage/types/WebhookReceiver.java +++ b/src/main/java/com/merge/api/resources/filestorage/types/WebhookReceiver.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiver.Builder.class) public final class WebhookReceiver { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiver other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiver other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/users/UsersClient.java b/src/main/java/com/merge/api/resources/filestorage/users/UsersClient.java index 54405f680..33347c61a 100644 --- a/src/main/java/com/merge/api/resources/filestorage/users/UsersClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/users/UsersClient.java @@ -93,7 +93,8 @@ public PaginatedUserList list(UsersListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -114,13 +115,6 @@ public PaginatedUserList list(UsersListRequest request, RequestOptions requestOp } } - /** - * Returns a User object with the given id. - */ - public User retrieve(String id) { - return retrieve(id, UsersRetrieveRequest.builder().build()); - } - /** * Returns a User object with the given id. */ @@ -144,7 +138,8 @@ public User retrieve(String id, UsersRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersListRequest.java b/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersListRequest.java index 7f642b691..524b4681b 100644 --- a/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersListRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersListRequest.Builder.class) public final class UsersListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -305,7 +305,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -316,7 +316,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -327,7 +327,7 @@ public Builder isMe(Optional isMe) { } public Builder isMe(String isMe) { - this.isMe = Optional.of(isMe); + this.isMe = Optional.ofNullable(isMe); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersRetrieveRequest.java b/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersRetrieveRequest.java index cfc79f7c4..7e2023f73 100644 --- a/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/users/requests/UsersRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersRetrieveRequest.Builder.class) public final class UsersRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/WebhookReceiversClient.java b/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/WebhookReceiversClient.java index c69987a02..565a856ee 100644 --- a/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/WebhookReceiversClient.java +++ b/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/WebhookReceiversClient.java @@ -50,6 +50,7 @@ public List list(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,6 +99,7 @@ public WebhookReceiver create(WebhookReceiverRequest request, RequestOptions req .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/requests/WebhookReceiverRequest.java b/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/requests/WebhookReceiverRequest.java index 3372ff95c..653e468d5 100644 --- a/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/requests/WebhookReceiverRequest.java +++ b/src/main/java/com/merge/api/resources/filestorage/webhookreceivers/requests/WebhookReceiverRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiverRequest.Builder.class) public final class WebhookReceiverRequest { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiverRequest other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiverRequest other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/accountdetails/AccountDetailsClient.java b/src/main/java/com/merge/api/resources/hris/accountdetails/AccountDetailsClient.java index b9485e4c1..1c7970ea4 100644 --- a/src/main/java/com/merge/api/resources/hris/accountdetails/AccountDetailsClient.java +++ b/src/main/java/com/merge/api/resources/hris/accountdetails/AccountDetailsClient.java @@ -44,6 +44,7 @@ public AccountDetails retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/accounttoken/AccountTokenClient.java b/src/main/java/com/merge/api/resources/hris/accounttoken/AccountTokenClient.java index da5f4237a..f677e3b19 100644 --- a/src/main/java/com/merge/api/resources/hris/accounttoken/AccountTokenClient.java +++ b/src/main/java/com/merge/api/resources/hris/accounttoken/AccountTokenClient.java @@ -45,6 +45,7 @@ public AccountToken retrieve(String publicToken, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/asyncpassthrough/AsyncPassthroughClient.java b/src/main/java/com/merge/api/resources/hris/asyncpassthrough/AsyncPassthroughClient.java index 31879508d..c70b057da 100644 --- a/src/main/java/com/merge/api/resources/hris/asyncpassthrough/AsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/resources/hris/asyncpassthrough/AsyncPassthroughClient.java @@ -97,6 +97,7 @@ public AsyncPassthroughRetrieveResponse retrieve(String asyncPassthroughReceiptI .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/audittrail/AuditTrailClient.java b/src/main/java/com/merge/api/resources/hris/audittrail/AuditTrailClient.java index 0c358a2a9..a5537eea6 100644 --- a/src/main/java/com/merge/api/resources/hris/audittrail/AuditTrailClient.java +++ b/src/main/java/com/merge/api/resources/hris/audittrail/AuditTrailClient.java @@ -68,7 +68,8 @@ public PaginatedAuditLogEventList list(AuditTrailListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/audittrail/requests/AuditTrailListRequest.java b/src/main/java/com/merge/api/resources/hris/audittrail/requests/AuditTrailListRequest.java index 113327a2b..8841a60c8 100644 --- a/src/main/java/com/merge/api/resources/hris/audittrail/requests/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/audittrail/requests/AuditTrailListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditTrailListRequest.Builder.class) public final class AuditTrailListRequest { private final Optional cursor; @@ -169,7 +169,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -180,7 +180,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -191,7 +191,7 @@ public Builder eventType(Optional eventType) { } public Builder eventType(String eventType) { - this.eventType = Optional.of(eventType); + this.eventType = Optional.ofNullable(eventType); return this; } @@ -202,7 +202,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -213,7 +213,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -224,7 +224,7 @@ public Builder userEmail(Optional userEmail) { } public Builder userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/availableactions/AvailableActionsClient.java b/src/main/java/com/merge/api/resources/hris/availableactions/AvailableActionsClient.java index 86da9901f..a7c3252db 100644 --- a/src/main/java/com/merge/api/resources/hris/availableactions/AvailableActionsClient.java +++ b/src/main/java/com/merge/api/resources/hris/availableactions/AvailableActionsClient.java @@ -44,6 +44,7 @@ public AvailableActions retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/bankinfo/BankInfoClient.java b/src/main/java/com/merge/api/resources/hris/bankinfo/BankInfoClient.java index 8007a6087..adf4223d6 100644 --- a/src/main/java/com/merge/api/resources/hris/bankinfo/BankInfoClient.java +++ b/src/main/java/com/merge/api/resources/hris/bankinfo/BankInfoClient.java @@ -113,7 +113,8 @@ public PaginatedBankInfoList list(BankInfoListRequest request, RequestOptions re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -134,13 +135,6 @@ public PaginatedBankInfoList list(BankInfoListRequest request, RequestOptions re } } - /** - * Returns a BankInfo object with the given id. - */ - public BankInfo retrieve(String id) { - return retrieve(id, BankInfoRetrieveRequest.builder().build()); - } - /** * Returns a BankInfo object with the given id. */ @@ -174,7 +168,8 @@ public BankInfo retrieve(String id, BankInfoRetrieveRequest request, RequestOpti .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoListRequest.java b/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoListRequest.java index c0ed5121c..4c376d118 100644 --- a/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoListRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankInfoListRequest.Builder.class) public final class BankInfoListRequest { private final Optional accountType; @@ -369,7 +369,7 @@ public Builder accountType(Optional accountType) } public Builder accountType(BankInfoListRequestAccountType accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -380,7 +380,7 @@ public Builder bankName(Optional bankName) { } public Builder bankName(String bankName) { - this.bankName = Optional.of(bankName); + this.bankName = Optional.ofNullable(bankName); return this; } @@ -391,7 +391,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -402,7 +402,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -413,7 +413,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -424,7 +424,7 @@ public Builder employeeId(Optional employeeId) { } public Builder employeeId(String employeeId) { - this.employeeId = Optional.of(employeeId); + this.employeeId = Optional.ofNullable(employeeId); return this; } @@ -435,7 +435,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -446,7 +446,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -457,7 +457,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -468,7 +468,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -479,7 +479,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -490,7 +490,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -501,7 +501,7 @@ public Builder orderBy(Optional orderBy) { } public Builder orderBy(BankInfoListRequestOrderBy orderBy) { - this.orderBy = Optional.of(orderBy); + this.orderBy = Optional.ofNullable(orderBy); return this; } @@ -512,7 +512,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -523,7 +523,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -534,7 +534,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -545,7 +545,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoRetrieveRequest.java index cd82e5f1d..b3b148909 100644 --- a/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/bankinfo/requests/BankInfoRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankInfoRetrieveRequest.Builder.class) public final class BankInfoRetrieveRequest { private final Optional expand; @@ -137,7 +137,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -148,7 +148,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -159,7 +159,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -170,7 +170,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/benefits/BenefitsClient.java b/src/main/java/com/merge/api/resources/hris/benefits/BenefitsClient.java index a13c43489..56676e815 100644 --- a/src/main/java/com/merge/api/resources/hris/benefits/BenefitsClient.java +++ b/src/main/java/com/merge/api/resources/hris/benefits/BenefitsClient.java @@ -96,7 +96,8 @@ public PaginatedBenefitList list(BenefitsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedBenefitList list(BenefitsListRequest request, RequestOptions req } } - /** - * Returns a Benefit object with the given id. - */ - public Benefit retrieve(String id) { - return retrieve(id, BenefitsRetrieveRequest.builder().build()); - } - /** * Returns a Benefit object with the given id. */ @@ -150,7 +144,8 @@ public Benefit retrieve(String id, BenefitsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsListRequest.java b/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsListRequest.java index b711e8222..9888695b9 100644 --- a/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BenefitsListRequest.Builder.class) public final class BenefitsListRequest { private final Optional createdAfter; @@ -278,7 +278,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -289,7 +289,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -300,7 +300,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -311,7 +311,7 @@ public Builder employeeId(Optional employeeId) { } public Builder employeeId(String employeeId) { - this.employeeId = Optional.of(employeeId); + this.employeeId = Optional.ofNullable(employeeId); return this; } @@ -322,7 +322,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -333,7 +333,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -344,7 +344,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -355,7 +355,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -366,7 +366,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -377,7 +377,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -388,7 +388,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsRetrieveRequest.java index e1a280b1b..4f1744baf 100644 --- a/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/benefits/requests/BenefitsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BenefitsRetrieveRequest.Builder.class) public final class BenefitsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/companies/CompaniesClient.java b/src/main/java/com/merge/api/resources/hris/companies/CompaniesClient.java index 58ddd0ad5..92fc42175 100644 --- a/src/main/java/com/merge/api/resources/hris/companies/CompaniesClient.java +++ b/src/main/java/com/merge/api/resources/hris/companies/CompaniesClient.java @@ -90,7 +90,8 @@ public PaginatedCompanyList list(CompaniesListRequest request, RequestOptions re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedCompanyList list(CompaniesListRequest request, RequestOptions re } } - /** - * Returns a Company object with the given id. - */ - public Company retrieve(String id) { - return retrieve(id, CompaniesRetrieveRequest.builder().build()); - } - /** * Returns a Company object with the given id. */ @@ -141,7 +135,8 @@ public Company retrieve(String id, CompaniesRetrieveRequest request, RequestOpti .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesListRequest.java b/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesListRequest.java index f486980ae..806cdb13d 100644 --- a/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CompaniesListRequest.Builder.class) public final class CompaniesListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesRetrieveRequest.java index 198b6597b..039d346cb 100644 --- a/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/companies/requests/CompaniesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CompaniesRetrieveRequest.Builder.class) public final class CompaniesRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/dependents/DependentsClient.java b/src/main/java/com/merge/api/resources/hris/dependents/DependentsClient.java index 0b9bffb7b..954465d43 100644 --- a/src/main/java/com/merge/api/resources/hris/dependents/DependentsClient.java +++ b/src/main/java/com/merge/api/resources/hris/dependents/DependentsClient.java @@ -95,7 +95,8 @@ public PaginatedDependentList list(DependentsListRequest request, RequestOptions .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -116,13 +117,6 @@ public PaginatedDependentList list(DependentsListRequest request, RequestOptions } } - /** - * Returns a Dependent object with the given id. - */ - public Dependent retrieve(String id) { - return retrieve(id, DependentsRetrieveRequest.builder().build()); - } - /** * Returns a Dependent object with the given id. */ @@ -151,7 +145,8 @@ public Dependent retrieve(String id, DependentsRetrieveRequest request, RequestO .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsListRequest.java b/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsListRequest.java index fd8a05df0..627683ac4 100644 --- a/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DependentsListRequest.Builder.class) public final class DependentsListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -305,7 +305,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -316,7 +316,7 @@ public Builder includeSensitiveFields(Optional includeSensitiveFields) } public Builder includeSensitiveFields(Boolean includeSensitiveFields) { - this.includeSensitiveFields = Optional.of(includeSensitiveFields); + this.includeSensitiveFields = Optional.ofNullable(includeSensitiveFields); return this; } @@ -327,7 +327,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsRetrieveRequest.java index 71ec8b33f..5d9466ae4 100644 --- a/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/dependents/requests/DependentsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DependentsRetrieveRequest.Builder.class) public final class DependentsRetrieveRequest { private final Optional includeRemoteData; @@ -105,7 +105,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -116,7 +116,7 @@ public Builder includeSensitiveFields(Optional includeSensitiveFields) } public Builder includeSensitiveFields(Boolean includeSensitiveFields) { - this.includeSensitiveFields = Optional.of(includeSensitiveFields); + this.includeSensitiveFields = Optional.ofNullable(includeSensitiveFields); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employeepayrollruns/EmployeePayrollRunsClient.java b/src/main/java/com/merge/api/resources/hris/employeepayrollruns/EmployeePayrollRunsClient.java index de166e15e..f78ef3274 100644 --- a/src/main/java/com/merge/api/resources/hris/employeepayrollruns/EmployeePayrollRunsClient.java +++ b/src/main/java/com/merge/api/resources/hris/employeepayrollruns/EmployeePayrollRunsClient.java @@ -116,7 +116,8 @@ public PaginatedEmployeePayrollRunList list(EmployeePayrollRunsListRequest reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -138,13 +139,6 @@ public PaginatedEmployeePayrollRunList list(EmployeePayrollRunsListRequest reque } } - /** - * Returns an EmployeePayrollRun object with the given id. - */ - public EmployeePayrollRun retrieve(String id) { - return retrieve(id, EmployeePayrollRunsRetrieveRequest.builder().build()); - } - /** * Returns an EmployeePayrollRun object with the given id. */ @@ -172,7 +166,8 @@ public EmployeePayrollRun retrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsListRequest.java b/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsListRequest.java index 46b427f8f..a5e553c7f 100644 --- a/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeePayrollRunsListRequest.Builder.class) public final class EmployeePayrollRunsListRequest { private final Optional createdAfter; @@ -364,7 +364,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -375,7 +375,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -386,7 +386,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -397,7 +397,7 @@ public Builder employeeId(Optional employeeId) { } public Builder employeeId(String employeeId) { - this.employeeId = Optional.of(employeeId); + this.employeeId = Optional.ofNullable(employeeId); return this; } @@ -408,7 +408,7 @@ public Builder endedAfter(Optional endedAfter) { } public Builder endedAfter(OffsetDateTime endedAfter) { - this.endedAfter = Optional.of(endedAfter); + this.endedAfter = Optional.ofNullable(endedAfter); return this; } @@ -419,7 +419,7 @@ public Builder endedBefore(Optional endedBefore) { } public Builder endedBefore(OffsetDateTime endedBefore) { - this.endedBefore = Optional.of(endedBefore); + this.endedBefore = Optional.ofNullable(endedBefore); return this; } @@ -430,7 +430,7 @@ public Builder expand(Optional expand) { } public Builder expand(EmployeePayrollRunsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -441,7 +441,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -452,7 +452,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -463,7 +463,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -474,7 +474,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -485,7 +485,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -496,7 +496,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -507,7 +507,7 @@ public Builder payrollRunId(Optional payrollRunId) { } public Builder payrollRunId(String payrollRunId) { - this.payrollRunId = Optional.of(payrollRunId); + this.payrollRunId = Optional.ofNullable(payrollRunId); return this; } @@ -518,7 +518,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -529,7 +529,7 @@ public Builder startedAfter(Optional startedAfter) { } public Builder startedAfter(OffsetDateTime startedAfter) { - this.startedAfter = Optional.of(startedAfter); + this.startedAfter = Optional.ofNullable(startedAfter); return this; } @@ -540,7 +540,7 @@ public Builder startedBefore(Optional startedBefore) { } public Builder startedBefore(OffsetDateTime startedBefore) { - this.startedBefore = Optional.of(startedBefore); + this.startedBefore = Optional.ofNullable(startedBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsRetrieveRequest.java index 99544db40..aa36ef087 100644 --- a/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employeepayrollruns/requests/EmployeePayrollRunsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeePayrollRunsRetrieveRequest.Builder.class) public final class EmployeePayrollRunsRetrieveRequest { private final Optional expand; @@ -106,7 +106,7 @@ public Builder expand(Optional expand) } public Builder expand(EmployeePayrollRunsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -117,7 +117,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employees/EmployeesClient.java b/src/main/java/com/merge/api/resources/hris/employees/EmployeesClient.java index adbe28f3b..1fc9fb597 100644 --- a/src/main/java/com/merge/api/resources/hris/employees/EmployeesClient.java +++ b/src/main/java/com/merge/api/resources/hris/employees/EmployeesClient.java @@ -182,7 +182,8 @@ public PaginatedEmployeeList list(EmployeesListRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -237,7 +238,8 @@ public EmployeeResponse create(EmployeeEndpointRequest request, RequestOptions r .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -258,13 +260,6 @@ public EmployeeResponse create(EmployeeEndpointRequest request, RequestOptions r } } - /** - * Returns an Employee object with the given id. - */ - public Employee retrieve(String id) { - return retrieve(id, EmployeesRetrieveRequest.builder().build()); - } - /** * Returns an Employee object with the given id. */ @@ -304,7 +299,8 @@ public Employee retrieve(String id, EmployeesRetrieveRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -393,6 +389,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeeEndpointRequest.java b/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeeEndpointRequest.java index c69f22a78..fc8068d49 100644 --- a/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeeEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeeEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeeEndpointRequest.Builder.class) public final class EmployeeEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(EmployeeRequest model); + _FinalStage model(@NotNull EmployeeRequest model); Builder from(EmployeeEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(EmployeeEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(EmployeeRequest model) { + public _FinalStage model(@NotNull EmployeeRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(EmployeeRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesListRequest.java b/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesListRequest.java index 38e7c3f92..55c26a0f4 100644 --- a/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesListRequest.java @@ -22,7 +22,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeesListRequest.Builder.class) public final class EmployeesListRequest { private final Optional companyId; @@ -644,7 +644,7 @@ public Builder companyId(Optional companyId) { } public Builder companyId(String companyId) { - this.companyId = Optional.of(companyId); + this.companyId = Optional.ofNullable(companyId); return this; } @@ -655,7 +655,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -666,7 +666,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -677,7 +677,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -688,7 +688,7 @@ public Builder displayFullName(Optional displayFullName) { } public Builder displayFullName(String displayFullName) { - this.displayFullName = Optional.of(displayFullName); + this.displayFullName = Optional.ofNullable(displayFullName); return this; } @@ -699,7 +699,7 @@ public Builder employmentStatus(Optional e } public Builder employmentStatus(EmployeesListRequestEmploymentStatus employmentStatus) { - this.employmentStatus = Optional.of(employmentStatus); + this.employmentStatus = Optional.ofNullable(employmentStatus); return this; } @@ -710,7 +710,7 @@ public Builder employmentType(Optional employmentType) { } public Builder employmentType(String employmentType) { - this.employmentType = Optional.of(employmentType); + this.employmentType = Optional.ofNullable(employmentType); return this; } @@ -721,7 +721,7 @@ public Builder expand(Optional expand) { } public Builder expand(EmployeesListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -732,7 +732,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -743,7 +743,7 @@ public Builder groups(Optional groups) { } public Builder groups(String groups) { - this.groups = Optional.of(groups); + this.groups = Optional.ofNullable(groups); return this; } @@ -754,7 +754,7 @@ public Builder homeLocationId(Optional homeLocationId) { } public Builder homeLocationId(String homeLocationId) { - this.homeLocationId = Optional.of(homeLocationId); + this.homeLocationId = Optional.ofNullable(homeLocationId); return this; } @@ -765,7 +765,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -776,7 +776,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -787,7 +787,7 @@ public Builder includeSensitiveFields(Optional includeSensitiveFields) } public Builder includeSensitiveFields(Boolean includeSensitiveFields) { - this.includeSensitiveFields = Optional.of(includeSensitiveFields); + this.includeSensitiveFields = Optional.ofNullable(includeSensitiveFields); return this; } @@ -798,7 +798,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -809,7 +809,7 @@ public Builder jobTitle(Optional jobTitle) { } public Builder jobTitle(String jobTitle) { - this.jobTitle = Optional.of(jobTitle); + this.jobTitle = Optional.ofNullable(jobTitle); return this; } @@ -820,7 +820,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -831,7 +831,7 @@ public Builder managerId(Optional managerId) { } public Builder managerId(String managerId) { - this.managerId = Optional.of(managerId); + this.managerId = Optional.ofNullable(managerId); return this; } @@ -842,7 +842,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -853,7 +853,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -864,7 +864,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -875,7 +875,7 @@ public Builder payGroupId(Optional payGroupId) { } public Builder payGroupId(String payGroupId) { - this.payGroupId = Optional.of(payGroupId); + this.payGroupId = Optional.ofNullable(payGroupId); return this; } @@ -886,7 +886,7 @@ public Builder personalEmail(Optional personalEmail) { } public Builder personalEmail(String personalEmail) { - this.personalEmail = Optional.of(personalEmail); + this.personalEmail = Optional.ofNullable(personalEmail); return this; } @@ -897,7 +897,7 @@ public Builder remoteFields(Optional remoteFie } public Builder remoteFields(EmployeesListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -908,7 +908,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -919,7 +919,7 @@ public Builder showEnumOrigins(Optional sho } public Builder showEnumOrigins(EmployeesListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -930,7 +930,7 @@ public Builder startedAfter(Optional startedAfter) { } public Builder startedAfter(OffsetDateTime startedAfter) { - this.startedAfter = Optional.of(startedAfter); + this.startedAfter = Optional.ofNullable(startedAfter); return this; } @@ -941,7 +941,7 @@ public Builder startedBefore(Optional startedBefore) { } public Builder startedBefore(OffsetDateTime startedBefore) { - this.startedBefore = Optional.of(startedBefore); + this.startedBefore = Optional.ofNullable(startedBefore); return this; } @@ -952,7 +952,7 @@ public Builder teamId(Optional teamId) { } public Builder teamId(String teamId) { - this.teamId = Optional.of(teamId); + this.teamId = Optional.ofNullable(teamId); return this; } @@ -963,7 +963,7 @@ public Builder terminatedAfter(Optional terminatedAfter) { } public Builder terminatedAfter(OffsetDateTime terminatedAfter) { - this.terminatedAfter = Optional.of(terminatedAfter); + this.terminatedAfter = Optional.ofNullable(terminatedAfter); return this; } @@ -974,7 +974,7 @@ public Builder terminatedBefore(Optional terminatedBefore) { } public Builder terminatedBefore(OffsetDateTime terminatedBefore) { - this.terminatedBefore = Optional.of(terminatedBefore); + this.terminatedBefore = Optional.ofNullable(terminatedBefore); return this; } @@ -985,7 +985,7 @@ public Builder workEmail(Optional workEmail) { } public Builder workEmail(String workEmail) { - this.workEmail = Optional.of(workEmail); + this.workEmail = Optional.ofNullable(workEmail); return this; } @@ -996,7 +996,7 @@ public Builder workLocationId(Optional workLocationId) { } public Builder workLocationId(String workLocationId) { - this.workLocationId = Optional.of(workLocationId); + this.workLocationId = Optional.ofNullable(workLocationId); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesRetrieveRequest.java index 6e84a83b8..b9b16a87d 100644 --- a/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employees/requests/EmployeesRetrieveRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeesRetrieveRequest.Builder.class) public final class EmployeesRetrieveRequest { private final Optional expand; @@ -161,7 +161,7 @@ public Builder expand(Optional expand) { } public Builder expand(EmployeesRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -172,7 +172,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -183,7 +183,7 @@ public Builder includeSensitiveFields(Optional includeSensitiveFields) } public Builder includeSensitiveFields(Boolean includeSensitiveFields) { - this.includeSensitiveFields = Optional.of(includeSensitiveFields); + this.includeSensitiveFields = Optional.ofNullable(includeSensitiveFields); return this; } @@ -194,7 +194,7 @@ public Builder remoteFields(Optional remot } public Builder remoteFields(EmployeesRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -205,7 +205,7 @@ public Builder showEnumOrigins(Optional } public Builder showEnumOrigins(EmployeesRetrieveRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employees/requests/IgnoreCommonModelRequest.java b/src/main/java/com/merge/api/resources/hris/employees/requests/IgnoreCommonModelRequest.java index 8465dbbe0..7675eca84 100644 --- a/src/main/java/com/merge/api/resources/hris/employees/requests/IgnoreCommonModelRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employees/requests/IgnoreCommonModelRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IgnoreCommonModelRequest.Builder.class) public final class IgnoreCommonModelRequest { private final IgnoreCommonModelRequestReason reason; @@ -74,7 +75,7 @@ public static ReasonStage builder() { } public interface ReasonStage { - _FinalStage reason(IgnoreCommonModelRequestReason reason); + _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason); Builder from(IgnoreCommonModelRequest other); } @@ -107,14 +108,14 @@ public Builder from(IgnoreCommonModelRequest other) { @java.lang.Override @JsonSetter("reason") - public _FinalStage reason(IgnoreCommonModelRequestReason reason) { + public _FinalStage reason(@NotNull IgnoreCommonModelRequestReason reason) { this.reason = reason; return this; } @java.lang.Override public _FinalStage message(String message) { - this.message = Optional.of(message); + this.message = Optional.ofNullable(message); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employerbenefits/EmployerBenefitsClient.java b/src/main/java/com/merge/api/resources/hris/employerbenefits/EmployerBenefitsClient.java index 473854026..c4abdd3c8 100644 --- a/src/main/java/com/merge/api/resources/hris/employerbenefits/EmployerBenefitsClient.java +++ b/src/main/java/com/merge/api/resources/hris/employerbenefits/EmployerBenefitsClient.java @@ -90,7 +90,8 @@ public PaginatedEmployerBenefitList list(EmployerBenefitsListRequest request, Re .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedEmployerBenefitList list(EmployerBenefitsListRequest request, Re } } - /** - * Returns an EmployerBenefit object with the given id. - */ - public EmployerBenefit retrieve(String id) { - return retrieve(id, EmployerBenefitsRetrieveRequest.builder().build()); - } - /** * Returns an EmployerBenefit object with the given id. */ @@ -141,7 +135,8 @@ public EmployerBenefit retrieve(String id, EmployerBenefitsRetrieveRequest reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsListRequest.java b/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsListRequest.java index 68d953b89..b81920c98 100644 --- a/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployerBenefitsListRequest.Builder.class) public final class EmployerBenefitsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsRetrieveRequest.java index 15eca94d2..c830bbfe7 100644 --- a/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employerbenefits/requests/EmployerBenefitsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployerBenefitsRetrieveRequest.Builder.class) public final class EmployerBenefitsRetrieveRequest { private final Optional includeRemoteData; @@ -88,7 +88,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employments/EmploymentsClient.java b/src/main/java/com/merge/api/resources/hris/employments/EmploymentsClient.java index 23768ca37..276f5435e 100644 --- a/src/main/java/com/merge/api/resources/hris/employments/EmploymentsClient.java +++ b/src/main/java/com/merge/api/resources/hris/employments/EmploymentsClient.java @@ -107,7 +107,8 @@ public PaginatedEmploymentList list(EmploymentsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -128,13 +129,6 @@ public PaginatedEmploymentList list(EmploymentsListRequest request, RequestOptio } } - /** - * Returns an Employment object with the given id. - */ - public Employment retrieve(String id) { - return retrieve(id, EmploymentsRetrieveRequest.builder().build()); - } - /** * Returns an Employment object with the given id. */ @@ -169,7 +163,8 @@ public Employment retrieve(String id, EmploymentsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsListRequest.java b/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsListRequest.java index c6b14ef79..96a6f19df 100644 --- a/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsListRequest.java @@ -22,7 +22,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmploymentsListRequest.Builder.class) public final class EmploymentsListRequest { private final Optional createdAfter; @@ -333,7 +333,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -344,7 +344,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -355,7 +355,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -366,7 +366,7 @@ public Builder employeeId(Optional employeeId) { } public Builder employeeId(String employeeId) { - this.employeeId = Optional.of(employeeId); + this.employeeId = Optional.ofNullable(employeeId); return this; } @@ -377,7 +377,7 @@ public Builder expand(Optional expand) { } public Builder expand(EmploymentsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -388,7 +388,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -399,7 +399,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -410,7 +410,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -421,7 +421,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -432,7 +432,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -443,7 +443,7 @@ public Builder orderBy(Optional orderBy) { } public Builder orderBy(EmploymentsListRequestOrderBy orderBy) { - this.orderBy = Optional.of(orderBy); + this.orderBy = Optional.ofNullable(orderBy); return this; } @@ -454,7 +454,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -465,7 +465,7 @@ public Builder remoteFields(Optional remoteF } public Builder remoteFields(EmploymentsListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -476,7 +476,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -487,7 +487,7 @@ public Builder showEnumOrigins(Optional s } public Builder showEnumOrigins(EmploymentsListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsRetrieveRequest.java index 5aa6237f5..7e139618c 100644 --- a/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/employments/requests/EmploymentsRetrieveRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmploymentsRetrieveRequest.Builder.class) public final class EmploymentsRetrieveRequest { private final Optional expand; @@ -140,7 +140,7 @@ public Builder expand(Optional expand) { } public Builder expand(EmploymentsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -151,7 +151,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -162,7 +162,7 @@ public Builder remoteFields(Optional rem } public Builder remoteFields(EmploymentsRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -173,7 +173,7 @@ public Builder showEnumOrigins(OptionalALL data from start. - */ - public FieldMappingInstanceResponse fieldMappingsPartialUpdate(String fieldMappingId) { - return fieldMappingsPartialUpdate( - fieldMappingId, PatchedEditFieldMappingRequest.builder().build()); - } - /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. */ @@ -227,6 +222,7 @@ public FieldMappingInstanceResponse fieldMappingsPartialUpdate( .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,7 +276,8 @@ public RemoteFieldApiResponse remoteFieldsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -321,6 +318,7 @@ public ExternalTargetFieldApiResponse targetFieldsRetrieve(RequestOptions reques .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/CreateFieldMappingRequest.java index 39b1099df..c23390afb 100644 --- a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/CreateFieldMappingRequest.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateFieldMappingRequest.Builder.class) public final class CreateFieldMappingRequest { private final Optional excludeRemoteFieldMetadata; @@ -157,25 +158,25 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { - TargetFieldDescriptionStage targetFieldName(String targetFieldName); + TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { - RemoteMethodStage targetFieldDescription(String targetFieldDescription); + RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { - RemoteUrlPathStage remoteMethod(String remoteMethod); + RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { - CommonModelNameStage remoteUrlPath(String remoteUrlPath); + CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { - _FinalStage commonModelName(String commonModelName); + _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { @@ -237,7 +238,7 @@ public Builder from(CreateFieldMappingRequest other) { */ @java.lang.Override @JsonSetter("target_field_name") - public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { + public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName) { this.targetFieldName = targetFieldName; return this; } @@ -248,7 +249,7 @@ public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { */ @java.lang.Override @JsonSetter("target_field_description") - public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { + public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription) { this.targetFieldDescription = targetFieldDescription; return this; } @@ -259,7 +260,7 @@ public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { */ @java.lang.Override @JsonSetter("remote_method") - public RemoteUrlPathStage remoteMethod(String remoteMethod) { + public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { this.remoteMethod = remoteMethod; return this; } @@ -270,7 +271,7 @@ public RemoteUrlPathStage remoteMethod(String remoteMethod) { */ @java.lang.Override @JsonSetter("remote_url_path") - public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { + public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; return this; } @@ -281,7 +282,7 @@ public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { */ @java.lang.Override @JsonSetter("common_model_name") - public _FinalStage commonModelName(String commonModelName) { + public _FinalStage commonModelName(@NotNull String commonModelName) { this.commonModelName = commonModelName; return this; } @@ -320,7 +321,7 @@ public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalP */ @java.lang.Override public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/FieldMappingsRetrieveRequest.java index 4143e3886..6b30b6bf7 100644 --- a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/FieldMappingsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingsRetrieveRequest.Builder.class) public final class FieldMappingsRetrieveRequest { private final Optional excludeRemoteFieldMetadata; @@ -88,7 +88,7 @@ public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMe } public Builder excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/PatchedEditFieldMappingRequest.java index b3bb98dff..19c0edb22 100644 --- a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/PatchedEditFieldMappingRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEditFieldMappingRequest.Builder.class) public final class PatchedEditFieldMappingRequest { private final Optional> remoteFieldTraversalPath; @@ -123,7 +123,7 @@ public Builder remoteFieldTraversalPath(Optional> remoteFieldTrav } public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) { - this.remoteFieldTraversalPath = Optional.of(remoteFieldTraversalPath); + this.remoteFieldTraversalPath = Optional.ofNullable(remoteFieldTraversalPath); return this; } @@ -134,7 +134,7 @@ public Builder remoteMethod(Optional remoteMethod) { } public Builder remoteMethod(String remoteMethod) { - this.remoteMethod = Optional.of(remoteMethod); + this.remoteMethod = Optional.ofNullable(remoteMethod); return this; } @@ -145,7 +145,7 @@ public Builder remoteUrlPath(Optional remoteUrlPath) { } public Builder remoteUrlPath(String remoteUrlPath) { - this.remoteUrlPath = Optional.of(remoteUrlPath); + this.remoteUrlPath = Optional.ofNullable(remoteUrlPath); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/RemoteFieldsRetrieveRequest.java index 80b93e90e..530fbc692 100644 --- a/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/fieldmapping/requests/RemoteFieldsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldsRetrieveRequest.Builder.class) public final class RemoteFieldsRetrieveRequest { private final Optional commonModels; @@ -104,7 +104,7 @@ public Builder commonModels(Optional commonModels) { } public Builder commonModels(String commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -115,7 +115,7 @@ public Builder includeExampleValues(Optional includeExampleValues) { } public Builder includeExampleValues(String includeExampleValues) { - this.includeExampleValues = Optional.of(includeExampleValues); + this.includeExampleValues = Optional.ofNullable(includeExampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/forceresync/ForceResyncClient.java b/src/main/java/com/merge/api/resources/hris/forceresync/ForceResyncClient.java index 337b1da7e..f2573fe6d 100644 --- a/src/main/java/com/merge/api/resources/hris/forceresync/ForceResyncClient.java +++ b/src/main/java/com/merge/api/resources/hris/forceresync/ForceResyncClient.java @@ -47,6 +47,7 @@ public List syncStatusResyncCreate(RequestOptions requestOptions) { .method("POST", RequestBody.create("", null)) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/generatekey/GenerateKeyClient.java b/src/main/java/com/merge/api/resources/hris/generatekey/GenerateKeyClient.java index 09688f98e..675af7e16 100644 --- a/src/main/java/com/merge/api/resources/hris/generatekey/GenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/hris/generatekey/GenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(GenerateRemoteKeyRequest request, RequestOptions request .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/generatekey/requests/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/resources/hris/generatekey/requests/GenerateRemoteKeyRequest.java index aa95d00e0..71f14dd46 100644 --- a/src/main/java/com/merge/api/resources/hris/generatekey/requests/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/resources/hris/generatekey/requests/GenerateRemoteKeyRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GenerateRemoteKeyRequest.Builder.class) public final class GenerateRemoteKeyRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); } @@ -95,7 +96,7 @@ public Builder from(GenerateRemoteKeyRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/groups/GroupsClient.java b/src/main/java/com/merge/api/resources/hris/groups/GroupsClient.java index 6bdf77148..bc0622a9a 100644 --- a/src/main/java/com/merge/api/resources/hris/groups/GroupsClient.java +++ b/src/main/java/com/merge/api/resources/hris/groups/GroupsClient.java @@ -108,7 +108,8 @@ public PaginatedGroupList list(GroupsListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -129,13 +130,6 @@ public PaginatedGroupList list(GroupsListRequest request, RequestOptions request } } - /** - * Returns a Group object with the given id. - */ - public Group retrieve(String id) { - return retrieve(id, GroupsRetrieveRequest.builder().build()); - } - /** * Returns a Group object with the given id. */ @@ -166,7 +160,8 @@ public Group retrieve(String id, GroupsRetrieveRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsListRequest.java b/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsListRequest.java index 817a0ea10..91e1d0f50 100644 --- a/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GroupsListRequest.Builder.class) public final class GroupsListRequest { private final Optional createdAfter; @@ -329,7 +329,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -340,7 +340,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -351,7 +351,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -362,7 +362,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -373,7 +373,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -384,7 +384,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -395,7 +395,7 @@ public Builder isCommonlyUsedAsTeam(Optional isCommonlyUsedAsTeam) { } public Builder isCommonlyUsedAsTeam(String isCommonlyUsedAsTeam) { - this.isCommonlyUsedAsTeam = Optional.of(isCommonlyUsedAsTeam); + this.isCommonlyUsedAsTeam = Optional.ofNullable(isCommonlyUsedAsTeam); return this; } @@ -406,7 +406,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -417,7 +417,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -428,7 +428,7 @@ public Builder names(Optional names) { } public Builder names(String names) { - this.names = Optional.of(names); + this.names = Optional.ofNullable(names); return this; } @@ -439,7 +439,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -450,7 +450,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -461,7 +461,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -472,7 +472,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -483,7 +483,7 @@ public Builder types(Optional types) { } public Builder types(String types) { - this.types = Optional.of(types); + this.types = Optional.ofNullable(types); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsRetrieveRequest.java index b4eb2e60d..0a465ae82 100644 --- a/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/groups/requests/GroupsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GroupsRetrieveRequest.Builder.class) public final class GroupsRetrieveRequest { private final Optional includeRemoteData; @@ -121,7 +121,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -132,7 +132,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -143,7 +143,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/issues/IssuesClient.java b/src/main/java/com/merge/api/resources/hris/issues/IssuesClient.java index c52499034..659893f92 100644 --- a/src/main/java/com/merge/api/resources/hris/issues/IssuesClient.java +++ b/src/main/java/com/merge/api/resources/hris/issues/IssuesClient.java @@ -105,7 +105,8 @@ public PaginatedIssueList list(IssuesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -147,6 +148,7 @@ public Issue retrieve(String id, RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/issues/requests/IssuesListRequest.java b/src/main/java/com/merge/api/resources/hris/issues/requests/IssuesListRequest.java index fc555d566..49cefd227 100644 --- a/src/main/java/com/merge/api/resources/hris/issues/requests/IssuesListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/issues/requests/IssuesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IssuesListRequest.Builder.class) public final class IssuesListRequest { private final Optional accountToken; @@ -308,7 +308,7 @@ public Builder accountToken(Optional accountToken) { } public Builder accountToken(String accountToken) { - this.accountToken = Optional.of(accountToken); + this.accountToken = Optional.ofNullable(accountToken); return this; } @@ -319,7 +319,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -330,7 +330,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -341,7 +341,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -352,7 +352,7 @@ public Builder firstIncidentTimeAfter(Optional firstIncidentTime } public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { - this.firstIncidentTimeAfter = Optional.of(firstIncidentTimeAfter); + this.firstIncidentTimeAfter = Optional.ofNullable(firstIncidentTimeAfter); return this; } @@ -363,7 +363,7 @@ public Builder firstIncidentTimeBefore(Optional firstIncidentTim } public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { - this.firstIncidentTimeBefore = Optional.of(firstIncidentTimeBefore); + this.firstIncidentTimeBefore = Optional.ofNullable(firstIncidentTimeBefore); return this; } @@ -374,7 +374,7 @@ public Builder includeMuted(Optional includeMuted) { } public Builder includeMuted(String includeMuted) { - this.includeMuted = Optional.of(includeMuted); + this.includeMuted = Optional.ofNullable(includeMuted); return this; } @@ -385,7 +385,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -396,7 +396,7 @@ public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAf } public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { - this.lastIncidentTimeAfter = Optional.of(lastIncidentTimeAfter); + this.lastIncidentTimeAfter = Optional.ofNullable(lastIncidentTimeAfter); return this; } @@ -407,7 +407,7 @@ public Builder lastIncidentTimeBefore(Optional lastIncidentTimeB } public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { - this.lastIncidentTimeBefore = Optional.of(lastIncidentTimeBefore); + this.lastIncidentTimeBefore = Optional.ofNullable(lastIncidentTimeBefore); return this; } @@ -418,7 +418,7 @@ public Builder linkedAccountId(Optional linkedAccountId) { } public Builder linkedAccountId(String linkedAccountId) { - this.linkedAccountId = Optional.of(linkedAccountId); + this.linkedAccountId = Optional.ofNullable(linkedAccountId); return this; } @@ -429,7 +429,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -440,7 +440,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -451,7 +451,7 @@ public Builder status(Optional status) { } public Builder status(IssuesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/linkedaccounts/LinkedAccountsClient.java b/src/main/java/com/merge/api/resources/hris/linkedaccounts/LinkedAccountsClient.java index 098a3402c..91e8a8bbd 100644 --- a/src/main/java/com/merge/api/resources/hris/linkedaccounts/LinkedAccountsClient.java +++ b/src/main/java/com/merge/api/resources/hris/linkedaccounts/LinkedAccountsClient.java @@ -98,7 +98,8 @@ public PaginatedAccountDetailsAndActionsList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/linkedaccounts/requests/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/resources/hris/linkedaccounts/requests/LinkedAccountsListRequest.java index a207b0e2d..aac10f43c 100644 --- a/src/main/java/com/merge/api/resources/hris/linkedaccounts/requests/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/linkedaccounts/requests/LinkedAccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountsListRequest.Builder.class) public final class LinkedAccountsListRequest { private final Optional category; @@ -301,7 +301,7 @@ public Builder category(Optional category) { } public Builder category(LinkedAccountsListRequestCategory category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -312,7 +312,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -323,7 +323,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -334,7 +334,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -345,7 +345,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -356,7 +356,7 @@ public Builder endUserOriginIds(Optional endUserOriginIds) { } public Builder endUserOriginIds(String endUserOriginIds) { - this.endUserOriginIds = Optional.of(endUserOriginIds); + this.endUserOriginIds = Optional.ofNullable(endUserOriginIds); return this; } @@ -367,7 +367,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -378,7 +378,7 @@ public Builder ids(Optional ids) { } public Builder ids(String ids) { - this.ids = Optional.of(ids); + this.ids = Optional.ofNullable(ids); return this; } @@ -389,7 +389,7 @@ public Builder includeDuplicates(Optional includeDuplicates) { } public Builder includeDuplicates(Boolean includeDuplicates) { - this.includeDuplicates = Optional.of(includeDuplicates); + this.includeDuplicates = Optional.ofNullable(includeDuplicates); return this; } @@ -400,7 +400,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -411,7 +411,7 @@ public Builder isTestAccount(Optional isTestAccount) { } public Builder isTestAccount(String isTestAccount) { - this.isTestAccount = Optional.of(isTestAccount); + this.isTestAccount = Optional.ofNullable(isTestAccount); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/linktoken/LinkTokenClient.java b/src/main/java/com/merge/api/resources/hris/linktoken/LinkTokenClient.java index f963ed998..09cf34fe5 100644 --- a/src/main/java/com/merge/api/resources/hris/linktoken/LinkTokenClient.java +++ b/src/main/java/com/merge/api/resources/hris/linktoken/LinkTokenClient.java @@ -55,6 +55,7 @@ public LinkToken create(EndUserDetailsRequest request, RequestOptions requestOpt .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/linktoken/requests/EndUserDetailsRequest.java b/src/main/java/com/merge/api/resources/hris/linktoken/requests/EndUserDetailsRequest.java index f109d422a..b787089c1 100644 --- a/src/main/java/com/merge/api/resources/hris/linktoken/requests/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/resources/hris/linktoken/requests/EndUserDetailsRequest.java @@ -23,8 +23,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EndUserDetailsRequest.Builder.class) public final class EndUserDetailsRequest { private final String endUserEmailAddress; @@ -252,17 +253,17 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { - EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress); + EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { - EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName); + EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { - _FinalStage endUserOriginId(String endUserOriginId); + _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { @@ -373,7 +374,7 @@ public Builder from(EndUserDetailsRequest other) { */ @java.lang.Override @JsonSetter("end_user_email_address") - public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress) { + public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @@ -384,7 +385,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddre */ @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @@ -395,7 +396,7 @@ public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationNa */ @java.lang.Override @JsonSetter("end_user_origin_id") - public _FinalStage endUserOriginId(String endUserOriginId) { + public _FinalStage endUserOriginId(@NotNull String endUserOriginId) { this.endUserOriginId = endUserOriginId; return this; } @@ -406,7 +407,7 @@ public _FinalStage endUserOriginId(String endUserOriginId) { */ @java.lang.Override public _FinalStage integrationSpecificConfig(Map integrationSpecificConfig) { - this.integrationSpecificConfig = Optional.of(integrationSpecificConfig); + this.integrationSpecificConfig = Optional.ofNullable(integrationSpecificConfig); return this; } @@ -423,7 +424,7 @@ public _FinalStage integrationSpecificConfig(Optional> int */ @java.lang.Override public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { - this.areSyncsDisabled = Optional.of(areSyncsDisabled); + this.areSyncsDisabled = Optional.ofNullable(areSyncsDisabled); return this; } @@ -444,7 +445,7 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { */ @java.lang.Override public _FinalStage language(LanguageEnum language) { - this.language = Optional.of(language); + this.language = Optional.ofNullable(language); return this; } @@ -462,7 +463,7 @@ public _FinalStage language(Optional language) { @java.lang.Override public _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes) { - this.categoryCommonModelScopes = Optional.of(categoryCommonModelScopes); + this.categoryCommonModelScopes = Optional.ofNullable(categoryCommonModelScopes); return this; } @@ -481,7 +482,7 @@ public _FinalStage categoryCommonModelScopes( */ @java.lang.Override public _FinalStage commonModels(List commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -498,7 +499,7 @@ public _FinalStage commonModels(Optional> com */ @java.lang.Override public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { - this.hideAdminMagicLink = Optional.of(hideAdminMagicLink); + this.hideAdminMagicLink = Optional.ofNullable(hideAdminMagicLink); return this; } @@ -515,7 +516,7 @@ public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { */ @java.lang.Override public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { - this.shouldCreateMagicLinkUrl = Optional.of(shouldCreateMagicLinkUrl); + this.shouldCreateMagicLinkUrl = Optional.ofNullable(shouldCreateMagicLinkUrl); return this; } @@ -532,7 +533,7 @@ public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicL */ @java.lang.Override public _FinalStage linkExpiryMins(Integer linkExpiryMins) { - this.linkExpiryMins = Optional.of(linkExpiryMins); + this.linkExpiryMins = Optional.ofNullable(linkExpiryMins); return this; } @@ -549,7 +550,7 @@ public _FinalStage linkExpiryMins(Optional linkExpiryMins) { */ @java.lang.Override public _FinalStage integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/locations/LocationsClient.java b/src/main/java/com/merge/api/resources/hris/locations/LocationsClient.java index 79e1acfe1..2b3a85daa 100644 --- a/src/main/java/com/merge/api/resources/hris/locations/LocationsClient.java +++ b/src/main/java/com/merge/api/resources/hris/locations/LocationsClient.java @@ -102,7 +102,8 @@ public PaginatedLocationList list(LocationsListRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -123,13 +124,6 @@ public PaginatedLocationList list(LocationsListRequest request, RequestOptions r } } - /** - * Returns a Location object with the given id. - */ - public Location retrieve(String id) { - return retrieve(id, LocationsRetrieveRequest.builder().build()); - } - /** * Returns a Location object with the given id. */ @@ -161,7 +155,8 @@ public Location retrieve(String id, LocationsRetrieveRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsListRequest.java b/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsListRequest.java index d2c69bf4f..e4387d592 100644 --- a/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsListRequest.java @@ -21,7 +21,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LocationsListRequest.Builder.class) public final class LocationsListRequest { private final Optional createdAfter; @@ -302,7 +302,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -313,7 +313,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -324,7 +324,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -335,7 +335,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -346,7 +346,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -357,7 +357,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -368,7 +368,7 @@ public Builder locationType(Optional locationT } public Builder locationType(LocationsListRequestLocationType locationType) { - this.locationType = Optional.of(locationType); + this.locationType = Optional.ofNullable(locationType); return this; } @@ -379,7 +379,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -390,7 +390,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -401,7 +401,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -412,7 +412,7 @@ public Builder remoteFields(Optional remoteFie } public Builder remoteFields(LocationsListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -423,7 +423,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -434,7 +434,7 @@ public Builder showEnumOrigins(Optional sho } public Builder showEnumOrigins(LocationsListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsRetrieveRequest.java index b5222b863..684e004c8 100644 --- a/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/locations/requests/LocationsRetrieveRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LocationsRetrieveRequest.Builder.class) public final class LocationsRetrieveRequest { private final Optional includeRemoteData; @@ -123,7 +123,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -134,7 +134,7 @@ public Builder remoteFields(Optional remot } public Builder remoteFields(LocationsRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -145,7 +145,7 @@ public Builder showEnumOrigins(Optional } public Builder showEnumOrigins(LocationsRetrieveRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/paygroups/PayGroupsClient.java b/src/main/java/com/merge/api/resources/hris/paygroups/PayGroupsClient.java index 3921ad8e9..31396e980 100644 --- a/src/main/java/com/merge/api/resources/hris/paygroups/PayGroupsClient.java +++ b/src/main/java/com/merge/api/resources/hris/paygroups/PayGroupsClient.java @@ -90,7 +90,8 @@ public PaginatedPayGroupList list(PayGroupsListRequest request, RequestOptions r .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedPayGroupList list(PayGroupsListRequest request, RequestOptions r } } - /** - * Returns a PayGroup object with the given id. - */ - public PayGroup retrieve(String id) { - return retrieve(id, PayGroupsRetrieveRequest.builder().build()); - } - /** * Returns a PayGroup object with the given id. */ @@ -141,7 +135,8 @@ public PayGroup retrieve(String id, PayGroupsRetrieveRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsListRequest.java b/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsListRequest.java index 79a4f8d11..0040a0b1f 100644 --- a/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PayGroupsListRequest.Builder.class) public final class PayGroupsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsRetrieveRequest.java index 3c4948036..88c31349a 100644 --- a/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/paygroups/requests/PayGroupsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PayGroupsRetrieveRequest.Builder.class) public final class PayGroupsRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/payrollruns/PayrollRunsClient.java b/src/main/java/com/merge/api/resources/hris/payrollruns/PayrollRunsClient.java index 7855a7f63..b19e6ae92 100644 --- a/src/main/java/com/merge/api/resources/hris/payrollruns/PayrollRunsClient.java +++ b/src/main/java/com/merge/api/resources/hris/payrollruns/PayrollRunsClient.java @@ -117,7 +117,8 @@ public PaginatedPayrollRunList list(PayrollRunsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -138,13 +139,6 @@ public PaginatedPayrollRunList list(PayrollRunsListRequest request, RequestOptio } } - /** - * Returns a PayrollRun object with the given id. - */ - public PayrollRun retrieve(String id) { - return retrieve(id, PayrollRunsRetrieveRequest.builder().build()); - } - /** * Returns a PayrollRun object with the given id. */ @@ -176,7 +170,8 @@ public PayrollRun retrieve(String id, PayrollRunsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsListRequest.java b/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsListRequest.java index 62568d430..f5b0d0101 100644 --- a/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsListRequest.java @@ -21,7 +21,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PayrollRunsListRequest.Builder.class) public final class PayrollRunsListRequest { private final Optional createdAfter; @@ -373,7 +373,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -384,7 +384,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -395,7 +395,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -406,7 +406,7 @@ public Builder endedAfter(Optional endedAfter) { } public Builder endedAfter(OffsetDateTime endedAfter) { - this.endedAfter = Optional.of(endedAfter); + this.endedAfter = Optional.ofNullable(endedAfter); return this; } @@ -417,7 +417,7 @@ public Builder endedBefore(Optional endedBefore) { } public Builder endedBefore(OffsetDateTime endedBefore) { - this.endedBefore = Optional.of(endedBefore); + this.endedBefore = Optional.ofNullable(endedBefore); return this; } @@ -428,7 +428,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -439,7 +439,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -450,7 +450,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -461,7 +461,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -472,7 +472,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -483,7 +483,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -494,7 +494,7 @@ public Builder remoteFields(Optional remoteF } public Builder remoteFields(PayrollRunsListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -505,7 +505,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -516,7 +516,7 @@ public Builder runType(Optional runType) { } public Builder runType(PayrollRunsListRequestRunType runType) { - this.runType = Optional.of(runType); + this.runType = Optional.ofNullable(runType); return this; } @@ -527,7 +527,7 @@ public Builder showEnumOrigins(Optional s } public Builder showEnumOrigins(PayrollRunsListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -538,7 +538,7 @@ public Builder startedAfter(Optional startedAfter) { } public Builder startedAfter(OffsetDateTime startedAfter) { - this.startedAfter = Optional.of(startedAfter); + this.startedAfter = Optional.ofNullable(startedAfter); return this; } @@ -549,7 +549,7 @@ public Builder startedBefore(Optional startedBefore) { } public Builder startedBefore(OffsetDateTime startedBefore) { - this.startedBefore = Optional.of(startedBefore); + this.startedBefore = Optional.ofNullable(startedBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsRetrieveRequest.java index f2c3981be..49d673072 100644 --- a/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/payrollruns/requests/PayrollRunsRetrieveRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PayrollRunsRetrieveRequest.Builder.class) public final class PayrollRunsRetrieveRequest { private final Optional includeRemoteData; @@ -123,7 +123,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -134,7 +134,7 @@ public Builder remoteFields(Optional rem } public Builder remoteFields(PayrollRunsRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -145,7 +145,7 @@ public Builder showEnumOrigins(Optional commonModels; diff --git a/src/main/java/com/merge/api/resources/hris/syncstatus/SyncStatusClient.java b/src/main/java/com/merge/api/resources/hris/syncstatus/SyncStatusClient.java index f0251cbc5..02e60fd11 100644 --- a/src/main/java/com/merge/api/resources/hris/syncstatus/SyncStatusClient.java +++ b/src/main/java/com/merge/api/resources/hris/syncstatus/SyncStatusClient.java @@ -56,7 +56,8 @@ public PaginatedSyncStatusList list(SyncStatusListRequest request, RequestOption .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/syncstatus/requests/SyncStatusListRequest.java b/src/main/java/com/merge/api/resources/hris/syncstatus/requests/SyncStatusListRequest.java index 721c64da7..bcca9b918 100644 --- a/src/main/java/com/merge/api/resources/hris/syncstatus/requests/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/syncstatus/requests/SyncStatusListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatusListRequest.Builder.class) public final class SyncStatusListRequest { private final Optional cursor; @@ -102,7 +102,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -113,7 +113,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/teams/TeamsClient.java b/src/main/java/com/merge/api/resources/hris/teams/TeamsClient.java index 832d67a3f..610e7999f 100644 --- a/src/main/java/com/merge/api/resources/hris/teams/TeamsClient.java +++ b/src/main/java/com/merge/api/resources/hris/teams/TeamsClient.java @@ -97,7 +97,8 @@ public PaginatedTeamList list(TeamsListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -118,13 +119,6 @@ public PaginatedTeamList list(TeamsListRequest request, RequestOptions requestOp } } - /** - * Returns a Team object with the given id. - */ - public Team retrieve(String id) { - return retrieve(id, TeamsRetrieveRequest.builder().build()); - } - /** * Returns a Team object with the given id. */ @@ -151,7 +145,8 @@ public Team retrieve(String id, TeamsRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsListRequest.java b/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsListRequest.java index 0f0a68337..91437cb20 100644 --- a/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TeamsListRequest.Builder.class) public final class TeamsListRequest { private final Optional createdAfter; @@ -278,7 +278,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -289,7 +289,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -300,7 +300,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -311,7 +311,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -322,7 +322,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -333,7 +333,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -344,7 +344,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -355,7 +355,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -366,7 +366,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -377,7 +377,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -388,7 +388,7 @@ public Builder parentTeamId(Optional parentTeamId) { } public Builder parentTeamId(String parentTeamId) { - this.parentTeamId = Optional.of(parentTeamId); + this.parentTeamId = Optional.ofNullable(parentTeamId); return this; } @@ -399,7 +399,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsRetrieveRequest.java index 626372c1f..93812850b 100644 --- a/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/teams/requests/TeamsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TeamsRetrieveRequest.Builder.class) public final class TeamsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timeoff/TimeOffClient.java b/src/main/java/com/merge/api/resources/hris/timeoff/TimeOffClient.java index 377d92edc..95051b2fa 100644 --- a/src/main/java/com/merge/api/resources/hris/timeoff/TimeOffClient.java +++ b/src/main/java/com/merge/api/resources/hris/timeoff/TimeOffClient.java @@ -137,7 +137,8 @@ public PaginatedTimeOffList list(TimeOffListRequest request, RequestOptions requ .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -192,7 +193,8 @@ public TimeOffResponse create(TimeOffEndpointRequest request, RequestOptions req .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -213,13 +215,6 @@ public TimeOffResponse create(TimeOffEndpointRequest request, RequestOptions req } } - /** - * Returns a TimeOff object with the given id. - */ - public TimeOff retrieve(String id) { - return retrieve(id, TimeOffRetrieveRequest.builder().build()); - } - /** * Returns a TimeOff object with the given id. */ @@ -254,7 +249,8 @@ public TimeOff retrieve(String id, TimeOffRetrieveRequest request, RequestOption .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -295,6 +291,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffEndpointRequest.java b/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffEndpointRequest.java index 9582410c9..aa5ae6d3a 100644 --- a/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffEndpointRequest.Builder.class) public final class TimeOffEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(TimeOffRequest model); + _FinalStage model(@NotNull TimeOffRequest model); Builder from(TimeOffEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(TimeOffEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(TimeOffRequest model) { + public _FinalStage model(@NotNull TimeOffRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(TimeOffRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffListRequest.java b/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffListRequest.java index 280176e83..6502ca746 100644 --- a/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffListRequest.java @@ -23,7 +23,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffListRequest.Builder.class) public final class TimeOffListRequest { private final Optional approverId; @@ -451,7 +451,7 @@ public Builder approverId(Optional approverId) { } public Builder approverId(String approverId) { - this.approverId = Optional.of(approverId); + this.approverId = Optional.ofNullable(approverId); return this; } @@ -462,7 +462,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -473,7 +473,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -484,7 +484,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -495,7 +495,7 @@ public Builder employeeId(Optional employeeId) { } public Builder employeeId(String employeeId) { - this.employeeId = Optional.of(employeeId); + this.employeeId = Optional.ofNullable(employeeId); return this; } @@ -506,7 +506,7 @@ public Builder endedAfter(Optional endedAfter) { } public Builder endedAfter(OffsetDateTime endedAfter) { - this.endedAfter = Optional.of(endedAfter); + this.endedAfter = Optional.ofNullable(endedAfter); return this; } @@ -517,7 +517,7 @@ public Builder endedBefore(Optional endedBefore) { } public Builder endedBefore(OffsetDateTime endedBefore) { - this.endedBefore = Optional.of(endedBefore); + this.endedBefore = Optional.ofNullable(endedBefore); return this; } @@ -528,7 +528,7 @@ public Builder expand(Optional expand) { } public Builder expand(TimeOffListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -539,7 +539,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -550,7 +550,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -561,7 +561,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -572,7 +572,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -583,7 +583,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -594,7 +594,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -605,7 +605,7 @@ public Builder remoteFields(Optional remoteField } public Builder remoteFields(TimeOffListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -616,7 +616,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -627,7 +627,7 @@ public Builder requestType(Optional requestType) } public Builder requestType(TimeOffListRequestRequestType requestType) { - this.requestType = Optional.of(requestType); + this.requestType = Optional.ofNullable(requestType); return this; } @@ -638,7 +638,7 @@ public Builder showEnumOrigins(Optional showE } public Builder showEnumOrigins(TimeOffListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -649,7 +649,7 @@ public Builder startedAfter(Optional startedAfter) { } public Builder startedAfter(OffsetDateTime startedAfter) { - this.startedAfter = Optional.of(startedAfter); + this.startedAfter = Optional.ofNullable(startedAfter); return this; } @@ -660,7 +660,7 @@ public Builder startedBefore(Optional startedBefore) { } public Builder startedBefore(OffsetDateTime startedBefore) { - this.startedBefore = Optional.of(startedBefore); + this.startedBefore = Optional.ofNullable(startedBefore); return this; } @@ -671,7 +671,7 @@ public Builder status(Optional status) { } public Builder status(TimeOffListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffRetrieveRequest.java index 63d2d0113..59bfb6a1e 100644 --- a/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timeoff/requests/TimeOffRetrieveRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffRetrieveRequest.Builder.class) public final class TimeOffRetrieveRequest { private final Optional expand; @@ -140,7 +140,7 @@ public Builder expand(Optional expand) { } public Builder expand(TimeOffRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -151,7 +151,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -162,7 +162,7 @@ public Builder remoteFields(Optional remoteF } public Builder remoteFields(TimeOffRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -173,7 +173,7 @@ public Builder showEnumOrigins(Optional s } public Builder showEnumOrigins(TimeOffRetrieveRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timeoffbalances/TimeOffBalancesClient.java b/src/main/java/com/merge/api/resources/hris/timeoffbalances/TimeOffBalancesClient.java index d43e6164d..b0423fbb2 100644 --- a/src/main/java/com/merge/api/resources/hris/timeoffbalances/TimeOffBalancesClient.java +++ b/src/main/java/com/merge/api/resources/hris/timeoffbalances/TimeOffBalancesClient.java @@ -107,7 +107,8 @@ public PaginatedTimeOffBalanceList list(TimeOffBalancesListRequest request, Requ .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -128,13 +129,6 @@ public PaginatedTimeOffBalanceList list(TimeOffBalancesListRequest request, Requ } } - /** - * Returns a TimeOffBalance object with the given id. - */ - public TimeOffBalance retrieve(String id) { - return retrieve(id, TimeOffBalancesRetrieveRequest.builder().build()); - } - /** * Returns a TimeOffBalance object with the given id. */ @@ -168,7 +162,8 @@ public TimeOffBalance retrieve(String id, TimeOffBalancesRetrieveRequest request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesListRequest.java b/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesListRequest.java index 125826254..2ca29297d 100644 --- a/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffBalancesListRequest.Builder.class) public final class TimeOffBalancesListRequest { private final Optional createdAfter; @@ -338,7 +338,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -349,7 +349,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -360,7 +360,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -371,7 +371,7 @@ public Builder employeeId(Optional employeeId) { } public Builder employeeId(String employeeId) { - this.employeeId = Optional.of(employeeId); + this.employeeId = Optional.ofNullable(employeeId); return this; } @@ -382,7 +382,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -393,7 +393,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -404,7 +404,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -415,7 +415,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -426,7 +426,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -437,7 +437,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -448,7 +448,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -459,7 +459,7 @@ public Builder policyType(Optional policyT } public Builder policyType(TimeOffBalancesListRequestPolicyType policyType) { - this.policyType = Optional.of(policyType); + this.policyType = Optional.ofNullable(policyType); return this; } @@ -470,7 +470,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -481,7 +481,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -492,7 +492,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesRetrieveRequest.java index a2f18c4d5..c683548d2 100644 --- a/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timeoffbalances/requests/TimeOffBalancesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffBalancesRetrieveRequest.Builder.class) public final class TimeOffBalancesRetrieveRequest { private final Optional expand; @@ -137,7 +137,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -148,7 +148,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -159,7 +159,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -170,7 +170,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timesheetentries/TimesheetEntriesClient.java b/src/main/java/com/merge/api/resources/hris/timesheetentries/TimesheetEntriesClient.java index f8b7f4d43..a779fc5ff 100644 --- a/src/main/java/com/merge/api/resources/hris/timesheetentries/TimesheetEntriesClient.java +++ b/src/main/java/com/merge/api/resources/hris/timesheetentries/TimesheetEntriesClient.java @@ -122,7 +122,8 @@ public PaginatedTimesheetEntryList list(TimesheetEntriesListRequest request, Req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -177,7 +178,8 @@ public TimesheetEntryResponse create(TimesheetEntryEndpointRequest request, Requ .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -198,13 +200,6 @@ public TimesheetEntryResponse create(TimesheetEntryEndpointRequest request, Requ } } - /** - * Returns a TimesheetEntry object with the given id. - */ - public TimesheetEntry retrieve(String id) { - return retrieve(id, TimesheetEntriesRetrieveRequest.builder().build()); - } - /** * Returns a TimesheetEntry object with the given id. */ @@ -231,7 +226,8 @@ public TimesheetEntry retrieve(String id, TimesheetEntriesRetrieveRequest reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -272,6 +268,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesListRequest.java b/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesListRequest.java index 63510799c..add966ea4 100644 --- a/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesListRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimesheetEntriesListRequest.Builder.class) public final class TimesheetEntriesListRequest { private final Optional createdAfter; @@ -364,7 +364,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -375,7 +375,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -386,7 +386,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -397,7 +397,7 @@ public Builder employeeId(Optional employeeId) { } public Builder employeeId(String employeeId) { - this.employeeId = Optional.of(employeeId); + this.employeeId = Optional.ofNullable(employeeId); return this; } @@ -408,7 +408,7 @@ public Builder endedAfter(Optional endedAfter) { } public Builder endedAfter(OffsetDateTime endedAfter) { - this.endedAfter = Optional.of(endedAfter); + this.endedAfter = Optional.ofNullable(endedAfter); return this; } @@ -419,7 +419,7 @@ public Builder endedBefore(Optional endedBefore) { } public Builder endedBefore(OffsetDateTime endedBefore) { - this.endedBefore = Optional.of(endedBefore); + this.endedBefore = Optional.ofNullable(endedBefore); return this; } @@ -430,7 +430,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -441,7 +441,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -452,7 +452,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -463,7 +463,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -474,7 +474,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -485,7 +485,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -496,7 +496,7 @@ public Builder orderBy(Optional orderBy) { } public Builder orderBy(TimesheetEntriesListRequestOrderBy orderBy) { - this.orderBy = Optional.of(orderBy); + this.orderBy = Optional.ofNullable(orderBy); return this; } @@ -507,7 +507,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -518,7 +518,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -529,7 +529,7 @@ public Builder startedAfter(Optional startedAfter) { } public Builder startedAfter(OffsetDateTime startedAfter) { - this.startedAfter = Optional.of(startedAfter); + this.startedAfter = Optional.ofNullable(startedAfter); return this; } @@ -540,7 +540,7 @@ public Builder startedBefore(Optional startedBefore) { } public Builder startedBefore(OffsetDateTime startedBefore) { - this.startedBefore = Optional.of(startedBefore); + this.startedBefore = Optional.ofNullable(startedBefore); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesRetrieveRequest.java b/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesRetrieveRequest.java index fd73a1d31..81deb020b 100644 --- a/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntriesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimesheetEntriesRetrieveRequest.Builder.class) public final class TimesheetEntriesRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntryEndpointRequest.java b/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntryEndpointRequest.java index 2abae6213..9882348ec 100644 --- a/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntryEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/hris/timesheetentries/requests/TimesheetEntryEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimesheetEntryEndpointRequest.Builder.class) public final class TimesheetEntryEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(TimesheetEntryRequest model); + _FinalStage model(@NotNull TimesheetEntryRequest model); Builder from(TimesheetEntryEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(TimesheetEntryEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(TimesheetEntryRequest model) { + public _FinalStage model(@NotNull TimesheetEntryRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(TimesheetEntryRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AccountDetails.java b/src/main/java/com/merge/api/resources/hris/types/AccountDetails.java index 47865bdf3..6f1537888 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AccountDetails.java +++ b/src/main/java/com/merge/api/resources/hris/types/AccountDetails.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetails.Builder.class) public final class AccountDetails { private final Optional id; @@ -248,7 +248,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -259,7 +259,7 @@ public Builder integration(Optional integration) { } public Builder integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -270,7 +270,7 @@ public Builder integrationSlug(Optional integrationSlug) { } public Builder integrationSlug(String integrationSlug) { - this.integrationSlug = Optional.of(integrationSlug); + this.integrationSlug = Optional.ofNullable(integrationSlug); return this; } @@ -281,7 +281,7 @@ public Builder category(Optional category) { } public Builder category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -292,7 +292,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -303,7 +303,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -314,7 +314,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -325,7 +325,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -336,7 +336,7 @@ public Builder webhookListenerUrl(Optional webhookListenerUrl) { } public Builder webhookListenerUrl(String webhookListenerUrl) { - this.webhookListenerUrl = Optional.of(webhookListenerUrl); + this.webhookListenerUrl = Optional.ofNullable(webhookListenerUrl); return this; } @@ -347,7 +347,7 @@ public Builder isDuplicate(Optional isDuplicate) { } public Builder isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -358,7 +358,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(String accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -369,7 +369,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActions.java index 2fd4ef29a..0725c36db 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActions.Builder.class) public final class AccountDetailsAndActions { private final String id; @@ -206,33 +207,33 @@ public static IdStage builder() { } public interface IdStage { - StatusStage id(String id); + StatusStage id(@NotNull String id); Builder from(AccountDetailsAndActions other); } public interface StatusStage { - EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); } public interface EndUserOrganizationNameStage { - EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName); + EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserEmailAddressStage { - WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress); + WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress); } public interface WebhookListenerUrlStage { - AccountTypeStage webhookListenerUrl(String webhookListenerUrl); + AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl); } public interface AccountTypeStage { - CompletedAtStage accountType(String accountType); + CompletedAtStage accountType(@NotNull String accountType); } public interface CompletedAtStage { - _FinalStage completedAt(OffsetDateTime completedAt); + _FinalStage completedAt(@NotNull OffsetDateTime completedAt); } public interface _FinalStage { @@ -324,56 +325,56 @@ public Builder from(AccountDetailsAndActions other) { @java.lang.Override @JsonSetter("id") - public StatusStage id(String id) { + public StatusStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { this.status = status; return this; } @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @java.lang.Override @JsonSetter("end_user_email_address") - public WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress) { + public WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @java.lang.Override @JsonSetter("webhook_listener_url") - public AccountTypeStage webhookListenerUrl(String webhookListenerUrl) { + public AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl) { this.webhookListenerUrl = webhookListenerUrl; return this; } @java.lang.Override @JsonSetter("account_type") - public CompletedAtStage accountType(String accountType) { + public CompletedAtStage accountType(@NotNull String accountType) { this.accountType = accountType; return this; } @java.lang.Override @JsonSetter("completed_at") - public _FinalStage completedAt(OffsetDateTime completedAt) { + public _FinalStage completedAt(@NotNull OffsetDateTime completedAt) { this.completedAt = completedAt; return this; } @java.lang.Override public _FinalStage integration(AccountDetailsAndActionsIntegration integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -390,7 +391,7 @@ public _FinalStage integration(Optional int */ @java.lang.Override public _FinalStage isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -407,7 +408,7 @@ public _FinalStage isDuplicate(Optional isDuplicate) { */ @java.lang.Override public _FinalStage subdomain(String subdomain) { - this.subdomain = Optional.of(subdomain); + this.subdomain = Optional.ofNullable(subdomain); return this; } @@ -420,7 +421,7 @@ public _FinalStage subdomain(Optional subdomain) { @java.lang.Override public _FinalStage endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -433,7 +434,7 @@ public _FinalStage endUserOriginId(Optional endUserOriginId) { @java.lang.Override public _FinalStage statusDetail(String statusDetail) { - this.statusDetail = Optional.of(statusDetail); + this.statusDetail = Optional.ofNullable(statusDetail); return this; } @@ -446,7 +447,7 @@ public _FinalStage statusDetail(Optional statusDetail) { @java.lang.Override public _FinalStage category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActionsIntegration.java b/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActionsIntegration.java index 62afd70cb..84e57e91e 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActionsIntegration.java +++ b/src/main/java/com/merge/api/resources/hris/types/AccountDetailsAndActionsIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActionsIntegration.Builder.class) public final class AccountDetailsAndActionsIntegration { private final String name; @@ -147,17 +148,17 @@ public static NameStage builder() { } public interface NameStage { - ColorStage name(String name); + ColorStage name(@NotNull String name); Builder from(AccountDetailsAndActionsIntegration other); } public interface ColorStage { - SlugStage color(String color); + SlugStage color(@NotNull String color); } public interface SlugStage { - PassthroughAvailableStage slug(String slug); + PassthroughAvailableStage slug(@NotNull String slug); } public interface PassthroughAvailableStage { @@ -225,21 +226,21 @@ public Builder from(AccountDetailsAndActionsIntegration other) { @java.lang.Override @JsonSetter("name") - public ColorStage name(String name) { + public ColorStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("color") - public SlugStage color(String color) { + public SlugStage color(@NotNull String color) { this.color = color; return this; } @java.lang.Override @JsonSetter("slug") - public PassthroughAvailableStage slug(String slug) { + public PassthroughAvailableStage slug(@NotNull String slug) { this.slug = slug; return this; } @@ -253,7 +254,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } @@ -266,7 +267,7 @@ public _FinalStage availableModelOperations(Optional> avail @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -279,7 +280,7 @@ public _FinalStage squareImage(Optional squareImage) { @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AccountIntegration.java b/src/main/java/com/merge/api/resources/hris/types/AccountIntegration.java index 19e77019c..54d691f72 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/resources/hris/types/AccountIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountIntegration.Builder.class) public final class AccountIntegration { private final String name; @@ -195,7 +196,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); } @@ -288,7 +289,7 @@ public Builder from(AccountIntegration other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } @@ -299,7 +300,7 @@ public _FinalStage name(String name) { */ @java.lang.Override public _FinalStage categoryBetaStatus(Map categoryBetaStatus) { - this.categoryBetaStatus = Optional.of(categoryBetaStatus); + this.categoryBetaStatus = Optional.ofNullable(categoryBetaStatus); return this; } @@ -316,7 +317,7 @@ public _FinalStage categoryBetaStatus(Optional> categoryBe */ @java.lang.Override public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { - this.webhookSetupGuideUrl = Optional.of(webhookSetupGuideUrl); + this.webhookSetupGuideUrl = Optional.ofNullable(webhookSetupGuideUrl); return this; } @@ -333,7 +334,7 @@ public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { */ @java.lang.Override public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls) { - this.apiEndpointsToDocumentationUrls = Optional.of(apiEndpointsToDocumentationUrls); + this.apiEndpointsToDocumentationUrls = Optional.ofNullable(apiEndpointsToDocumentationUrls); return this; } @@ -347,7 +348,7 @@ public _FinalStage apiEndpointsToDocumentationUrls( @java.lang.Override public _FinalStage slug(String slug) { - this.slug = Optional.of(slug); + this.slug = Optional.ofNullable(slug); return this; } @@ -364,7 +365,7 @@ public _FinalStage slug(Optional slug) { */ @java.lang.Override public _FinalStage color(String color) { - this.color = Optional.of(color); + this.color = Optional.ofNullable(color); return this; } @@ -381,7 +382,7 @@ public _FinalStage color(Optional color) { */ @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -398,7 +399,7 @@ public _FinalStage squareImage(Optional squareImage) { */ @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } @@ -415,7 +416,7 @@ public _FinalStage image(Optional image) { */ @java.lang.Override public _FinalStage categories(List categories) { - this.categories = Optional.of(categories); + this.categories = Optional.ofNullable(categories); return this; } @@ -432,7 +433,7 @@ public _FinalStage categories(Optional> categories) { */ @java.lang.Override public _FinalStage abbreviatedName(String abbreviatedName) { - this.abbreviatedName = Optional.of(abbreviatedName); + this.abbreviatedName = Optional.ofNullable(abbreviatedName); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AccountToken.java b/src/main/java/com/merge/api/resources/hris/types/AccountToken.java index fde021398..cc5fe635f 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AccountToken.java +++ b/src/main/java/com/merge/api/resources/hris/types/AccountToken.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountToken.Builder.class) public final class AccountToken { private final String accountToken; @@ -71,13 +72,13 @@ public static AccountTokenStage builder() { } public interface AccountTokenStage { - IntegrationStage accountToken(String accountToken); + IntegrationStage accountToken(@NotNull String accountToken); Builder from(AccountToken other); } public interface IntegrationStage { - _FinalStage integration(AccountIntegration integration); + _FinalStage integration(@NotNull AccountIntegration integration); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(AccountToken other) { @java.lang.Override @JsonSetter("account_token") - public IntegrationStage accountToken(String accountToken) { + public IntegrationStage accountToken(@NotNull String accountToken) { this.accountToken = accountToken; return this; } @java.lang.Override @JsonSetter("integration") - public _FinalStage integration(AccountIntegration integration) { + public _FinalStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AdvancedMetadata.java b/src/main/java/com/merge/api/resources/hris/types/AdvancedMetadata.java index fc038d406..ef17ab471 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AdvancedMetadata.java +++ b/src/main/java/com/merge/api/resources/hris/types/AdvancedMetadata.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AdvancedMetadata.Builder.class) public final class AdvancedMetadata { private final String id; @@ -119,7 +120,7 @@ public static IdStage builder() { } public interface IdStage { - _FinalStage id(String id); + _FinalStage id(@NotNull String id); Builder from(AdvancedMetadata other); } @@ -180,14 +181,14 @@ public Builder from(AdvancedMetadata other) { @java.lang.Override @JsonSetter("id") - public _FinalStage id(String id) { + public _FinalStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override public _FinalStage fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -200,7 +201,7 @@ public _FinalStage fieldChoices(Optional> fieldChoices) { @java.lang.Override public _FinalStage isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -213,7 +214,7 @@ public _FinalStage isCustom(Optional isCustom) { @java.lang.Override public _FinalStage isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -226,7 +227,7 @@ public _FinalStage isRequired(Optional isRequired) { @java.lang.Override public _FinalStage description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -239,7 +240,7 @@ public _FinalStage description(Optional description) { @java.lang.Override public _FinalStage displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AsyncPassthroughReciept.java b/src/main/java/com/merge/api/resources/hris/types/AsyncPassthroughReciept.java index c438ec325..cae9e2f50 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AsyncPassthroughReciept.java +++ b/src/main/java/com/merge/api/resources/hris/types/AsyncPassthroughReciept.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPassthroughReciept.Builder.class) public final class AsyncPassthroughReciept { private final String asyncPassthroughReceiptId; @@ -62,7 +63,7 @@ public static AsyncPassthroughReceiptIdStage builder() { } public interface AsyncPassthroughReceiptIdStage { - _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId); + _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId); Builder from(AsyncPassthroughReciept other); } @@ -88,7 +89,7 @@ public Builder from(AsyncPassthroughReciept other) { @java.lang.Override @JsonSetter("async_passthrough_receipt_id") - public _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId) { + public _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId) { this.asyncPassthroughReceiptId = asyncPassthroughReceiptId; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AuditLogEvent.java b/src/main/java/com/merge/api/resources/hris/types/AuditLogEvent.java index 0b2485fe0..5ed7afabc 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/resources/hris/types/AuditLogEvent.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditLogEvent.Builder.class) public final class AuditLogEvent { private final Optional id; @@ -208,21 +209,21 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(AuditLogEventRole role); + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } public interface IpAddressStage { - EventTypeStage ipAddress(String ipAddress); + EventTypeStage ipAddress(@NotNull String ipAddress); } public interface EventTypeStage { - EventDescriptionStage eventType(AuditLogEventEventType eventType); + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { - _FinalStage eventDescription(String eventDescription); + _FinalStage eventDescription(@NotNull String eventDescription); } public interface _FinalStage { @@ -296,14 +297,14 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(AuditLogEventRole role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @java.lang.Override @JsonSetter("ip_address") - public EventTypeStage ipAddress(String ipAddress) { + public EventTypeStage ipAddress(@NotNull String ipAddress) { this.ipAddress = ipAddress; return this; } @@ -357,21 +358,21 @@ public EventTypeStage ipAddress(String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(AuditLogEventEventType eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @java.lang.Override @JsonSetter("event_description") - public _FinalStage eventDescription(String eventDescription) { + public _FinalStage eventDescription(@NotNull String eventDescription) { this.eventDescription = eventDescription; return this; } @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -388,7 +389,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } @@ -405,7 +406,7 @@ public _FinalStage userEmail(Optional userEmail) { */ @java.lang.Override public _FinalStage userName(String userName) { - this.userName = Optional.of(userName); + this.userName = Optional.ofNullable(userName); return this; } @@ -418,7 +419,7 @@ public _FinalStage userName(Optional userName) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/AvailableActions.java b/src/main/java/com/merge/api/resources/hris/types/AvailableActions.java index 43164e76b..0606c272b 100644 --- a/src/main/java/com/merge/api/resources/hris/types/AvailableActions.java +++ b/src/main/java/com/merge/api/resources/hris/types/AvailableActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AvailableActions.Builder.class) public final class AvailableActions { private final AccountIntegration integration; @@ -87,7 +88,7 @@ public static IntegrationStage builder() { } public interface IntegrationStage { - PassthroughAvailableStage integration(AccountIntegration integration); + PassthroughAvailableStage integration(@NotNull AccountIntegration integration); Builder from(AvailableActions other); } @@ -127,7 +128,7 @@ public Builder from(AvailableActions other) { @java.lang.Override @JsonSetter("integration") - public PassthroughAvailableStage integration(AccountIntegration integration) { + public PassthroughAvailableStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } @@ -141,7 +142,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/BankInfo.java b/src/main/java/com/merge/api/resources/hris/types/BankInfo.java index 003613791..85d3963ec 100644 --- a/src/main/java/com/merge/api/resources/hris/types/BankInfo.java +++ b/src/main/java/com/merge/api/resources/hris/types/BankInfo.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = BankInfo.Builder.class) public final class BankInfo { private final Optional id; @@ -292,7 +292,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -303,7 +303,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -314,7 +314,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -325,7 +325,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -336,7 +336,7 @@ public Builder employee(Optional employee) { } public Builder employee(BankInfoEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -347,7 +347,7 @@ public Builder accountNumber(Optional accountNumber) { } public Builder accountNumber(String accountNumber) { - this.accountNumber = Optional.of(accountNumber); + this.accountNumber = Optional.ofNullable(accountNumber); return this; } @@ -358,7 +358,7 @@ public Builder routingNumber(Optional routingNumber) { } public Builder routingNumber(String routingNumber) { - this.routingNumber = Optional.of(routingNumber); + this.routingNumber = Optional.ofNullable(routingNumber); return this; } @@ -369,7 +369,7 @@ public Builder bankName(Optional bankName) { } public Builder bankName(String bankName) { - this.bankName = Optional.of(bankName); + this.bankName = Optional.ofNullable(bankName); return this; } @@ -380,7 +380,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(BankInfoAccountType accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -391,7 +391,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -402,7 +402,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -413,7 +413,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -424,7 +424,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Benefit.java b/src/main/java/com/merge/api/resources/hris/types/Benefit.java index 7f2d595e4..0e73c7aff 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Benefit.java +++ b/src/main/java/com/merge/api/resources/hris/types/Benefit.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Benefit.Builder.class) public final class Benefit { private final Optional id; @@ -322,7 +322,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -333,7 +333,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -344,7 +344,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -355,7 +355,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -366,7 +366,7 @@ public Builder employee(Optional employee) { } public Builder employee(BenefitEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -377,7 +377,7 @@ public Builder providerName(Optional providerName) { } public Builder providerName(String providerName) { - this.providerName = Optional.of(providerName); + this.providerName = Optional.ofNullable(providerName); return this; } @@ -388,7 +388,7 @@ public Builder benefitPlanType(Optional benefitPlanType) { } public Builder benefitPlanType(String benefitPlanType) { - this.benefitPlanType = Optional.of(benefitPlanType); + this.benefitPlanType = Optional.ofNullable(benefitPlanType); return this; } @@ -399,7 +399,7 @@ public Builder employeeContribution(Optional employeeContribution) { } public Builder employeeContribution(Double employeeContribution) { - this.employeeContribution = Optional.of(employeeContribution); + this.employeeContribution = Optional.ofNullable(employeeContribution); return this; } @@ -410,7 +410,7 @@ public Builder companyContribution(Optional companyContribution) { } public Builder companyContribution(Double companyContribution) { - this.companyContribution = Optional.of(companyContribution); + this.companyContribution = Optional.ofNullable(companyContribution); return this; } @@ -421,7 +421,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(OffsetDateTime startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -432,7 +432,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(OffsetDateTime endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -443,7 +443,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -454,7 +454,7 @@ public Builder employerBenefit(Optional employerBenefit) { } public Builder employerBenefit(String employerBenefit) { - this.employerBenefit = Optional.of(employerBenefit); + this.employerBenefit = Optional.ofNullable(employerBenefit); return this; } @@ -465,7 +465,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -476,7 +476,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/resources/hris/types/CommonModelScopeApi.java index f5f64f6c3..f362701dd 100644 --- a/src/main/java/com/merge/api/resources/hris/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/resources/hris/types/CommonModelScopeApi.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopeApi.Builder.class) public final class CommonModelScopeApi { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/hris/types/CommonModelScopesBodyRequest.java b/src/main/java/com/merge/api/resources/hris/types/CommonModelScopesBodyRequest.java index 7d85e9a13..8d63a85f1 100644 --- a/src/main/java/com/merge/api/resources/hris/types/CommonModelScopesBodyRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/CommonModelScopesBodyRequest.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopesBodyRequest.Builder.class) public final class CommonModelScopesBodyRequest { private final String modelId; @@ -87,7 +88,7 @@ public static ModelIdStage builder() { } public interface ModelIdStage { - _FinalStage modelId(String modelId); + _FinalStage modelId(@NotNull String modelId); Builder from(CommonModelScopesBodyRequest other); } @@ -131,7 +132,7 @@ public Builder from(CommonModelScopesBodyRequest other) { @java.lang.Override @JsonSetter("model_id") - public _FinalStage modelId(String modelId) { + public _FinalStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Company.java b/src/main/java/com/merge/api/resources/hris/types/Company.java index e7cf81139..6a0cf919a 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Company.java +++ b/src/main/java/com/merge/api/resources/hris/types/Company.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Company.Builder.class) public final class Company { private final Optional id; @@ -237,7 +237,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -248,7 +248,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -259,7 +259,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -270,7 +270,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -281,7 +281,7 @@ public Builder legalName(Optional legalName) { } public Builder legalName(String legalName) { - this.legalName = Optional.of(legalName); + this.legalName = Optional.ofNullable(legalName); return this; } @@ -292,7 +292,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } @@ -303,7 +303,7 @@ public Builder eins(Optional>> eins) { } public Builder eins(List> eins) { - this.eins = Optional.of(eins); + this.eins = Optional.ofNullable(eins); return this; } @@ -314,7 +314,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -325,7 +325,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -336,7 +336,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/resources/hris/types/DataPassthroughRequest.java index 0041b3e5a..5a27a9d2c 100644 --- a/src/main/java/com/merge/api/resources/hris/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/DataPassthroughRequest.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DataPassthroughRequest.Builder.class) public final class DataPassthroughRequest { private final MethodEnum method; @@ -164,13 +165,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(MethodEnum method); + PathStage method(@NotNull MethodEnum method); Builder from(DataPassthroughRequest other); } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); } public interface _FinalStage { @@ -239,7 +240,7 @@ public Builder from(DataPassthroughRequest other) { @java.lang.Override @JsonSetter("method") - public PathStage method(MethodEnum method) { + public PathStage method(@NotNull MethodEnum method) { this.method = method; return this; } @@ -250,7 +251,7 @@ public PathStage method(MethodEnum method) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @@ -261,7 +262,7 @@ public _FinalStage path(String path) { */ @java.lang.Override public _FinalStage normalizeResponse(Boolean normalizeResponse) { - this.normalizeResponse = Optional.of(normalizeResponse); + this.normalizeResponse = Optional.ofNullable(normalizeResponse); return this; } @@ -274,7 +275,7 @@ public _FinalStage normalizeResponse(Optional normalizeResponse) { @java.lang.Override public _FinalStage requestFormat(RequestFormatEnum requestFormat) { - this.requestFormat = Optional.of(requestFormat); + this.requestFormat = Optional.ofNullable(requestFormat); return this; } @@ -291,7 +292,7 @@ public _FinalStage requestFormat(Optional requestFormat) { */ @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -308,7 +309,7 @@ public _FinalStage headers(Optional> headers) { */ @java.lang.Override public _FinalStage multipartFormData(List multipartFormData) { - this.multipartFormData = Optional.of(multipartFormData); + this.multipartFormData = Optional.ofNullable(multipartFormData); return this; } @@ -325,7 +326,7 @@ public _FinalStage multipartFormData(Optional> m */ @java.lang.Override public _FinalStage data(String data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } @@ -342,7 +343,7 @@ public _FinalStage data(Optional data) { */ @java.lang.Override public _FinalStage baseUrlOverride(String baseUrlOverride) { - this.baseUrlOverride = Optional.of(baseUrlOverride); + this.baseUrlOverride = Optional.ofNullable(baseUrlOverride); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/DebugModeLog.java b/src/main/java/com/merge/api/resources/hris/types/DebugModeLog.java index e48905dc9..51e90d9ed 100644 --- a/src/main/java/com/merge/api/resources/hris/types/DebugModeLog.java +++ b/src/main/java/com/merge/api/resources/hris/types/DebugModeLog.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModeLog.Builder.class) public final class DebugModeLog { private final String logId; @@ -84,17 +85,17 @@ public static LogIdStage builder() { } public interface LogIdStage { - DashboardViewStage logId(String logId); + DashboardViewStage logId(@NotNull String logId); Builder from(DebugModeLog other); } public interface DashboardViewStage { - LogSummaryStage dashboardView(String dashboardView); + LogSummaryStage dashboardView(@NotNull String dashboardView); } public interface LogSummaryStage { - _FinalStage logSummary(DebugModelLogSummary logSummary); + _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary); } public interface _FinalStage { @@ -124,21 +125,21 @@ public Builder from(DebugModeLog other) { @java.lang.Override @JsonSetter("log_id") - public DashboardViewStage logId(String logId) { + public DashboardViewStage logId(@NotNull String logId) { this.logId = logId; return this; } @java.lang.Override @JsonSetter("dashboard_view") - public LogSummaryStage dashboardView(String dashboardView) { + public LogSummaryStage dashboardView(@NotNull String dashboardView) { this.dashboardView = dashboardView; return this; } @java.lang.Override @JsonSetter("log_summary") - public _FinalStage logSummary(DebugModelLogSummary logSummary) { + public _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary) { this.logSummary = logSummary; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/DebugModelLogSummary.java b/src/main/java/com/merge/api/resources/hris/types/DebugModelLogSummary.java index 1ed2fda90..a2081a603 100644 --- a/src/main/java/com/merge/api/resources/hris/types/DebugModelLogSummary.java +++ b/src/main/java/com/merge/api/resources/hris/types/DebugModelLogSummary.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModelLogSummary.Builder.class) public final class DebugModelLogSummary { private final String url; @@ -78,13 +79,13 @@ public static UrlStage builder() { } public interface UrlStage { - MethodStage url(String url); + MethodStage url(@NotNull String url); Builder from(DebugModelLogSummary other); } public interface MethodStage { - StatusCodeStage method(String method); + StatusCodeStage method(@NotNull String method); } public interface StatusCodeStage { @@ -118,14 +119,14 @@ public Builder from(DebugModelLogSummary other) { @java.lang.Override @JsonSetter("url") - public MethodStage url(String url) { + public MethodStage url(@NotNull String url) { this.url = url; return this; } @java.lang.Override @JsonSetter("method") - public StatusCodeStage method(String method) { + public StatusCodeStage method(@NotNull String method) { this.method = method; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Deduction.java b/src/main/java/com/merge/api/resources/hris/types/Deduction.java index 446668594..120f26772 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Deduction.java +++ b/src/main/java/com/merge/api/resources/hris/types/Deduction.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Deduction.Builder.class) public final class Deduction { private final Optional id; @@ -251,7 +251,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -262,7 +262,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -273,7 +273,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -284,7 +284,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -295,7 +295,7 @@ public Builder employeePayrollRun(Optional employeePayrollRun) { } public Builder employeePayrollRun(String employeePayrollRun) { - this.employeePayrollRun = Optional.of(employeePayrollRun); + this.employeePayrollRun = Optional.ofNullable(employeePayrollRun); return this; } @@ -306,7 +306,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -317,7 +317,7 @@ public Builder employeeDeduction(Optional employeeDeduction) { } public Builder employeeDeduction(Double employeeDeduction) { - this.employeeDeduction = Optional.of(employeeDeduction); + this.employeeDeduction = Optional.ofNullable(employeeDeduction); return this; } @@ -328,7 +328,7 @@ public Builder companyDeduction(Optional companyDeduction) { } public Builder companyDeduction(Double companyDeduction) { - this.companyDeduction = Optional.of(companyDeduction); + this.companyDeduction = Optional.ofNullable(companyDeduction); return this; } @@ -339,7 +339,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -350,7 +350,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -361,7 +361,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Dependent.java b/src/main/java/com/merge/api/resources/hris/types/Dependent.java index c55cf5ba1..3145491f7 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Dependent.java +++ b/src/main/java/com/merge/api/resources/hris/types/Dependent.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Dependent.Builder.class) public final class Dependent { private final Optional id; @@ -385,7 +385,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -396,7 +396,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -407,7 +407,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -418,7 +418,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -429,7 +429,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -440,7 +440,7 @@ public Builder middleName(Optional middleName) { } public Builder middleName(String middleName) { - this.middleName = Optional.of(middleName); + this.middleName = Optional.ofNullable(middleName); return this; } @@ -451,7 +451,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -462,7 +462,7 @@ public Builder relationship(Optional relationship) { } public Builder relationship(DependentRelationship relationship) { - this.relationship = Optional.of(relationship); + this.relationship = Optional.ofNullable(relationship); return this; } @@ -473,7 +473,7 @@ public Builder employee(Optional employee) { } public Builder employee(String employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -484,7 +484,7 @@ public Builder dateOfBirth(Optional dateOfBirth) { } public Builder dateOfBirth(OffsetDateTime dateOfBirth) { - this.dateOfBirth = Optional.of(dateOfBirth); + this.dateOfBirth = Optional.ofNullable(dateOfBirth); return this; } @@ -495,7 +495,7 @@ public Builder gender(Optional gender) { } public Builder gender(DependentGender gender) { - this.gender = Optional.of(gender); + this.gender = Optional.ofNullable(gender); return this; } @@ -506,7 +506,7 @@ public Builder phoneNumber(Optional phoneNumber) { } public Builder phoneNumber(String phoneNumber) { - this.phoneNumber = Optional.of(phoneNumber); + this.phoneNumber = Optional.ofNullable(phoneNumber); return this; } @@ -517,7 +517,7 @@ public Builder homeLocation(Optional homeLocation) { } public Builder homeLocation(String homeLocation) { - this.homeLocation = Optional.of(homeLocation); + this.homeLocation = Optional.ofNullable(homeLocation); return this; } @@ -528,7 +528,7 @@ public Builder isStudent(Optional isStudent) { } public Builder isStudent(Boolean isStudent) { - this.isStudent = Optional.of(isStudent); + this.isStudent = Optional.ofNullable(isStudent); return this; } @@ -539,7 +539,7 @@ public Builder ssn(Optional ssn) { } public Builder ssn(String ssn) { - this.ssn = Optional.of(ssn); + this.ssn = Optional.ofNullable(ssn); return this; } @@ -550,7 +550,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -561,7 +561,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -572,7 +572,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Earning.java b/src/main/java/com/merge/api/resources/hris/types/Earning.java index 918855d08..6958d177b 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Earning.java +++ b/src/main/java/com/merge/api/resources/hris/types/Earning.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Earning.Builder.class) public final class Earning { private final Optional id; @@ -240,7 +240,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -251,7 +251,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -262,7 +262,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -273,7 +273,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -284,7 +284,7 @@ public Builder employeePayrollRun(Optional employeePayrollRun) { } public Builder employeePayrollRun(String employeePayrollRun) { - this.employeePayrollRun = Optional.of(employeePayrollRun); + this.employeePayrollRun = Optional.ofNullable(employeePayrollRun); return this; } @@ -295,7 +295,7 @@ public Builder amount(Optional amount) { } public Builder amount(Double amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -306,7 +306,7 @@ public Builder type(Optional type) { } public Builder type(EarningType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -317,7 +317,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -328,7 +328,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -339,7 +339,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Employee.java b/src/main/java/com/merge/api/resources/hris/types/Employee.java index 646b0f36e..9b9c58e76 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Employee.java +++ b/src/main/java/com/merge/api/resources/hris/types/Employee.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Employee.Builder.class) public final class Employee { private final Optional id; @@ -705,7 +705,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -716,7 +716,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -727,7 +727,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -738,7 +738,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -749,7 +749,7 @@ public Builder employeeNumber(Optional employeeNumber) { } public Builder employeeNumber(String employeeNumber) { - this.employeeNumber = Optional.of(employeeNumber); + this.employeeNumber = Optional.ofNullable(employeeNumber); return this; } @@ -760,7 +760,7 @@ public Builder company(Optional company) { } public Builder company(EmployeeCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -771,7 +771,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -782,7 +782,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -793,7 +793,7 @@ public Builder preferredName(Optional preferredName) { } public Builder preferredName(String preferredName) { - this.preferredName = Optional.of(preferredName); + this.preferredName = Optional.ofNullable(preferredName); return this; } @@ -804,7 +804,7 @@ public Builder displayFullName(Optional displayFullName) { } public Builder displayFullName(String displayFullName) { - this.displayFullName = Optional.of(displayFullName); + this.displayFullName = Optional.ofNullable(displayFullName); return this; } @@ -815,7 +815,7 @@ public Builder username(Optional username) { } public Builder username(String username) { - this.username = Optional.of(username); + this.username = Optional.ofNullable(username); return this; } @@ -826,7 +826,7 @@ public Builder groups(Optional>> groups) { } public Builder groups(List> groups) { - this.groups = Optional.of(groups); + this.groups = Optional.ofNullable(groups); return this; } @@ -837,7 +837,7 @@ public Builder workEmail(Optional workEmail) { } public Builder workEmail(String workEmail) { - this.workEmail = Optional.of(workEmail); + this.workEmail = Optional.ofNullable(workEmail); return this; } @@ -848,7 +848,7 @@ public Builder personalEmail(Optional personalEmail) { } public Builder personalEmail(String personalEmail) { - this.personalEmail = Optional.of(personalEmail); + this.personalEmail = Optional.ofNullable(personalEmail); return this; } @@ -859,7 +859,7 @@ public Builder mobilePhoneNumber(Optional mobilePhoneNumber) { } public Builder mobilePhoneNumber(String mobilePhoneNumber) { - this.mobilePhoneNumber = Optional.of(mobilePhoneNumber); + this.mobilePhoneNumber = Optional.ofNullable(mobilePhoneNumber); return this; } @@ -870,7 +870,7 @@ public Builder employments(Optional>> emp } public Builder employments(List> employments) { - this.employments = Optional.of(employments); + this.employments = Optional.ofNullable(employments); return this; } @@ -881,7 +881,7 @@ public Builder homeLocation(Optional homeLocation) { } public Builder homeLocation(EmployeeHomeLocation homeLocation) { - this.homeLocation = Optional.of(homeLocation); + this.homeLocation = Optional.ofNullable(homeLocation); return this; } @@ -892,7 +892,7 @@ public Builder workLocation(Optional workLocation) { } public Builder workLocation(EmployeeWorkLocation workLocation) { - this.workLocation = Optional.of(workLocation); + this.workLocation = Optional.ofNullable(workLocation); return this; } @@ -903,7 +903,7 @@ public Builder manager(Optional manager) { } public Builder manager(EmployeeManager manager) { - this.manager = Optional.of(manager); + this.manager = Optional.ofNullable(manager); return this; } @@ -914,7 +914,7 @@ public Builder team(Optional team) { } public Builder team(EmployeeTeam team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -925,7 +925,7 @@ public Builder payGroup(Optional payGroup) { } public Builder payGroup(EmployeePayGroup payGroup) { - this.payGroup = Optional.of(payGroup); + this.payGroup = Optional.ofNullable(payGroup); return this; } @@ -936,7 +936,7 @@ public Builder ssn(Optional ssn) { } public Builder ssn(String ssn) { - this.ssn = Optional.of(ssn); + this.ssn = Optional.ofNullable(ssn); return this; } @@ -947,7 +947,7 @@ public Builder gender(Optional gender) { } public Builder gender(EmployeeGender gender) { - this.gender = Optional.of(gender); + this.gender = Optional.ofNullable(gender); return this; } @@ -958,7 +958,7 @@ public Builder ethnicity(Optional ethnicity) { } public Builder ethnicity(EmployeeEthnicity ethnicity) { - this.ethnicity = Optional.of(ethnicity); + this.ethnicity = Optional.ofNullable(ethnicity); return this; } @@ -969,7 +969,7 @@ public Builder maritalStatus(Optional maritalStatus) { } public Builder maritalStatus(EmployeeMaritalStatus maritalStatus) { - this.maritalStatus = Optional.of(maritalStatus); + this.maritalStatus = Optional.ofNullable(maritalStatus); return this; } @@ -980,7 +980,7 @@ public Builder dateOfBirth(Optional dateOfBirth) { } public Builder dateOfBirth(OffsetDateTime dateOfBirth) { - this.dateOfBirth = Optional.of(dateOfBirth); + this.dateOfBirth = Optional.ofNullable(dateOfBirth); return this; } @@ -991,7 +991,7 @@ public Builder hireDate(Optional hireDate) { } public Builder hireDate(OffsetDateTime hireDate) { - this.hireDate = Optional.of(hireDate); + this.hireDate = Optional.ofNullable(hireDate); return this; } @@ -1002,7 +1002,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(OffsetDateTime startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -1013,7 +1013,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -1024,7 +1024,7 @@ public Builder employmentStatus(Optional employmentSta } public Builder employmentStatus(EmployeeEmploymentStatus employmentStatus) { - this.employmentStatus = Optional.of(employmentStatus); + this.employmentStatus = Optional.ofNullable(employmentStatus); return this; } @@ -1035,7 +1035,7 @@ public Builder terminationDate(Optional terminationDate) { } public Builder terminationDate(OffsetDateTime terminationDate) { - this.terminationDate = Optional.of(terminationDate); + this.terminationDate = Optional.ofNullable(terminationDate); return this; } @@ -1046,7 +1046,7 @@ public Builder avatar(Optional avatar) { } public Builder avatar(String avatar) { - this.avatar = Optional.of(avatar); + this.avatar = Optional.ofNullable(avatar); return this; } @@ -1057,7 +1057,7 @@ public Builder customFields(Optional> customFields) { } public Builder customFields(Map customFields) { - this.customFields = Optional.of(customFields); + this.customFields = Optional.ofNullable(customFields); return this; } @@ -1068,7 +1068,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -1079,7 +1079,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -1090,7 +1090,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/EmployeePayrollRun.java b/src/main/java/com/merge/api/resources/hris/types/EmployeePayrollRun.java index d8630c5b3..62794ff04 100644 --- a/src/main/java/com/merge/api/resources/hris/types/EmployeePayrollRun.java +++ b/src/main/java/com/merge/api/resources/hris/types/EmployeePayrollRun.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeePayrollRun.Builder.class) public final class EmployeePayrollRun { private final Optional id; @@ -347,7 +347,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -358,7 +358,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -369,7 +369,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -380,7 +380,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -391,7 +391,7 @@ public Builder employee(Optional employee) { } public Builder employee(EmployeePayrollRunEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -402,7 +402,7 @@ public Builder payrollRun(Optional payrollRun) { } public Builder payrollRun(EmployeePayrollRunPayrollRun payrollRun) { - this.payrollRun = Optional.of(payrollRun); + this.payrollRun = Optional.ofNullable(payrollRun); return this; } @@ -413,7 +413,7 @@ public Builder grossPay(Optional grossPay) { } public Builder grossPay(Double grossPay) { - this.grossPay = Optional.of(grossPay); + this.grossPay = Optional.ofNullable(grossPay); return this; } @@ -424,7 +424,7 @@ public Builder netPay(Optional netPay) { } public Builder netPay(Double netPay) { - this.netPay = Optional.of(netPay); + this.netPay = Optional.ofNullable(netPay); return this; } @@ -435,7 +435,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(OffsetDateTime startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -446,7 +446,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(OffsetDateTime endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -457,7 +457,7 @@ public Builder checkDate(Optional checkDate) { } public Builder checkDate(OffsetDateTime checkDate) { - this.checkDate = Optional.of(checkDate); + this.checkDate = Optional.ofNullable(checkDate); return this; } @@ -468,7 +468,7 @@ public Builder earnings(Optional> earnings) { } public Builder earnings(List earnings) { - this.earnings = Optional.of(earnings); + this.earnings = Optional.ofNullable(earnings); return this; } @@ -479,7 +479,7 @@ public Builder deductions(Optional> deductions) { } public Builder deductions(List deductions) { - this.deductions = Optional.of(deductions); + this.deductions = Optional.ofNullable(deductions); return this; } @@ -490,7 +490,7 @@ public Builder taxes(Optional> taxes) { } public Builder taxes(List taxes) { - this.taxes = Optional.of(taxes); + this.taxes = Optional.ofNullable(taxes); return this; } @@ -501,7 +501,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -512,7 +512,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -523,7 +523,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/EmployeeRequest.java b/src/main/java/com/merge/api/resources/hris/types/EmployeeRequest.java index 91d414d7b..581244b3a 100644 --- a/src/main/java/com/merge/api/resources/hris/types/EmployeeRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/EmployeeRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeeRequest.Builder.class) public final class EmployeeRequest { private final Optional employeeNumber; @@ -589,7 +589,7 @@ public Builder employeeNumber(Optional employeeNumber) { } public Builder employeeNumber(String employeeNumber) { - this.employeeNumber = Optional.of(employeeNumber); + this.employeeNumber = Optional.ofNullable(employeeNumber); return this; } @@ -600,7 +600,7 @@ public Builder company(Optional company) { } public Builder company(EmployeeRequestCompany company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -611,7 +611,7 @@ public Builder firstName(Optional firstName) { } public Builder firstName(String firstName) { - this.firstName = Optional.of(firstName); + this.firstName = Optional.ofNullable(firstName); return this; } @@ -622,7 +622,7 @@ public Builder lastName(Optional lastName) { } public Builder lastName(String lastName) { - this.lastName = Optional.of(lastName); + this.lastName = Optional.ofNullable(lastName); return this; } @@ -633,7 +633,7 @@ public Builder preferredName(Optional preferredName) { } public Builder preferredName(String preferredName) { - this.preferredName = Optional.of(preferredName); + this.preferredName = Optional.ofNullable(preferredName); return this; } @@ -644,7 +644,7 @@ public Builder displayFullName(Optional displayFullName) { } public Builder displayFullName(String displayFullName) { - this.displayFullName = Optional.of(displayFullName); + this.displayFullName = Optional.ofNullable(displayFullName); return this; } @@ -655,7 +655,7 @@ public Builder username(Optional username) { } public Builder username(String username) { - this.username = Optional.of(username); + this.username = Optional.ofNullable(username); return this; } @@ -666,7 +666,7 @@ public Builder groups(Optional>> groups } public Builder groups(List> groups) { - this.groups = Optional.of(groups); + this.groups = Optional.ofNullable(groups); return this; } @@ -677,7 +677,7 @@ public Builder workEmail(Optional workEmail) { } public Builder workEmail(String workEmail) { - this.workEmail = Optional.of(workEmail); + this.workEmail = Optional.ofNullable(workEmail); return this; } @@ -688,7 +688,7 @@ public Builder personalEmail(Optional personalEmail) { } public Builder personalEmail(String personalEmail) { - this.personalEmail = Optional.of(personalEmail); + this.personalEmail = Optional.ofNullable(personalEmail); return this; } @@ -699,7 +699,7 @@ public Builder mobilePhoneNumber(Optional mobilePhoneNumber) { } public Builder mobilePhoneNumber(String mobilePhoneNumber) { - this.mobilePhoneNumber = Optional.of(mobilePhoneNumber); + this.mobilePhoneNumber = Optional.ofNullable(mobilePhoneNumber); return this; } @@ -710,7 +710,7 @@ public Builder employments(Optional> employments) { - this.employments = Optional.of(employments); + this.employments = Optional.ofNullable(employments); return this; } @@ -721,7 +721,7 @@ public Builder homeLocation(Optional homeLocation) } public Builder homeLocation(EmployeeRequestHomeLocation homeLocation) { - this.homeLocation = Optional.of(homeLocation); + this.homeLocation = Optional.ofNullable(homeLocation); return this; } @@ -732,7 +732,7 @@ public Builder workLocation(Optional workLocation) } public Builder workLocation(EmployeeRequestWorkLocation workLocation) { - this.workLocation = Optional.of(workLocation); + this.workLocation = Optional.ofNullable(workLocation); return this; } @@ -743,7 +743,7 @@ public Builder manager(Optional manager) { } public Builder manager(EmployeeRequestManager manager) { - this.manager = Optional.of(manager); + this.manager = Optional.ofNullable(manager); return this; } @@ -754,7 +754,7 @@ public Builder team(Optional team) { } public Builder team(EmployeeRequestTeam team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -765,7 +765,7 @@ public Builder payGroup(Optional payGroup) { } public Builder payGroup(EmployeeRequestPayGroup payGroup) { - this.payGroup = Optional.of(payGroup); + this.payGroup = Optional.ofNullable(payGroup); return this; } @@ -776,7 +776,7 @@ public Builder ssn(Optional ssn) { } public Builder ssn(String ssn) { - this.ssn = Optional.of(ssn); + this.ssn = Optional.ofNullable(ssn); return this; } @@ -787,7 +787,7 @@ public Builder gender(Optional gender) { } public Builder gender(EmployeeRequestGender gender) { - this.gender = Optional.of(gender); + this.gender = Optional.ofNullable(gender); return this; } @@ -798,7 +798,7 @@ public Builder ethnicity(Optional ethnicity) { } public Builder ethnicity(EmployeeRequestEthnicity ethnicity) { - this.ethnicity = Optional.of(ethnicity); + this.ethnicity = Optional.ofNullable(ethnicity); return this; } @@ -809,7 +809,7 @@ public Builder maritalStatus(Optional maritalStatu } public Builder maritalStatus(EmployeeRequestMaritalStatus maritalStatus) { - this.maritalStatus = Optional.of(maritalStatus); + this.maritalStatus = Optional.ofNullable(maritalStatus); return this; } @@ -820,7 +820,7 @@ public Builder dateOfBirth(Optional dateOfBirth) { } public Builder dateOfBirth(OffsetDateTime dateOfBirth) { - this.dateOfBirth = Optional.of(dateOfBirth); + this.dateOfBirth = Optional.ofNullable(dateOfBirth); return this; } @@ -831,7 +831,7 @@ public Builder hireDate(Optional hireDate) { } public Builder hireDate(OffsetDateTime hireDate) { - this.hireDate = Optional.of(hireDate); + this.hireDate = Optional.ofNullable(hireDate); return this; } @@ -842,7 +842,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(OffsetDateTime startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -853,7 +853,7 @@ public Builder employmentStatus(Optional employ } public Builder employmentStatus(EmployeeRequestEmploymentStatus employmentStatus) { - this.employmentStatus = Optional.of(employmentStatus); + this.employmentStatus = Optional.ofNullable(employmentStatus); return this; } @@ -864,7 +864,7 @@ public Builder terminationDate(Optional terminationDate) { } public Builder terminationDate(OffsetDateTime terminationDate) { - this.terminationDate = Optional.of(terminationDate); + this.terminationDate = Optional.ofNullable(terminationDate); return this; } @@ -875,7 +875,7 @@ public Builder avatar(Optional avatar) { } public Builder avatar(String avatar) { - this.avatar = Optional.of(avatar); + this.avatar = Optional.ofNullable(avatar); return this; } @@ -886,7 +886,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -897,7 +897,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/EmployeeResponse.java b/src/main/java/com/merge/api/resources/hris/types/EmployeeResponse.java index 234a7ba31..8bafda739 100644 --- a/src/main/java/com/merge/api/resources/hris/types/EmployeeResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/EmployeeResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployeeResponse.Builder.class) public final class EmployeeResponse { private final Employee model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Employee model); + _FinalStage model(@NotNull Employee model); Builder from(EmployeeResponse other); } @@ -149,14 +150,14 @@ public Builder from(EmployeeResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Employee model) { + public _FinalStage model(@NotNull Employee model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/EmployerBenefit.java b/src/main/java/com/merge/api/resources/hris/types/EmployerBenefit.java index ca0217f9b..95a11dd3d 100644 --- a/src/main/java/com/merge/api/resources/hris/types/EmployerBenefit.java +++ b/src/main/java/com/merge/api/resources/hris/types/EmployerBenefit.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EmployerBenefit.Builder.class) public final class EmployerBenefit { private final Optional id; @@ -261,7 +261,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -272,7 +272,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -283,7 +283,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -294,7 +294,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -305,7 +305,7 @@ public Builder benefitPlanType(Optional benefitP } public Builder benefitPlanType(EmployerBenefitBenefitPlanType benefitPlanType) { - this.benefitPlanType = Optional.of(benefitPlanType); + this.benefitPlanType = Optional.ofNullable(benefitPlanType); return this; } @@ -316,7 +316,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -327,7 +327,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -338,7 +338,7 @@ public Builder deductionCode(Optional deductionCode) { } public Builder deductionCode(String deductionCode) { - this.deductionCode = Optional.of(deductionCode); + this.deductionCode = Optional.ofNullable(deductionCode); return this; } @@ -349,7 +349,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -360,7 +360,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -371,7 +371,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Employment.java b/src/main/java/com/merge/api/resources/hris/types/Employment.java index 682768d0e..f55590829 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Employment.java +++ b/src/main/java/com/merge/api/resources/hris/types/Employment.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Employment.Builder.class) public final class Employment { private final Optional id; @@ -699,7 +699,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -710,7 +710,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -721,7 +721,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -732,7 +732,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -743,7 +743,7 @@ public Builder employee(Optional employee) { } public Builder employee(EmploymentEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -754,7 +754,7 @@ public Builder jobTitle(Optional jobTitle) { } public Builder jobTitle(String jobTitle) { - this.jobTitle = Optional.of(jobTitle); + this.jobTitle = Optional.ofNullable(jobTitle); return this; } @@ -765,7 +765,7 @@ public Builder payRate(Optional payRate) { } public Builder payRate(Double payRate) { - this.payRate = Optional.of(payRate); + this.payRate = Optional.ofNullable(payRate); return this; } @@ -776,7 +776,7 @@ public Builder payPeriod(Optional payPeriod) { } public Builder payPeriod(EmploymentPayPeriod payPeriod) { - this.payPeriod = Optional.of(payPeriod); + this.payPeriod = Optional.ofNullable(payPeriod); return this; } @@ -787,7 +787,7 @@ public Builder payFrequency(Optional payFrequency) { } public Builder payFrequency(EmploymentPayFrequency payFrequency) { - this.payFrequency = Optional.of(payFrequency); + this.payFrequency = Optional.ofNullable(payFrequency); return this; } @@ -798,7 +798,7 @@ public Builder payCurrency(Optional payCurrency) { } public Builder payCurrency(EmploymentPayCurrency payCurrency) { - this.payCurrency = Optional.of(payCurrency); + this.payCurrency = Optional.ofNullable(payCurrency); return this; } @@ -809,7 +809,7 @@ public Builder payGroup(Optional payGroup) { } public Builder payGroup(EmploymentPayGroup payGroup) { - this.payGroup = Optional.of(payGroup); + this.payGroup = Optional.ofNullable(payGroup); return this; } @@ -820,7 +820,7 @@ public Builder flsaStatus(Optional flsaStatus) { } public Builder flsaStatus(EmploymentFlsaStatus flsaStatus) { - this.flsaStatus = Optional.of(flsaStatus); + this.flsaStatus = Optional.ofNullable(flsaStatus); return this; } @@ -831,7 +831,7 @@ public Builder effectiveDate(Optional effectiveDate) { } public Builder effectiveDate(OffsetDateTime effectiveDate) { - this.effectiveDate = Optional.of(effectiveDate); + this.effectiveDate = Optional.ofNullable(effectiveDate); return this; } @@ -842,7 +842,7 @@ public Builder employmentType(Optional employmentType) } public Builder employmentType(EmploymentEmploymentType employmentType) { - this.employmentType = Optional.of(employmentType); + this.employmentType = Optional.ofNullable(employmentType); return this; } @@ -853,7 +853,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -864,7 +864,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -875,7 +875,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/ErrorValidationProblem.java b/src/main/java/com/merge/api/resources/hris/types/ErrorValidationProblem.java index 0180b665b..67897544d 100644 --- a/src/main/java/com/merge/api/resources/hris/types/ErrorValidationProblem.java +++ b/src/main/java/com/merge/api/resources/hris/types/ErrorValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ErrorValidationProblem.Builder.class) public final class ErrorValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(ErrorValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(ErrorValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApi.java b/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApi.java index 3ba965709..c096df59c 100644 --- a/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApi.java +++ b/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApi.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApi.Builder.class) public final class ExternalTargetFieldApi { private final Optional name; @@ -110,7 +110,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -121,7 +121,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -132,7 +132,7 @@ public Builder isMapped(Optional isMapped) { } public Builder isMapped(String isMapped) { - this.isMapped = Optional.of(isMapped); + this.isMapped = Optional.ofNullable(isMapped); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApiResponse.java b/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApiResponse.java index 86fb57e0a..adc8b63dd 100644 --- a/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/ExternalTargetFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApiResponse.Builder.class) public final class ExternalTargetFieldApiResponse { private final Optional> benefit; @@ -298,7 +298,7 @@ public Builder benefit(Optional> benefit) { } public Builder benefit(List benefit) { - this.benefit = Optional.of(benefit); + this.benefit = Optional.ofNullable(benefit); return this; } @@ -309,7 +309,7 @@ public Builder employerBenefit(Optional> employerBe } public Builder employerBenefit(List employerBenefit) { - this.employerBenefit = Optional.of(employerBenefit); + this.employerBenefit = Optional.ofNullable(employerBenefit); return this; } @@ -320,7 +320,7 @@ public Builder company(Optional> company) { } public Builder company(List company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -331,7 +331,7 @@ public Builder employeePayrollRun(Optional> employe } public Builder employeePayrollRun(List employeePayrollRun) { - this.employeePayrollRun = Optional.of(employeePayrollRun); + this.employeePayrollRun = Optional.ofNullable(employeePayrollRun); return this; } @@ -342,7 +342,7 @@ public Builder employee(Optional> employee) { } public Builder employee(List employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -353,7 +353,7 @@ public Builder employment(Optional> employment) { } public Builder employment(List employment) { - this.employment = Optional.of(employment); + this.employment = Optional.ofNullable(employment); return this; } @@ -364,7 +364,7 @@ public Builder location(Optional> location) { } public Builder location(List location) { - this.location = Optional.of(location); + this.location = Optional.ofNullable(location); return this; } @@ -375,7 +375,7 @@ public Builder payrollRun(Optional> payrollRun) { } public Builder payrollRun(List payrollRun) { - this.payrollRun = Optional.of(payrollRun); + this.payrollRun = Optional.ofNullable(payrollRun); return this; } @@ -386,7 +386,7 @@ public Builder team(Optional> team) { } public Builder team(List team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -397,7 +397,7 @@ public Builder timeOff(Optional> timeOff) { } public Builder timeOff(List timeOff) { - this.timeOff = Optional.of(timeOff); + this.timeOff = Optional.ofNullable(timeOff); return this; } @@ -408,7 +408,7 @@ public Builder timeOffBalance(Optional> timeOffBala } public Builder timeOffBalance(List timeOffBalance) { - this.timeOffBalance = Optional.of(timeOffBalance); + this.timeOffBalance = Optional.ofNullable(timeOffBalance); return this; } @@ -419,7 +419,7 @@ public Builder bankInfo(Optional> bankInfo) { } public Builder bankInfo(List bankInfo) { - this.bankInfo = Optional.of(bankInfo); + this.bankInfo = Optional.ofNullable(bankInfo); return this; } @@ -430,7 +430,7 @@ public Builder payGroup(Optional> payGroup) { } public Builder payGroup(List payGroup) { - this.payGroup = Optional.of(payGroup); + this.payGroup = Optional.ofNullable(payGroup); return this; } @@ -441,7 +441,7 @@ public Builder group(Optional> group) { } public Builder group(List group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -452,7 +452,7 @@ public Builder dependent(Optional> dependent) { } public Builder dependent(List dependent) { - this.dependent = Optional.of(dependent); + this.dependent = Optional.ofNullable(dependent); return this; } @@ -463,7 +463,7 @@ public Builder timesheetEntry(Optional> timesheetEn } public Builder timesheetEntry(List timesheetEntry) { - this.timesheetEntry = Optional.of(timesheetEntry); + this.timesheetEntry = Optional.ofNullable(timesheetEntry); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstance.java b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstance.java index 91b3852e1..f6f83cbe8 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstance.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstance.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstance.Builder.class) public final class FieldMappingApiInstance { private final Optional id; @@ -125,7 +125,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -136,7 +136,7 @@ public Builder isIntegrationWide(Optional isIntegrationWide) { } public Builder isIntegrationWide(Boolean isIntegrationWide) { - this.isIntegrationWide = Optional.of(isIntegrationWide); + this.isIntegrationWide = Optional.ofNullable(isIntegrationWide); return this; } @@ -147,7 +147,7 @@ public Builder targetField(Optional targetFi } public Builder targetField(FieldMappingApiInstanceTargetField targetField) { - this.targetField = Optional.of(targetField); + this.targetField = Optional.ofNullable(targetField); return this; } @@ -158,7 +158,7 @@ public Builder remoteField(Optional remoteFi } public Builder remoteField(FieldMappingApiInstanceRemoteField remoteField) { - this.remoteField = Optional.of(remoteField); + this.remoteField = Optional.ofNullable(remoteField); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteField.java b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteField.java index 9e35ba01a..bf2306c83 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteField.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteField.Builder.class) public final class FieldMappingApiInstanceRemoteField { private final Optional remoteKeyName; @@ -88,7 +89,8 @@ public static RemoteEndpointInfoStage builder() { } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); Builder from(FieldMappingApiInstanceRemoteField other); } @@ -128,14 +130,15 @@ public Builder from(FieldMappingApiInstanceRemoteField other) { @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage schema(Map schema) { - this.schema = Optional.of(schema); + this.schema = Optional.ofNullable(schema); return this; } @@ -148,7 +151,7 @@ public _FinalStage schema(Optional> schema) { @java.lang.Override public _FinalStage remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java index 5c365112c..d4ba1711b 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Builder.class) public final class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { private final Optional method; @@ -114,7 +114,7 @@ public Builder method(Optional method) { } public Builder method(String method) { - this.method = Optional.of(method); + this.method = Optional.ofNullable(method); return this; } @@ -125,7 +125,7 @@ public Builder urlPath(Optional urlPath) { } public Builder urlPath(String urlPath) { - this.urlPath = Optional.of(urlPath); + this.urlPath = Optional.ofNullable(urlPath); return this; } @@ -136,7 +136,7 @@ public Builder fieldTraversalPath(Optional> fieldTraversalPath) { } public Builder fieldTraversalPath(List fieldTraversalPath) { - this.fieldTraversalPath = Optional.of(fieldTraversalPath); + this.fieldTraversalPath = Optional.ofNullable(fieldTraversalPath); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceResponse.java b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceResponse.java index 2e5208204..a9b6cbb04 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceResponse.Builder.class) public final class FieldMappingApiInstanceResponse { private final Optional> benefit; @@ -298,7 +298,7 @@ public Builder benefit(Optional> benefit) { } public Builder benefit(List benefit) { - this.benefit = Optional.of(benefit); + this.benefit = Optional.ofNullable(benefit); return this; } @@ -309,7 +309,7 @@ public Builder employerBenefit(Optional> employerB } public Builder employerBenefit(List employerBenefit) { - this.employerBenefit = Optional.of(employerBenefit); + this.employerBenefit = Optional.ofNullable(employerBenefit); return this; } @@ -320,7 +320,7 @@ public Builder company(Optional> company) { } public Builder company(List company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -331,7 +331,7 @@ public Builder employeePayrollRun(Optional> employ } public Builder employeePayrollRun(List employeePayrollRun) { - this.employeePayrollRun = Optional.of(employeePayrollRun); + this.employeePayrollRun = Optional.ofNullable(employeePayrollRun); return this; } @@ -342,7 +342,7 @@ public Builder employee(Optional> employee) { } public Builder employee(List employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -353,7 +353,7 @@ public Builder employment(Optional> employment) { } public Builder employment(List employment) { - this.employment = Optional.of(employment); + this.employment = Optional.ofNullable(employment); return this; } @@ -364,7 +364,7 @@ public Builder location(Optional> location) { } public Builder location(List location) { - this.location = Optional.of(location); + this.location = Optional.ofNullable(location); return this; } @@ -375,7 +375,7 @@ public Builder payrollRun(Optional> payrollRun) { } public Builder payrollRun(List payrollRun) { - this.payrollRun = Optional.of(payrollRun); + this.payrollRun = Optional.ofNullable(payrollRun); return this; } @@ -386,7 +386,7 @@ public Builder team(Optional> team) { } public Builder team(List team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -397,7 +397,7 @@ public Builder timeOff(Optional> timeOff) { } public Builder timeOff(List timeOff) { - this.timeOff = Optional.of(timeOff); + this.timeOff = Optional.ofNullable(timeOff); return this; } @@ -408,7 +408,7 @@ public Builder timeOffBalance(Optional> timeOffBal } public Builder timeOffBalance(List timeOffBalance) { - this.timeOffBalance = Optional.of(timeOffBalance); + this.timeOffBalance = Optional.ofNullable(timeOffBalance); return this; } @@ -419,7 +419,7 @@ public Builder bankInfo(Optional> bankInfo) { } public Builder bankInfo(List bankInfo) { - this.bankInfo = Optional.of(bankInfo); + this.bankInfo = Optional.ofNullable(bankInfo); return this; } @@ -430,7 +430,7 @@ public Builder payGroup(Optional> payGroup) { } public Builder payGroup(List payGroup) { - this.payGroup = Optional.of(payGroup); + this.payGroup = Optional.ofNullable(payGroup); return this; } @@ -441,7 +441,7 @@ public Builder group(Optional> group) { } public Builder group(List group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -452,7 +452,7 @@ public Builder dependent(Optional> dependent) { } public Builder dependent(List dependent) { - this.dependent = Optional.of(dependent); + this.dependent = Optional.ofNullable(dependent); return this; } @@ -463,7 +463,7 @@ public Builder timesheetEntry(Optional> timesheetE } public Builder timesheetEntry(List timesheetEntry) { - this.timesheetEntry = Optional.of(timesheetEntry); + this.timesheetEntry = Optional.ofNullable(timesheetEntry); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceTargetField.java b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceTargetField.java index 4d37ef655..957d644b9 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceTargetField.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldMappingApiInstanceTargetField.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceTargetField.Builder.class) public final class FieldMappingApiInstanceTargetField { private final String name; @@ -82,13 +83,13 @@ public static NameStage builder() { } public interface NameStage { - DescriptionStage name(String name); + DescriptionStage name(@NotNull String name); Builder from(FieldMappingApiInstanceTargetField other); } public interface DescriptionStage { - IsOrganizationWideStage description(String description); + IsOrganizationWideStage description(@NotNull String description); } public interface IsOrganizationWideStage { @@ -122,14 +123,14 @@ public Builder from(FieldMappingApiInstanceTargetField other) { @java.lang.Override @JsonSetter("name") - public DescriptionStage name(String name) { + public DescriptionStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("description") - public IsOrganizationWideStage description(String description) { + public IsOrganizationWideStage description(@NotNull String description) { this.description = description; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldMappingInstanceResponse.java b/src/main/java/com/merge/api/resources/hris/types/FieldMappingInstanceResponse.java index 1b936914d..3af8da9fd 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldMappingInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldMappingInstanceResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingInstanceResponse.Builder.class) public final class FieldMappingInstanceResponse { private final FieldMappingApiInstance model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FieldMappingApiInstance model); + _FinalStage model(@NotNull FieldMappingApiInstance model); Builder from(FieldMappingInstanceResponse other); } @@ -149,14 +150,14 @@ public Builder from(FieldMappingInstanceResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FieldMappingApiInstance model) { + public _FinalStage model(@NotNull FieldMappingApiInstance model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializer.java b/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializer.java index d42f16cd8..91337d4e2 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializer.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializer.Builder.class) public final class FieldPermissionDeserializer { private final Optional> enabledFields; @@ -100,7 +100,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -111,7 +111,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializerRequest.java index 4e0f47ba9..1db5e5969 100644 --- a/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/FieldPermissionDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializerRequest.Builder.class) public final class FieldPermissionDeserializerRequest { private final Optional> enabledFields; @@ -101,7 +101,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -112,7 +112,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Group.java b/src/main/java/com/merge/api/resources/hris/types/Group.java index b8fa41b3b..451b13783 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Group.java +++ b/src/main/java/com/merge/api/resources/hris/types/Group.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Group.Builder.class) public final class Group { private final Optional id; @@ -261,7 +261,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -272,7 +272,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -283,7 +283,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -294,7 +294,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -305,7 +305,7 @@ public Builder parentGroup(Optional parentGroup) { } public Builder parentGroup(String parentGroup) { - this.parentGroup = Optional.of(parentGroup); + this.parentGroup = Optional.ofNullable(parentGroup); return this; } @@ -316,7 +316,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -327,7 +327,7 @@ public Builder type(Optional type) { } public Builder type(GroupType type) { - this.type = Optional.of(type); + this.type = Optional.ofNullable(type); return this; } @@ -338,7 +338,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -349,7 +349,7 @@ public Builder isCommonlyUsedAsTeam(Optional isCommonlyUsedAsTeam) { } public Builder isCommonlyUsedAsTeam(Boolean isCommonlyUsedAsTeam) { - this.isCommonlyUsedAsTeam = Optional.of(isCommonlyUsedAsTeam); + this.isCommonlyUsedAsTeam = Optional.ofNullable(isCommonlyUsedAsTeam); return this; } @@ -360,7 +360,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -371,7 +371,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializer.java b/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializer.java index f8b999715..ed61b4227 100644 --- a/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializer.java +++ b/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializer.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializer.Builder.class) public final class IndividualCommonModelScopeDeserializer { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializer other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializer other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializer fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional fieldP @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.java index 0c3ccded0..6ee9699ba 100644 --- a/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/IndividualCommonModelScopeDeserializerRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializerRequest.Builder.class) public final class IndividualCommonModelScopeDeserializerRequest { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializerRequest other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializerRequest other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializerRequest fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Issue.java b/src/main/java/com/merge/api/resources/hris/types/Issue.java index b35378ffa..e6d294ea0 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Issue.java +++ b/src/main/java/com/merge/api/resources/hris/types/Issue.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Issue.Builder.class) public final class Issue { private final Optional id; @@ -154,7 +155,7 @@ public static ErrorDescriptionStage builder() { } public interface ErrorDescriptionStage { - _FinalStage errorDescription(String errorDescription); + _FinalStage errorDescription(@NotNull String errorDescription); Builder from(Issue other); } @@ -229,14 +230,14 @@ public Builder from(Issue other) { @java.lang.Override @JsonSetter("error_description") - public _FinalStage errorDescription(String errorDescription) { + public _FinalStage errorDescription(@NotNull String errorDescription) { this.errorDescription = errorDescription; return this; } @java.lang.Override public _FinalStage errorDetails(List errorDetails) { - this.errorDetails = Optional.of(errorDetails); + this.errorDetails = Optional.ofNullable(errorDetails); return this; } @@ -249,7 +250,7 @@ public _FinalStage errorDetails(Optional> errorDetails) { @java.lang.Override public _FinalStage isMuted(Boolean isMuted) { - this.isMuted = Optional.of(isMuted); + this.isMuted = Optional.ofNullable(isMuted); return this; } @@ -262,7 +263,7 @@ public _FinalStage isMuted(Optional isMuted) { @java.lang.Override public _FinalStage lastIncidentTime(OffsetDateTime lastIncidentTime) { - this.lastIncidentTime = Optional.of(lastIncidentTime); + this.lastIncidentTime = Optional.ofNullable(lastIncidentTime); return this; } @@ -275,7 +276,7 @@ public _FinalStage lastIncidentTime(Optional lastIncidentTime) { @java.lang.Override public _FinalStage firstIncidentTime(OffsetDateTime firstIncidentTime) { - this.firstIncidentTime = Optional.of(firstIncidentTime); + this.firstIncidentTime = Optional.ofNullable(firstIncidentTime); return this; } @@ -288,7 +289,7 @@ public _FinalStage firstIncidentTime(Optional firstIncidentTime) @java.lang.Override public _FinalStage endUser(Map endUser) { - this.endUser = Optional.of(endUser); + this.endUser = Optional.ofNullable(endUser); return this; } @@ -309,7 +310,7 @@ public _FinalStage endUser(Optional> endUser) { */ @java.lang.Override public _FinalStage status(IssueStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -322,7 +323,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/LinkToken.java b/src/main/java/com/merge/api/resources/hris/types/LinkToken.java index 17506028b..1ead2f9e6 100644 --- a/src/main/java/com/merge/api/resources/hris/types/LinkToken.java +++ b/src/main/java/com/merge/api/resources/hris/types/LinkToken.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkToken.Builder.class) public final class LinkToken { private final String linkToken; @@ -86,7 +87,7 @@ public static LinkTokenStage builder() { } public interface LinkTokenStage { - _FinalStage linkToken(String linkToken); + _FinalStage linkToken(@NotNull String linkToken); Builder from(LinkToken other); } @@ -126,14 +127,14 @@ public Builder from(LinkToken other) { @java.lang.Override @JsonSetter("link_token") - public _FinalStage linkToken(String linkToken) { + public _FinalStage linkToken(@NotNull String linkToken) { this.linkToken = linkToken; return this; } @java.lang.Override public _FinalStage magicLinkUrl(String magicLinkUrl) { - this.magicLinkUrl = Optional.of(magicLinkUrl); + this.magicLinkUrl = Optional.ofNullable(magicLinkUrl); return this; } @@ -146,7 +147,7 @@ public _FinalStage magicLinkUrl(Optional magicLinkUrl) { @java.lang.Override public _FinalStage integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/LinkedAccountStatus.java b/src/main/java/com/merge/api/resources/hris/types/LinkedAccountStatus.java index 78f400b57..11228e275 100644 --- a/src/main/java/com/merge/api/resources/hris/types/LinkedAccountStatus.java +++ b/src/main/java/com/merge/api/resources/hris/types/LinkedAccountStatus.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountStatus.Builder.class) public final class LinkedAccountStatus { private final String linkedAccountStatus; @@ -71,7 +72,7 @@ public static LinkedAccountStatusStage builder() { } public interface LinkedAccountStatusStage { - CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus); + CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus); Builder from(LinkedAccountStatus other); } @@ -104,7 +105,7 @@ public Builder from(LinkedAccountStatus other) { @java.lang.Override @JsonSetter("linked_account_status") - public CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus) { + public CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus) { this.linkedAccountStatus = linkedAccountStatus; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Location.java b/src/main/java/com/merge/api/resources/hris/types/Location.java index 83937be02..8930c6557 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Location.java +++ b/src/main/java/com/merge/api/resources/hris/types/Location.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Location.Builder.class) public final class Location { private final Optional id; @@ -594,7 +594,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -605,7 +605,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -616,7 +616,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -627,7 +627,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -638,7 +638,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -649,7 +649,7 @@ public Builder phoneNumber(Optional phoneNumber) { } public Builder phoneNumber(String phoneNumber) { - this.phoneNumber = Optional.of(phoneNumber); + this.phoneNumber = Optional.ofNullable(phoneNumber); return this; } @@ -660,7 +660,7 @@ public Builder street1(Optional street1) { } public Builder street1(String street1) { - this.street1 = Optional.of(street1); + this.street1 = Optional.ofNullable(street1); return this; } @@ -671,7 +671,7 @@ public Builder street2(Optional street2) { } public Builder street2(String street2) { - this.street2 = Optional.of(street2); + this.street2 = Optional.ofNullable(street2); return this; } @@ -682,7 +682,7 @@ public Builder city(Optional city) { } public Builder city(String city) { - this.city = Optional.of(city); + this.city = Optional.ofNullable(city); return this; } @@ -693,7 +693,7 @@ public Builder state(Optional state) { } public Builder state(String state) { - this.state = Optional.of(state); + this.state = Optional.ofNullable(state); return this; } @@ -704,7 +704,7 @@ public Builder zipCode(Optional zipCode) { } public Builder zipCode(String zipCode) { - this.zipCode = Optional.of(zipCode); + this.zipCode = Optional.ofNullable(zipCode); return this; } @@ -715,7 +715,7 @@ public Builder country(Optional country) { } public Builder country(LocationCountry country) { - this.country = Optional.of(country); + this.country = Optional.ofNullable(country); return this; } @@ -726,7 +726,7 @@ public Builder locationType(Optional locationType) { } public Builder locationType(LocationLocationType locationType) { - this.locationType = Optional.of(locationType); + this.locationType = Optional.ofNullable(locationType); return this; } @@ -737,7 +737,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -748,7 +748,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -759,7 +759,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/MetaResponse.java b/src/main/java/com/merge/api/resources/hris/types/MetaResponse.java index ddde2f202..c6528d5b6 100644 --- a/src/main/java/com/merge/api/resources/hris/types/MetaResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/MetaResponse.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MetaResponse.Builder.class) public final class MetaResponse { private final Map requestSchema; @@ -184,7 +184,7 @@ public _FinalStage hasRequiredLinkedAccountParams(boolean hasRequiredLinkedAccou @java.lang.Override public _FinalStage status(LinkedAccountStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -197,7 +197,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage remoteFieldClasses(Map remoteFieldClasses) { - this.remoteFieldClasses = Optional.of(remoteFieldClasses); + this.remoteFieldClasses = Optional.ofNullable(remoteFieldClasses); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/ModelOperation.java b/src/main/java/com/merge/api/resources/hris/types/ModelOperation.java index 546954051..04933658f 100644 --- a/src/main/java/com/merge/api/resources/hris/types/ModelOperation.java +++ b/src/main/java/com/merge/api/resources/hris/types/ModelOperation.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelOperation.Builder.class) public final class ModelOperation { private final String modelName; @@ -98,7 +99,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(ModelOperation other); } @@ -151,7 +152,7 @@ public Builder from(ModelOperation other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializer.java b/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializer.java index 77668db7a..0a6c50dee 100644 --- a/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializer.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializer.Builder.class) public final class ModelPermissionDeserializer { private final Optional isEnabled; @@ -84,7 +84,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializerRequest.java index c92c915da..a24745330 100644 --- a/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/ModelPermissionDeserializerRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializerRequest.Builder.class) public final class ModelPermissionDeserializerRequest { private final Optional isEnabled; @@ -85,7 +85,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/resources/hris/types/MultipartFormFieldRequest.java index 89d74c180..1dc2e0859 100644 --- a/src/main/java/com/merge/api/resources/hris/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/MultipartFormFieldRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MultipartFormFieldRequest.Builder.class) public final class MultipartFormFieldRequest { private final String name; @@ -126,13 +127,13 @@ public static NameStage builder() { } public interface NameStage { - DataStage name(String name); + DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { - _FinalStage data(String data); + _FinalStage data(@NotNull String data); } public interface _FinalStage { @@ -184,7 +185,7 @@ public Builder from(MultipartFormFieldRequest other) { */ @java.lang.Override @JsonSetter("name") - public DataStage name(String name) { + public DataStage name(@NotNull String name) { this.name = name; return this; } @@ -195,7 +196,7 @@ public DataStage name(String name) { */ @java.lang.Override @JsonSetter("data") - public _FinalStage data(String data) { + public _FinalStage data(@NotNull String data) { this.data = data; return this; } @@ -206,7 +207,7 @@ public _FinalStage data(String data) { */ @java.lang.Override public _FinalStage contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -223,7 +224,7 @@ public _FinalStage contentType(Optional contentType) { */ @java.lang.Override public _FinalStage fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -245,7 +246,7 @@ public _FinalStage fileName(Optional fileName) { */ @java.lang.Override public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { - this.encoding = Optional.of(encoding); + this.encoding = Optional.ofNullable(encoding); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.java index f3fdf1617..dc271fa56 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedAccountDetailsAndActionsList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountDetailsAndActionsList.Builder.class) public final class PaginatedAccountDetailsAndActionsList { private final Optional next; @@ -112,7 +112,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -123,7 +123,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -134,7 +134,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedAuditLogEventList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedAuditLogEventList.java index 2d9c2e068..bdd19d5b0 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedAuditLogEventList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedAuditLogEventList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAuditLogEventList.Builder.class) public final class PaginatedAuditLogEventList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedBankInfoList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedBankInfoList.java index 07a8e09c4..2b610f3e4 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedBankInfoList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedBankInfoList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedBankInfoList.Builder.class) public final class PaginatedBankInfoList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedBenefitList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedBenefitList.java index 4893f61fa..0e104063b 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedBenefitList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedBenefitList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedBenefitList.Builder.class) public final class PaginatedBenefitList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedCompanyList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedCompanyList.java index bad10ed77..deab25315 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedCompanyList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedCompanyList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCompanyList.Builder.class) public final class PaginatedCompanyList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedDependentList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedDependentList.java index 27400ae96..711fa58a4 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedDependentList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedDependentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedDependentList.Builder.class) public final class PaginatedDependentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeeList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeeList.java index 758777062..2e70aa331 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeeList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeeList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEmployeeList.Builder.class) public final class PaginatedEmployeeList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeePayrollRunList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeePayrollRunList.java index aa87d45bb..6885d5fea 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeePayrollRunList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployeePayrollRunList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEmployeePayrollRunList.Builder.class) public final class PaginatedEmployeePayrollRunList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployerBenefitList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployerBenefitList.java index f838733d9..94e9866b3 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployerBenefitList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmployerBenefitList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEmployerBenefitList.Builder.class) public final class PaginatedEmployerBenefitList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmploymentList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmploymentList.java index 5133b8cce..5432a0680 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedEmploymentList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedEmploymentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedEmploymentList.Builder.class) public final class PaginatedEmploymentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedGroupList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedGroupList.java index a87e351f7..4f381136d 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedGroupList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedGroupList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedGroupList.Builder.class) public final class PaginatedGroupList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedIssueList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedIssueList.java index 6f7dd1209..4b73d4c4e 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedIssueList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedIssueList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedIssueList.Builder.class) public final class PaginatedIssueList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedLocationList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedLocationList.java index 300a55d90..31278cc02 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedLocationList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedLocationList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedLocationList.Builder.class) public final class PaginatedLocationList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedPayGroupList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedPayGroupList.java index de6c045da..8a26bed9a 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedPayGroupList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedPayGroupList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedPayGroupList.Builder.class) public final class PaginatedPayGroupList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedPayrollRunList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedPayrollRunList.java index 3a5ab6bfd..7a95e6e7a 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedPayrollRunList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedPayrollRunList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedPayrollRunList.Builder.class) public final class PaginatedPayrollRunList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedSyncStatusList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedSyncStatusList.java index 31c9be312..6097dd931 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedSyncStatusList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedSyncStatusList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedSyncStatusList.Builder.class) public final class PaginatedSyncStatusList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedTeamList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedTeamList.java index 5f75a3a91..fadee4dfa 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedTeamList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedTeamList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTeamList.Builder.class) public final class PaginatedTeamList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffBalanceList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffBalanceList.java index 614ad9ee4..966606bef 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffBalanceList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffBalanceList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTimeOffBalanceList.Builder.class) public final class PaginatedTimeOffBalanceList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffList.java index 1828b2013..0ff2b70ab 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedTimeOffList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTimeOffList.Builder.class) public final class PaginatedTimeOffList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PaginatedTimesheetEntryList.java b/src/main/java/com/merge/api/resources/hris/types/PaginatedTimesheetEntryList.java index 3b0d45976..1f56015f5 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PaginatedTimesheetEntryList.java +++ b/src/main/java/com/merge/api/resources/hris/types/PaginatedTimesheetEntryList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTimesheetEntryList.Builder.class) public final class PaginatedTimesheetEntryList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PayGroup.java b/src/main/java/com/merge/api/resources/hris/types/PayGroup.java index 1001b02c5..f7c529b2f 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PayGroup.java +++ b/src/main/java/com/merge/api/resources/hris/types/PayGroup.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PayGroup.Builder.class) public final class PayGroup { private final Optional id; @@ -203,7 +203,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -214,7 +214,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -225,7 +225,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -236,7 +236,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -247,7 +247,7 @@ public Builder payGroupName(Optional payGroupName) { } public Builder payGroupName(String payGroupName) { - this.payGroupName = Optional.of(payGroupName); + this.payGroupName = Optional.ofNullable(payGroupName); return this; } @@ -258,7 +258,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -269,7 +269,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -280,7 +280,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/PayrollRun.java b/src/main/java/com/merge/api/resources/hris/types/PayrollRun.java index 4ff4349ff..323b2bb3b 100644 --- a/src/main/java/com/merge/api/resources/hris/types/PayrollRun.java +++ b/src/main/java/com/merge/api/resources/hris/types/PayrollRun.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PayrollRun.Builder.class) public final class PayrollRun { private final Optional id; @@ -285,7 +285,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -296,7 +296,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -307,7 +307,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -318,7 +318,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -329,7 +329,7 @@ public Builder runState(Optional runState) { } public Builder runState(PayrollRunRunState runState) { - this.runState = Optional.of(runState); + this.runState = Optional.ofNullable(runState); return this; } @@ -340,7 +340,7 @@ public Builder runType(Optional runType) { } public Builder runType(PayrollRunRunType runType) { - this.runType = Optional.of(runType); + this.runType = Optional.ofNullable(runType); return this; } @@ -351,7 +351,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(OffsetDateTime startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -362,7 +362,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(OffsetDateTime endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -373,7 +373,7 @@ public Builder checkDate(Optional checkDate) { } public Builder checkDate(OffsetDateTime checkDate) { - this.checkDate = Optional.of(checkDate); + this.checkDate = Optional.ofNullable(checkDate); return this; } @@ -384,7 +384,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -395,7 +395,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -406,7 +406,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/RemoteData.java b/src/main/java/com/merge/api/resources/hris/types/RemoteData.java index 40c010868..24e1f3b7a 100644 --- a/src/main/java/com/merge/api/resources/hris/types/RemoteData.java +++ b/src/main/java/com/merge/api/resources/hris/types/RemoteData.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteData.Builder.class) public final class RemoteData { private final String path; @@ -76,7 +77,7 @@ public static PathStage builder() { } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); Builder from(RemoteData other); } @@ -113,14 +114,14 @@ public Builder from(RemoteData other) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @java.lang.Override public _FinalStage data(JsonNode data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/RemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/hris/types/RemoteEndpointInfo.java index 4f38b1609..3c4551bae 100644 --- a/src/main/java/com/merge/api/resources/hris/types/RemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/hris/types/RemoteEndpointInfo.java @@ -18,8 +18,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteEndpointInfo.Builder.class) public final class RemoteEndpointInfo { private final String method; @@ -88,13 +89,13 @@ public static MethodStage builder() { } public interface MethodStage { - UrlPathStage method(String method); + UrlPathStage method(@NotNull String method); Builder from(RemoteEndpointInfo other); } public interface UrlPathStage { - _FinalStage urlPath(String urlPath); + _FinalStage urlPath(@NotNull String urlPath); } public interface _FinalStage { @@ -130,14 +131,14 @@ public Builder from(RemoteEndpointInfo other) { @java.lang.Override @JsonSetter("method") - public UrlPathStage method(String method) { + public UrlPathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("url_path") - public _FinalStage urlPath(String urlPath) { + public _FinalStage urlPath(@NotNull String urlPath) { this.urlPath = urlPath; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApi.java b/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApi.java index 01c7b7d08..9b986cc20 100644 --- a/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApi.java +++ b/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApi.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApi.Builder.class) public final class RemoteFieldApi { private final Map schema; @@ -125,13 +126,13 @@ public static RemoteKeyNameStage builder() { } public interface RemoteKeyNameStage { - RemoteEndpointInfoStage remoteKeyName(String remoteKeyName); + RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName); Builder from(RemoteFieldApi other); } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo); } public interface _FinalStage { @@ -188,21 +189,21 @@ public Builder from(RemoteFieldApi other) { @java.lang.Override @JsonSetter("remote_key_name") - public RemoteEndpointInfoStage remoteKeyName(String remoteKeyName) { + public RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName) { this.remoteKeyName = remoteKeyName; return this; } @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage coverage(RemoteFieldApiCoverage coverage) { - this.coverage = Optional.of(coverage); + this.coverage = Optional.ofNullable(coverage); return this; } @@ -215,7 +216,7 @@ public _FinalStage coverage(Optional coverage) { @java.lang.Override public _FinalStage advancedMetadata(AdvancedMetadata advancedMetadata) { - this.advancedMetadata = Optional.of(advancedMetadata); + this.advancedMetadata = Optional.ofNullable(advancedMetadata); return this; } @@ -228,7 +229,7 @@ public _FinalStage advancedMetadata(Optional advancedMetadata) @java.lang.Override public _FinalStage exampleValues(List exampleValues) { - this.exampleValues = Optional.of(exampleValues); + this.exampleValues = Optional.ofNullable(exampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApiResponse.java b/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApiResponse.java index ae7241f3c..06201c78b 100644 --- a/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/RemoteFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApiResponse.Builder.class) public final class RemoteFieldApiResponse { private final Optional> benefit; @@ -298,7 +298,7 @@ public Builder benefit(Optional> benefit) { } public Builder benefit(List benefit) { - this.benefit = Optional.of(benefit); + this.benefit = Optional.ofNullable(benefit); return this; } @@ -309,7 +309,7 @@ public Builder employerBenefit(Optional> employerBenefit) { } public Builder employerBenefit(List employerBenefit) { - this.employerBenefit = Optional.of(employerBenefit); + this.employerBenefit = Optional.ofNullable(employerBenefit); return this; } @@ -320,7 +320,7 @@ public Builder company(Optional> company) { } public Builder company(List company) { - this.company = Optional.of(company); + this.company = Optional.ofNullable(company); return this; } @@ -331,7 +331,7 @@ public Builder employeePayrollRun(Optional> employeePayroll } public Builder employeePayrollRun(List employeePayrollRun) { - this.employeePayrollRun = Optional.of(employeePayrollRun); + this.employeePayrollRun = Optional.ofNullable(employeePayrollRun); return this; } @@ -342,7 +342,7 @@ public Builder employee(Optional> employee) { } public Builder employee(List employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -353,7 +353,7 @@ public Builder employment(Optional> employment) { } public Builder employment(List employment) { - this.employment = Optional.of(employment); + this.employment = Optional.ofNullable(employment); return this; } @@ -364,7 +364,7 @@ public Builder location(Optional> location) { } public Builder location(List location) { - this.location = Optional.of(location); + this.location = Optional.ofNullable(location); return this; } @@ -375,7 +375,7 @@ public Builder payrollRun(Optional> payrollRun) { } public Builder payrollRun(List payrollRun) { - this.payrollRun = Optional.of(payrollRun); + this.payrollRun = Optional.ofNullable(payrollRun); return this; } @@ -386,7 +386,7 @@ public Builder team(Optional> team) { } public Builder team(List team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -397,7 +397,7 @@ public Builder timeOff(Optional> timeOff) { } public Builder timeOff(List timeOff) { - this.timeOff = Optional.of(timeOff); + this.timeOff = Optional.ofNullable(timeOff); return this; } @@ -408,7 +408,7 @@ public Builder timeOffBalance(Optional> timeOffBalance) { } public Builder timeOffBalance(List timeOffBalance) { - this.timeOffBalance = Optional.of(timeOffBalance); + this.timeOffBalance = Optional.ofNullable(timeOffBalance); return this; } @@ -419,7 +419,7 @@ public Builder bankInfo(Optional> bankInfo) { } public Builder bankInfo(List bankInfo) { - this.bankInfo = Optional.of(bankInfo); + this.bankInfo = Optional.ofNullable(bankInfo); return this; } @@ -430,7 +430,7 @@ public Builder payGroup(Optional> payGroup) { } public Builder payGroup(List payGroup) { - this.payGroup = Optional.of(payGroup); + this.payGroup = Optional.ofNullable(payGroup); return this; } @@ -441,7 +441,7 @@ public Builder group(Optional> group) { } public Builder group(List group) { - this.group = Optional.of(group); + this.group = Optional.ofNullable(group); return this; } @@ -452,7 +452,7 @@ public Builder dependent(Optional> dependent) { } public Builder dependent(List dependent) { - this.dependent = Optional.of(dependent); + this.dependent = Optional.ofNullable(dependent); return this; } @@ -463,7 +463,7 @@ public Builder timesheetEntry(Optional> timesheetEntry) { } public Builder timesheetEntry(List timesheetEntry) { - this.timesheetEntry = Optional.of(timesheetEntry); + this.timesheetEntry = Optional.ofNullable(timesheetEntry); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/RemoteKey.java b/src/main/java/com/merge/api/resources/hris/types/RemoteKey.java index 231d763fb..12d979574 100644 --- a/src/main/java/com/merge/api/resources/hris/types/RemoteKey.java +++ b/src/main/java/com/merge/api/resources/hris/types/RemoteKey.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKey.Builder.class) public final class RemoteKey { private final String name; @@ -70,13 +71,13 @@ public static NameStage builder() { } public interface NameStage { - KeyStage name(String name); + KeyStage name(@NotNull String name); Builder from(RemoteKey other); } public interface KeyStage { - _FinalStage key(String key); + _FinalStage key(@NotNull String key); } public interface _FinalStage { @@ -103,14 +104,14 @@ public Builder from(RemoteKey other) { @java.lang.Override @JsonSetter("name") - public KeyStage name(String name) { + public KeyStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("key") - public _FinalStage key(String key) { + public _FinalStage key(@NotNull String key) { this.key = key; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/RemoteResponse.java b/src/main/java/com/merge/api/resources/hris/types/RemoteResponse.java index 782efc56e..eb491f762 100644 --- a/src/main/java/com/merge/api/resources/hris/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/RemoteResponse.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteResponse.Builder.class) public final class RemoteResponse { private final String method; @@ -134,13 +135,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(String method); + PathStage method(@NotNull String method); Builder from(RemoteResponse other); } public interface PathStage { - StatusStage path(String path); + StatusStage path(@NotNull String path); } public interface StatusStage { @@ -148,7 +149,7 @@ public interface StatusStage { } public interface ResponseStage { - _FinalStage response(JsonNode response); + _FinalStage response(@NotNull JsonNode response); } public interface _FinalStage { @@ -202,14 +203,14 @@ public Builder from(RemoteResponse other) { @java.lang.Override @JsonSetter("method") - public PathStage method(String method) { + public PathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("path") - public StatusStage path(String path) { + public StatusStage path(@NotNull String path) { this.path = path; return this; } @@ -223,14 +224,14 @@ public ResponseStage status(int status) { @java.lang.Override @JsonSetter("response") - public _FinalStage response(JsonNode response) { + public _FinalStage response(@NotNull JsonNode response) { this.response = response; return this; } @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -243,7 +244,7 @@ public _FinalStage headers(Optional> headers) { @java.lang.Override public _FinalStage responseType(RemoteResponseResponseType responseType) { - this.responseType = Optional.of(responseType); + this.responseType = Optional.ofNullable(responseType); return this; } @@ -256,7 +257,7 @@ public _FinalStage responseType(Optional responseTyp @java.lang.Override public _FinalStage responseHeaders(Map responseHeaders) { - this.responseHeaders = Optional.of(responseHeaders); + this.responseHeaders = Optional.ofNullable(responseHeaders); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/SyncStatus.java b/src/main/java/com/merge/api/resources/hris/types/SyncStatus.java index 42f3a20d5..c94ff32c8 100644 --- a/src/main/java/com/merge/api/resources/hris/types/SyncStatus.java +++ b/src/main/java/com/merge/api/resources/hris/types/SyncStatus.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatus.Builder.class) public final class SyncStatus { private final String modelName; @@ -134,17 +135,17 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - ModelIdStage modelName(String modelName); + ModelIdStage modelName(@NotNull String modelName); Builder from(SyncStatus other); } public interface ModelIdStage { - StatusStage modelId(String modelId); + StatusStage modelId(@NotNull String modelId); } public interface StatusStage { - IsInitialSyncStage status(SyncStatusStatusEnum status); + IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status); } public interface IsInitialSyncStage { @@ -205,21 +206,21 @@ public Builder from(SyncStatus other) { @java.lang.Override @JsonSetter("model_name") - public ModelIdStage modelName(String modelName) { + public ModelIdStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override @JsonSetter("model_id") - public StatusStage modelId(String modelId) { + public StatusStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(SyncStatusStatusEnum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status) { this.status = status; return this; } @@ -234,7 +235,7 @@ public _FinalStage isInitialSync(boolean isInitialSync) { @java.lang.Override public _FinalStage selectiveSyncConfigurationsUsage( SelectiveSyncConfigurationsUsageEnum selectiveSyncConfigurationsUsage) { - this.selectiveSyncConfigurationsUsage = Optional.of(selectiveSyncConfigurationsUsage); + this.selectiveSyncConfigurationsUsage = Optional.ofNullable(selectiveSyncConfigurationsUsage); return this; } @@ -248,7 +249,7 @@ public _FinalStage selectiveSyncConfigurationsUsage( @java.lang.Override public _FinalStage nextSyncStart(OffsetDateTime nextSyncStart) { - this.nextSyncStart = Optional.of(nextSyncStart); + this.nextSyncStart = Optional.ofNullable(nextSyncStart); return this; } @@ -261,7 +262,7 @@ public _FinalStage nextSyncStart(Optional nextSyncStart) { @java.lang.Override public _FinalStage lastSyncStart(OffsetDateTime lastSyncStart) { - this.lastSyncStart = Optional.of(lastSyncStart); + this.lastSyncStart = Optional.ofNullable(lastSyncStart); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Tax.java b/src/main/java/com/merge/api/resources/hris/types/Tax.java index 46bf26a9d..395695e4d 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Tax.java +++ b/src/main/java/com/merge/api/resources/hris/types/Tax.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Tax.Builder.class) public final class Tax { private final Optional id; @@ -251,7 +251,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -262,7 +262,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -273,7 +273,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -284,7 +284,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -295,7 +295,7 @@ public Builder employeePayrollRun(Optional employeePayrollRun) { } public Builder employeePayrollRun(String employeePayrollRun) { - this.employeePayrollRun = Optional.of(employeePayrollRun); + this.employeePayrollRun = Optional.ofNullable(employeePayrollRun); return this; } @@ -306,7 +306,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -317,7 +317,7 @@ public Builder amount(Optional amount) { } public Builder amount(Double amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -328,7 +328,7 @@ public Builder employerTax(Optional employerTax) { } public Builder employerTax(Boolean employerTax) { - this.employerTax = Optional.of(employerTax); + this.employerTax = Optional.ofNullable(employerTax); return this; } @@ -339,7 +339,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -350,7 +350,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -361,7 +361,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/Team.java b/src/main/java/com/merge/api/resources/hris/types/Team.java index 2c0b6f723..075a7b361 100644 --- a/src/main/java/com/merge/api/resources/hris/types/Team.java +++ b/src/main/java/com/merge/api/resources/hris/types/Team.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Team.Builder.class) public final class Team { private final Optional id; @@ -220,7 +220,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -231,7 +231,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -242,7 +242,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -253,7 +253,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -264,7 +264,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -275,7 +275,7 @@ public Builder parentTeam(Optional parentTeam) { } public Builder parentTeam(TeamParentTeam parentTeam) { - this.parentTeam = Optional.of(parentTeam); + this.parentTeam = Optional.ofNullable(parentTeam); return this; } @@ -286,7 +286,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -297,7 +297,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -308,7 +308,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/TimeOff.java b/src/main/java/com/merge/api/resources/hris/types/TimeOff.java index b1ecab3b3..977c2d458 100644 --- a/src/main/java/com/merge/api/resources/hris/types/TimeOff.java +++ b/src/main/java/com/merge/api/resources/hris/types/TimeOff.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOff.Builder.class) public final class TimeOff { private final Optional id; @@ -358,7 +358,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -369,7 +369,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -380,7 +380,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -391,7 +391,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -402,7 +402,7 @@ public Builder employee(Optional employee) { } public Builder employee(TimeOffEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -413,7 +413,7 @@ public Builder approver(Optional approver) { } public Builder approver(TimeOffApprover approver) { - this.approver = Optional.of(approver); + this.approver = Optional.ofNullable(approver); return this; } @@ -424,7 +424,7 @@ public Builder status(Optional status) { } public Builder status(TimeOffStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -435,7 +435,7 @@ public Builder employeeNote(Optional employeeNote) { } public Builder employeeNote(String employeeNote) { - this.employeeNote = Optional.of(employeeNote); + this.employeeNote = Optional.ofNullable(employeeNote); return this; } @@ -446,7 +446,7 @@ public Builder units(Optional units) { } public Builder units(TimeOffUnits units) { - this.units = Optional.of(units); + this.units = Optional.ofNullable(units); return this; } @@ -457,7 +457,7 @@ public Builder amount(Optional amount) { } public Builder amount(Double amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -468,7 +468,7 @@ public Builder requestType(Optional requestType) { } public Builder requestType(TimeOffRequestType requestType) { - this.requestType = Optional.of(requestType); + this.requestType = Optional.ofNullable(requestType); return this; } @@ -479,7 +479,7 @@ public Builder startTime(Optional startTime) { } public Builder startTime(OffsetDateTime startTime) { - this.startTime = Optional.of(startTime); + this.startTime = Optional.ofNullable(startTime); return this; } @@ -490,7 +490,7 @@ public Builder endTime(Optional endTime) { } public Builder endTime(OffsetDateTime endTime) { - this.endTime = Optional.of(endTime); + this.endTime = Optional.ofNullable(endTime); return this; } @@ -501,7 +501,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -512,7 +512,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -523,7 +523,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/TimeOffBalance.java b/src/main/java/com/merge/api/resources/hris/types/TimeOffBalance.java index f65e44c7e..7139c9572 100644 --- a/src/main/java/com/merge/api/resources/hris/types/TimeOffBalance.java +++ b/src/main/java/com/merge/api/resources/hris/types/TimeOffBalance.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffBalance.Builder.class) public final class TimeOffBalance { private final Optional id; @@ -262,7 +262,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -273,7 +273,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -284,7 +284,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -295,7 +295,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -306,7 +306,7 @@ public Builder employee(Optional employee) { } public Builder employee(TimeOffBalanceEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -317,7 +317,7 @@ public Builder balance(Optional balance) { } public Builder balance(Double balance) { - this.balance = Optional.of(balance); + this.balance = Optional.ofNullable(balance); return this; } @@ -328,7 +328,7 @@ public Builder used(Optional used) { } public Builder used(Double used) { - this.used = Optional.of(used); + this.used = Optional.ofNullable(used); return this; } @@ -339,7 +339,7 @@ public Builder policyType(Optional policyType) { } public Builder policyType(TimeOffBalancePolicyType policyType) { - this.policyType = Optional.of(policyType); + this.policyType = Optional.ofNullable(policyType); return this; } @@ -350,7 +350,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -361,7 +361,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -372,7 +372,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/TimeOffRequest.java b/src/main/java/com/merge/api/resources/hris/types/TimeOffRequest.java index 8f6182299..31c91d796 100644 --- a/src/main/java/com/merge/api/resources/hris/types/TimeOffRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/TimeOffRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffRequest.Builder.class) public final class TimeOffRequest { private final Optional employee; @@ -275,7 +275,7 @@ public Builder employee(Optional employee) { } public Builder employee(TimeOffRequestEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -286,7 +286,7 @@ public Builder approver(Optional approver) { } public Builder approver(TimeOffRequestApprover approver) { - this.approver = Optional.of(approver); + this.approver = Optional.ofNullable(approver); return this; } @@ -297,7 +297,7 @@ public Builder status(Optional status) { } public Builder status(TimeOffRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -308,7 +308,7 @@ public Builder employeeNote(Optional employeeNote) { } public Builder employeeNote(String employeeNote) { - this.employeeNote = Optional.of(employeeNote); + this.employeeNote = Optional.ofNullable(employeeNote); return this; } @@ -319,7 +319,7 @@ public Builder units(Optional units) { } public Builder units(TimeOffRequestUnits units) { - this.units = Optional.of(units); + this.units = Optional.ofNullable(units); return this; } @@ -330,7 +330,7 @@ public Builder amount(Optional amount) { } public Builder amount(Double amount) { - this.amount = Optional.of(amount); + this.amount = Optional.ofNullable(amount); return this; } @@ -341,7 +341,7 @@ public Builder requestType(Optional requestType) { } public Builder requestType(TimeOffRequestRequestType requestType) { - this.requestType = Optional.of(requestType); + this.requestType = Optional.ofNullable(requestType); return this; } @@ -352,7 +352,7 @@ public Builder startTime(Optional startTime) { } public Builder startTime(OffsetDateTime startTime) { - this.startTime = Optional.of(startTime); + this.startTime = Optional.ofNullable(startTime); return this; } @@ -363,7 +363,7 @@ public Builder endTime(Optional endTime) { } public Builder endTime(OffsetDateTime endTime) { - this.endTime = Optional.of(endTime); + this.endTime = Optional.ofNullable(endTime); return this; } @@ -374,7 +374,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -385,7 +385,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/TimeOffResponse.java b/src/main/java/com/merge/api/resources/hris/types/TimeOffResponse.java index 86936a4bf..95779737e 100644 --- a/src/main/java/com/merge/api/resources/hris/types/TimeOffResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/TimeOffResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimeOffResponse.Builder.class) public final class TimeOffResponse { private final TimeOff model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(TimeOff model); + _FinalStage model(@NotNull TimeOff model); Builder from(TimeOffResponse other); } @@ -149,14 +150,14 @@ public Builder from(TimeOffResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(TimeOff model) { + public _FinalStage model(@NotNull TimeOff model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/TimesheetEntry.java b/src/main/java/com/merge/api/resources/hris/types/TimesheetEntry.java index b2d121573..60c198f77 100644 --- a/src/main/java/com/merge/api/resources/hris/types/TimesheetEntry.java +++ b/src/main/java/com/merge/api/resources/hris/types/TimesheetEntry.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimesheetEntry.Builder.class) public final class TimesheetEntry { private final Optional id; @@ -254,7 +254,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -265,7 +265,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -276,7 +276,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -287,7 +287,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -298,7 +298,7 @@ public Builder employee(Optional employee) { } public Builder employee(TimesheetEntryEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -309,7 +309,7 @@ public Builder hoursWorked(Optional hoursWorked) { } public Builder hoursWorked(Double hoursWorked) { - this.hoursWorked = Optional.of(hoursWorked); + this.hoursWorked = Optional.ofNullable(hoursWorked); return this; } @@ -320,7 +320,7 @@ public Builder startTime(Optional startTime) { } public Builder startTime(OffsetDateTime startTime) { - this.startTime = Optional.of(startTime); + this.startTime = Optional.ofNullable(startTime); return this; } @@ -331,7 +331,7 @@ public Builder endTime(Optional endTime) { } public Builder endTime(OffsetDateTime endTime) { - this.endTime = Optional.of(endTime); + this.endTime = Optional.ofNullable(endTime); return this; } @@ -342,7 +342,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -353,7 +353,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -364,7 +364,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryRequest.java b/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryRequest.java index 46019b477..a42d27a7b 100644 --- a/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryRequest.java +++ b/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimesheetEntryRequest.Builder.class) public final class TimesheetEntryRequest { private final Optional employee; @@ -171,7 +171,7 @@ public Builder employee(Optional employee) { } public Builder employee(TimesheetEntryRequestEmployee employee) { - this.employee = Optional.of(employee); + this.employee = Optional.ofNullable(employee); return this; } @@ -182,7 +182,7 @@ public Builder hoursWorked(Optional hoursWorked) { } public Builder hoursWorked(Double hoursWorked) { - this.hoursWorked = Optional.of(hoursWorked); + this.hoursWorked = Optional.ofNullable(hoursWorked); return this; } @@ -193,7 +193,7 @@ public Builder startTime(Optional startTime) { } public Builder startTime(OffsetDateTime startTime) { - this.startTime = Optional.of(startTime); + this.startTime = Optional.ofNullable(startTime); return this; } @@ -204,7 +204,7 @@ public Builder endTime(Optional endTime) { } public Builder endTime(OffsetDateTime endTime) { - this.endTime = Optional.of(endTime); + this.endTime = Optional.ofNullable(endTime); return this; } @@ -215,7 +215,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -226,7 +226,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryResponse.java b/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryResponse.java index 79705dbc8..36a1558ef 100644 --- a/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryResponse.java +++ b/src/main/java/com/merge/api/resources/hris/types/TimesheetEntryResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TimesheetEntryResponse.Builder.class) public final class TimesheetEntryResponse { private final TimesheetEntry model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(TimesheetEntry model); + _FinalStage model(@NotNull TimesheetEntry model); Builder from(TimesheetEntryResponse other); } @@ -149,14 +150,14 @@ public Builder from(TimesheetEntryResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(TimesheetEntry model) { + public _FinalStage model(@NotNull TimesheetEntry model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/ValidationProblemSource.java b/src/main/java/com/merge/api/resources/hris/types/ValidationProblemSource.java index cfec2e46c..7c25c7a10 100644 --- a/src/main/java/com/merge/api/resources/hris/types/ValidationProblemSource.java +++ b/src/main/java/com/merge/api/resources/hris/types/ValidationProblemSource.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ValidationProblemSource.Builder.class) public final class ValidationProblemSource { private final String pointer; @@ -62,7 +63,7 @@ public static PointerStage builder() { } public interface PointerStage { - _FinalStage pointer(String pointer); + _FinalStage pointer(@NotNull String pointer); Builder from(ValidationProblemSource other); } @@ -88,7 +89,7 @@ public Builder from(ValidationProblemSource other) { @java.lang.Override @JsonSetter("pointer") - public _FinalStage pointer(String pointer) { + public _FinalStage pointer(@NotNull String pointer) { this.pointer = pointer; return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/WarningValidationProblem.java b/src/main/java/com/merge/api/resources/hris/types/WarningValidationProblem.java index 30ac7d508..4cc33687c 100644 --- a/src/main/java/com/merge/api/resources/hris/types/WarningValidationProblem.java +++ b/src/main/java/com/merge/api/resources/hris/types/WarningValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WarningValidationProblem.Builder.class) public final class WarningValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(WarningValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(WarningValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/types/WebhookReceiver.java b/src/main/java/com/merge/api/resources/hris/types/WebhookReceiver.java index 905db4823..1dcc315f3 100644 --- a/src/main/java/com/merge/api/resources/hris/types/WebhookReceiver.java +++ b/src/main/java/com/merge/api/resources/hris/types/WebhookReceiver.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiver.Builder.class) public final class WebhookReceiver { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiver other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiver other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/hris/webhookreceivers/WebhookReceiversClient.java b/src/main/java/com/merge/api/resources/hris/webhookreceivers/WebhookReceiversClient.java index 1421e3b7f..004fabb86 100644 --- a/src/main/java/com/merge/api/resources/hris/webhookreceivers/WebhookReceiversClient.java +++ b/src/main/java/com/merge/api/resources/hris/webhookreceivers/WebhookReceiversClient.java @@ -50,6 +50,7 @@ public List list(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,6 +99,7 @@ public WebhookReceiver create(WebhookReceiverRequest request, RequestOptions req .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/hris/webhookreceivers/requests/WebhookReceiverRequest.java b/src/main/java/com/merge/api/resources/hris/webhookreceivers/requests/WebhookReceiverRequest.java index 003a54d5a..0d7a84ead 100644 --- a/src/main/java/com/merge/api/resources/hris/webhookreceivers/requests/WebhookReceiverRequest.java +++ b/src/main/java/com/merge/api/resources/hris/webhookreceivers/requests/WebhookReceiverRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiverRequest.Builder.class) public final class WebhookReceiverRequest { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiverRequest other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiverRequest other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/accountdetails/AccountDetailsClient.java b/src/main/java/com/merge/api/resources/ticketing/accountdetails/AccountDetailsClient.java index 09d3f65b3..da38a1772 100644 --- a/src/main/java/com/merge/api/resources/ticketing/accountdetails/AccountDetailsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/accountdetails/AccountDetailsClient.java @@ -44,6 +44,7 @@ public AccountDetails retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/accounts/AccountsClient.java b/src/main/java/com/merge/api/resources/ticketing/accounts/AccountsClient.java index 5acd7b121..a9b56c959 100644 --- a/src/main/java/com/merge/api/resources/ticketing/accounts/AccountsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/accounts/AccountsClient.java @@ -90,7 +90,8 @@ public PaginatedAccountList list(AccountsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedAccountList list(AccountsListRequest request, RequestOptions req } } - /** - * Returns an Account object with the given id. - */ - public Account retrieve(String id) { - return retrieve(id, AccountsRetrieveRequest.builder().build()); - } - /** * Returns an Account object with the given id. */ @@ -141,7 +135,8 @@ public Account retrieve(String id, AccountsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsListRequest.java index 1cc858873..5d71bb1db 100644 --- a/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountsListRequest.Builder.class) public final class AccountsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsRetrieveRequest.java index f0630da6f..279a7d031 100644 --- a/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/accounts/requests/AccountsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountsRetrieveRequest.Builder.class) public final class AccountsRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/accounttoken/AccountTokenClient.java b/src/main/java/com/merge/api/resources/ticketing/accounttoken/AccountTokenClient.java index 342ba9995..50d365fc5 100644 --- a/src/main/java/com/merge/api/resources/ticketing/accounttoken/AccountTokenClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/accounttoken/AccountTokenClient.java @@ -45,6 +45,7 @@ public AccountToken retrieve(String publicToken, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/asyncpassthrough/AsyncPassthroughClient.java b/src/main/java/com/merge/api/resources/ticketing/asyncpassthrough/AsyncPassthroughClient.java index da1f4c5f6..e7dc575c6 100644 --- a/src/main/java/com/merge/api/resources/ticketing/asyncpassthrough/AsyncPassthroughClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/asyncpassthrough/AsyncPassthroughClient.java @@ -97,6 +97,7 @@ public AsyncPassthroughRetrieveResponse retrieve(String asyncPassthroughReceiptI .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/attachments/AttachmentsClient.java b/src/main/java/com/merge/api/resources/ticketing/attachments/AttachmentsClient.java index 5fe7b5861..774732e24 100644 --- a/src/main/java/com/merge/api/resources/ticketing/attachments/AttachmentsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/attachments/AttachmentsClient.java @@ -9,6 +9,7 @@ import com.merge.api.core.MergeException; import com.merge.api.core.ObjectMappers; import com.merge.api.core.RequestOptions; +import com.merge.api.core.ResponseBodyInputStream; import com.merge.api.resources.ticketing.attachments.requests.AttachmentsDownloadRetrieveRequest; import com.merge.api.resources.ticketing.attachments.requests.AttachmentsListRequest; import com.merge.api.resources.ticketing.attachments.requests.AttachmentsRetrieveRequest; @@ -110,7 +111,8 @@ public PaginatedAttachmentList list(AttachmentsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -166,7 +168,8 @@ public TicketingAttachmentResponse create( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -187,13 +190,6 @@ public TicketingAttachmentResponse create( } } - /** - * Returns an Attachment object with the given id. - */ - public Attachment retrieve(String id) { - return retrieve(id, AttachmentsRetrieveRequest.builder().build()); - } - /** * Returns an Attachment object with the given id. */ @@ -220,7 +216,8 @@ public Attachment retrieve(String id, AttachmentsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -241,13 +238,6 @@ public Attachment retrieve(String id, AttachmentsRetrieveRequest request, Reques } } - /** - * Returns the File content with the given id as a stream of bytes. - */ - public InputStream downloadRetrieve(String id) { - return downloadRetrieve(id, AttachmentsDownloadRetrieveRequest.builder().build()); - } - /** * Returns the File content with the given id as a stream of bytes. */ @@ -278,10 +268,11 @@ public InputStream downloadRetrieve( if (requestOptions != null && requestOptions.getTimeout().isPresent()) { client = clientOptions.httpClientWithTimeout(requestOptions); } - try (Response response = client.newCall(okhttpRequest).execute()) { + try { + Response response = client.newCall(okhttpRequest).execute(); ResponseBody responseBody = response.body(); if (response.isSuccessful()) { - return responseBody.byteStream(); + return new ResponseBodyInputStream(response); } String responseBodyString = responseBody != null ? responseBody.string() : "{}"; throw new ApiError( @@ -313,6 +304,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsDownloadRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsDownloadRetrieveRequest.java index d3f553d4b..a9e397e51 100644 --- a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsDownloadRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsDownloadRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentsDownloadRetrieveRequest.Builder.class) public final class AttachmentsDownloadRetrieveRequest { private final Optional mimeType; @@ -88,7 +88,7 @@ public Builder mimeType(Optional mimeType) { } public Builder mimeType(String mimeType) { - this.mimeType = Optional.of(mimeType); + this.mimeType = Optional.ofNullable(mimeType); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsListRequest.java index 8d87501a3..e499cfee7 100644 --- a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentsListRequest.Builder.class) public final class AttachmentsListRequest { private final Optional createdAfter; @@ -295,7 +295,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -306,7 +306,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -317,7 +317,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -328,7 +328,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -339,7 +339,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -350,7 +350,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -361,7 +361,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -372,7 +372,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -383,7 +383,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -394,7 +394,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -405,7 +405,7 @@ public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { } public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { - this.remoteCreatedAfter = Optional.of(remoteCreatedAfter); + this.remoteCreatedAfter = Optional.ofNullable(remoteCreatedAfter); return this; } @@ -416,7 +416,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -427,7 +427,7 @@ public Builder ticketId(Optional ticketId) { } public Builder ticketId(String ticketId) { - this.ticketId = Optional.of(ticketId); + this.ticketId = Optional.ofNullable(ticketId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsRetrieveRequest.java index 2d5c57875..a403f2974 100644 --- a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/AttachmentsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentsRetrieveRequest.Builder.class) public final class AttachmentsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/TicketingAttachmentEndpointRequest.java b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/TicketingAttachmentEndpointRequest.java index 081dc05ba..9d47a7751 100644 --- a/src/main/java/com/merge/api/resources/ticketing/attachments/requests/TicketingAttachmentEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/attachments/requests/TicketingAttachmentEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketingAttachmentEndpointRequest.Builder.class) public final class TicketingAttachmentEndpointRequest { private final Optional isDebugMode; @@ -92,7 +93,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(AttachmentRequest model); + _FinalStage model(@NotNull AttachmentRequest model); Builder from(TicketingAttachmentEndpointRequest other); } @@ -132,7 +133,7 @@ public Builder from(TicketingAttachmentEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(AttachmentRequest model) { + public _FinalStage model(@NotNull AttachmentRequest model) { this.model = model; return this; } @@ -143,7 +144,7 @@ public _FinalStage model(AttachmentRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -160,7 +161,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/audittrail/AuditTrailClient.java b/src/main/java/com/merge/api/resources/ticketing/audittrail/AuditTrailClient.java index f877534e5..05c1114a1 100644 --- a/src/main/java/com/merge/api/resources/ticketing/audittrail/AuditTrailClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/audittrail/AuditTrailClient.java @@ -68,7 +68,8 @@ public PaginatedAuditLogEventList list(AuditTrailListRequest request, RequestOpt .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/audittrail/requests/AuditTrailListRequest.java b/src/main/java/com/merge/api/resources/ticketing/audittrail/requests/AuditTrailListRequest.java index 06275e8e6..696f09e89 100644 --- a/src/main/java/com/merge/api/resources/ticketing/audittrail/requests/AuditTrailListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/audittrail/requests/AuditTrailListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditTrailListRequest.Builder.class) public final class AuditTrailListRequest { private final Optional cursor; @@ -169,7 +169,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -180,7 +180,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -191,7 +191,7 @@ public Builder eventType(Optional eventType) { } public Builder eventType(String eventType) { - this.eventType = Optional.of(eventType); + this.eventType = Optional.ofNullable(eventType); return this; } @@ -202,7 +202,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -213,7 +213,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -224,7 +224,7 @@ public Builder userEmail(Optional userEmail) { } public Builder userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/availableactions/AvailableActionsClient.java b/src/main/java/com/merge/api/resources/ticketing/availableactions/AvailableActionsClient.java index c9d83d9de..9ce48f8ab 100644 --- a/src/main/java/com/merge/api/resources/ticketing/availableactions/AvailableActionsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/availableactions/AvailableActionsClient.java @@ -44,6 +44,7 @@ public AvailableActions retrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/collections/CollectionsClient.java b/src/main/java/com/merge/api/resources/ticketing/collections/CollectionsClient.java index e76432792..c26fe934d 100644 --- a/src/main/java/com/merge/api/resources/ticketing/collections/CollectionsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/collections/CollectionsClient.java @@ -108,7 +108,8 @@ public PaginatedCollectionList list(CollectionsListRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -129,13 +130,6 @@ public PaginatedCollectionList list(CollectionsListRequest request, RequestOptio } } - /** - * Returns a Collection object with the given id. - */ - public Collection retrieve(String id) { - return retrieve(id, CollectionsRetrieveRequest.builder().build()); - } - /** * Returns a Collection object with the given id. */ @@ -169,7 +163,8 @@ public Collection retrieve(String id, CollectionsRetrieveRequest request, Reques .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsListRequest.java index 47275dd3b..2fe591021 100644 --- a/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CollectionsListRequest.Builder.class) public final class CollectionsListRequest { private final Optional collectionType; @@ -330,7 +330,7 @@ public Builder collectionType(Optional collectionType) { } public Builder collectionType(String collectionType) { - this.collectionType = Optional.of(collectionType); + this.collectionType = Optional.ofNullable(collectionType); return this; } @@ -341,7 +341,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -352,7 +352,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -363,7 +363,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -374,7 +374,7 @@ public Builder expand(Optional expand) { } public Builder expand(CollectionsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -385,7 +385,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -396,7 +396,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -407,7 +407,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -418,7 +418,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -429,7 +429,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -440,7 +440,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -451,7 +451,7 @@ public Builder parentCollectionId(Optional parentCollectionId) { } public Builder parentCollectionId(String parentCollectionId) { - this.parentCollectionId = Optional.of(parentCollectionId); + this.parentCollectionId = Optional.ofNullable(parentCollectionId); return this; } @@ -462,7 +462,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -473,7 +473,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -484,7 +484,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsRetrieveRequest.java index dbe686c08..d55afc21e 100644 --- a/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/collections/requests/CollectionsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CollectionsRetrieveRequest.Builder.class) public final class CollectionsRetrieveRequest { private final Optional expand; @@ -138,7 +138,7 @@ public Builder expand(Optional expand) { } public Builder expand(CollectionsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -149,7 +149,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -160,7 +160,7 @@ public Builder remoteFields(Optional remoteFields) { } public Builder remoteFields(String remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -171,7 +171,7 @@ public Builder showEnumOrigins(Optional showEnumOrigins) { } public Builder showEnumOrigins(String showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/comments/CommentsClient.java b/src/main/java/com/merge/api/resources/ticketing/comments/CommentsClient.java index 9ef5395a6..1238f294e 100644 --- a/src/main/java/com/merge/api/resources/ticketing/comments/CommentsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/comments/CommentsClient.java @@ -108,7 +108,8 @@ public PaginatedCommentList list(CommentsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -163,7 +164,8 @@ public CommentResponse create(CommentEndpointRequest request, RequestOptions req .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -184,13 +186,6 @@ public CommentResponse create(CommentEndpointRequest request, RequestOptions req } } - /** - * Returns a Comment object with the given id. - */ - public Comment retrieve(String id) { - return retrieve(id, CommentsRetrieveRequest.builder().build()); - } - /** * Returns a Comment object with the given id. */ @@ -217,7 +212,8 @@ public Comment retrieve(String id, CommentsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -258,6 +254,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentEndpointRequest.java b/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentEndpointRequest.java index b0f275c19..60d1b498d 100644 --- a/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommentEndpointRequest.Builder.class) public final class CommentEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(CommentRequest model); + _FinalStage model(@NotNull CommentRequest model); Builder from(CommentEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(CommentEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(CommentRequest model) { + public _FinalStage model(@NotNull CommentRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(CommentRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsListRequest.java index 786fe19b2..f6618f46c 100644 --- a/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommentsListRequest.Builder.class) public final class CommentsListRequest { private final Optional createdAfter; @@ -296,7 +296,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -307,7 +307,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -318,7 +318,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -329,7 +329,7 @@ public Builder expand(Optional expand) { } public Builder expand(CommentsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -340,7 +340,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -351,7 +351,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -362,7 +362,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -373,7 +373,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -384,7 +384,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -395,7 +395,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -406,7 +406,7 @@ public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { } public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { - this.remoteCreatedAfter = Optional.of(remoteCreatedAfter); + this.remoteCreatedAfter = Optional.ofNullable(remoteCreatedAfter); return this; } @@ -417,7 +417,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -428,7 +428,7 @@ public Builder ticketId(Optional ticketId) { } public Builder ticketId(String ticketId) { - this.ticketId = Optional.of(ticketId); + this.ticketId = Optional.ofNullable(ticketId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsRetrieveRequest.java index 14b428d9b..5ecf9eebd 100644 --- a/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/comments/requests/CommentsRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommentsRetrieveRequest.Builder.class) public final class CommentsRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(CommentsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/contacts/ContactsClient.java b/src/main/java/com/merge/api/resources/ticketing/contacts/ContactsClient.java index 90a0cd9e8..3b58daa8a 100644 --- a/src/main/java/com/merge/api/resources/ticketing/contacts/ContactsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/contacts/ContactsClient.java @@ -100,7 +100,8 @@ public PaginatedContactList list(ContactsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -155,7 +156,8 @@ public TicketingContactResponse create(TicketingContactEndpointRequest request, .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -176,13 +178,6 @@ public TicketingContactResponse create(TicketingContactEndpointRequest request, } } - /** - * Returns a Contact object with the given id. - */ - public Contact retrieve(String id) { - return retrieve(id, ContactsRetrieveRequest.builder().build()); - } - /** * Returns a Contact object with the given id. */ @@ -209,7 +204,8 @@ public Contact retrieve(String id, ContactsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -250,6 +246,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsListRequest.java index 3d2a7948b..03b185839 100644 --- a/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsListRequest.Builder.class) public final class ContactsListRequest { private final Optional createdAfter; @@ -261,7 +261,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -272,7 +272,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -283,7 +283,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -294,7 +294,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -305,7 +305,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -316,7 +316,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -327,7 +327,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -349,7 +349,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -360,7 +360,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -371,7 +371,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsRetrieveRequest.java index dd24e37ca..a3cdf3db4 100644 --- a/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/contacts/requests/ContactsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactsRetrieveRequest.Builder.class) public final class ContactsRetrieveRequest { private final Optional expand; @@ -102,7 +102,7 @@ public Builder expand(Optional expand) { } public Builder expand(String expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -113,7 +113,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/contacts/requests/TicketingContactEndpointRequest.java b/src/main/java/com/merge/api/resources/ticketing/contacts/requests/TicketingContactEndpointRequest.java index 4d55a8a12..03307a483 100644 --- a/src/main/java/com/merge/api/resources/ticketing/contacts/requests/TicketingContactEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/contacts/requests/TicketingContactEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketingContactEndpointRequest.Builder.class) public final class TicketingContactEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(ContactRequest model); + _FinalStage model(@NotNull ContactRequest model); Builder from(TicketingContactEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(TicketingContactEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(ContactRequest model) { + public _FinalStage model(@NotNull ContactRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(ContactRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/FieldMappingClient.java b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/FieldMappingClient.java index 5f76cbb9c..9cdb2ee2c 100644 --- a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/FieldMappingClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/FieldMappingClient.java @@ -67,7 +67,8 @@ public FieldMappingApiInstanceResponse fieldMappingsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -127,7 +128,8 @@ public FieldMappingInstanceResponse fieldMappingsCreate( .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -169,6 +171,7 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, .method("DELETE", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -189,14 +192,6 @@ public FieldMappingInstanceResponse fieldMappingsDestroy(String fieldMappingId, } } - /** - * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. - */ - public FieldMappingInstanceResponse fieldMappingsPartialUpdate(String fieldMappingId) { - return fieldMappingsPartialUpdate( - fieldMappingId, PatchedEditFieldMappingRequest.builder().build()); - } - /** * Create or update existing Field Mappings for a Linked Account. Changes will be reflected after the next scheduled sync. This will cause the next sync for this Linked Account to sync ALL data from start. */ @@ -227,6 +222,7 @@ public FieldMappingInstanceResponse fieldMappingsPartialUpdate( .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -280,7 +276,8 @@ public RemoteFieldApiResponse remoteFieldsRetrieve( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -321,6 +318,7 @@ public ExternalTargetFieldApiResponse targetFieldsRetrieve(RequestOptions reques .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/CreateFieldMappingRequest.java b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/CreateFieldMappingRequest.java index 54a5a9c64..6429e5b76 100644 --- a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/CreateFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/CreateFieldMappingRequest.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CreateFieldMappingRequest.Builder.class) public final class CreateFieldMappingRequest { private final Optional excludeRemoteFieldMetadata; @@ -157,25 +158,25 @@ public static TargetFieldNameStage builder() { } public interface TargetFieldNameStage { - TargetFieldDescriptionStage targetFieldName(String targetFieldName); + TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName); Builder from(CreateFieldMappingRequest other); } public interface TargetFieldDescriptionStage { - RemoteMethodStage targetFieldDescription(String targetFieldDescription); + RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription); } public interface RemoteMethodStage { - RemoteUrlPathStage remoteMethod(String remoteMethod); + RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod); } public interface RemoteUrlPathStage { - CommonModelNameStage remoteUrlPath(String remoteUrlPath); + CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath); } public interface CommonModelNameStage { - _FinalStage commonModelName(String commonModelName); + _FinalStage commonModelName(@NotNull String commonModelName); } public interface _FinalStage { @@ -237,7 +238,7 @@ public Builder from(CreateFieldMappingRequest other) { */ @java.lang.Override @JsonSetter("target_field_name") - public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { + public TargetFieldDescriptionStage targetFieldName(@NotNull String targetFieldName) { this.targetFieldName = targetFieldName; return this; } @@ -248,7 +249,7 @@ public TargetFieldDescriptionStage targetFieldName(String targetFieldName) { */ @java.lang.Override @JsonSetter("target_field_description") - public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { + public RemoteMethodStage targetFieldDescription(@NotNull String targetFieldDescription) { this.targetFieldDescription = targetFieldDescription; return this; } @@ -259,7 +260,7 @@ public RemoteMethodStage targetFieldDescription(String targetFieldDescription) { */ @java.lang.Override @JsonSetter("remote_method") - public RemoteUrlPathStage remoteMethod(String remoteMethod) { + public RemoteUrlPathStage remoteMethod(@NotNull String remoteMethod) { this.remoteMethod = remoteMethod; return this; } @@ -270,7 +271,7 @@ public RemoteUrlPathStage remoteMethod(String remoteMethod) { */ @java.lang.Override @JsonSetter("remote_url_path") - public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { + public CommonModelNameStage remoteUrlPath(@NotNull String remoteUrlPath) { this.remoteUrlPath = remoteUrlPath; return this; } @@ -281,7 +282,7 @@ public CommonModelNameStage remoteUrlPath(String remoteUrlPath) { */ @java.lang.Override @JsonSetter("common_model_name") - public _FinalStage commonModelName(String commonModelName) { + public _FinalStage commonModelName(@NotNull String commonModelName) { this.commonModelName = commonModelName; return this; } @@ -320,7 +321,7 @@ public _FinalStage remoteFieldTraversalPath(List remoteFieldTraversalP */ @java.lang.Override public _FinalStage excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/FieldMappingsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/FieldMappingsRetrieveRequest.java index 2d274ba0f..a2676bdae 100644 --- a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/FieldMappingsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/FieldMappingsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingsRetrieveRequest.Builder.class) public final class FieldMappingsRetrieveRequest { private final Optional excludeRemoteFieldMetadata; @@ -88,7 +88,7 @@ public Builder excludeRemoteFieldMetadata(Optional excludeRemoteFieldMe } public Builder excludeRemoteFieldMetadata(Boolean excludeRemoteFieldMetadata) { - this.excludeRemoteFieldMetadata = Optional.of(excludeRemoteFieldMetadata); + this.excludeRemoteFieldMetadata = Optional.ofNullable(excludeRemoteFieldMetadata); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/PatchedEditFieldMappingRequest.java b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/PatchedEditFieldMappingRequest.java index bfb41b852..e42c69303 100644 --- a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/PatchedEditFieldMappingRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/PatchedEditFieldMappingRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedEditFieldMappingRequest.Builder.class) public final class PatchedEditFieldMappingRequest { private final Optional> remoteFieldTraversalPath; @@ -123,7 +123,7 @@ public Builder remoteFieldTraversalPath(Optional> remoteFieldTrav } public Builder remoteFieldTraversalPath(List remoteFieldTraversalPath) { - this.remoteFieldTraversalPath = Optional.of(remoteFieldTraversalPath); + this.remoteFieldTraversalPath = Optional.ofNullable(remoteFieldTraversalPath); return this; } @@ -134,7 +134,7 @@ public Builder remoteMethod(Optional remoteMethod) { } public Builder remoteMethod(String remoteMethod) { - this.remoteMethod = Optional.of(remoteMethod); + this.remoteMethod = Optional.ofNullable(remoteMethod); return this; } @@ -145,7 +145,7 @@ public Builder remoteUrlPath(Optional remoteUrlPath) { } public Builder remoteUrlPath(String remoteUrlPath) { - this.remoteUrlPath = Optional.of(remoteUrlPath); + this.remoteUrlPath = Optional.ofNullable(remoteUrlPath); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/RemoteFieldsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/RemoteFieldsRetrieveRequest.java index f8ddf9cf5..63208cafc 100644 --- a/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/RemoteFieldsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/fieldmapping/requests/RemoteFieldsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldsRetrieveRequest.Builder.class) public final class RemoteFieldsRetrieveRequest { private final Optional commonModels; @@ -104,7 +104,7 @@ public Builder commonModels(Optional commonModels) { } public Builder commonModels(String commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -115,7 +115,7 @@ public Builder includeExampleValues(Optional includeExampleValues) { } public Builder includeExampleValues(String includeExampleValues) { - this.includeExampleValues = Optional.of(includeExampleValues); + this.includeExampleValues = Optional.ofNullable(includeExampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/forceresync/ForceResyncClient.java b/src/main/java/com/merge/api/resources/ticketing/forceresync/ForceResyncClient.java index 44fa046b1..c2194e9eb 100644 --- a/src/main/java/com/merge/api/resources/ticketing/forceresync/ForceResyncClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/forceresync/ForceResyncClient.java @@ -47,6 +47,7 @@ public List syncStatusResyncCreate(RequestOptions requestOptions) { .method("POST", RequestBody.create("", null)) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/generatekey/GenerateKeyClient.java b/src/main/java/com/merge/api/resources/ticketing/generatekey/GenerateKeyClient.java index de33f0567..3d9185645 100644 --- a/src/main/java/com/merge/api/resources/ticketing/generatekey/GenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/generatekey/GenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(GenerateRemoteKeyRequest request, RequestOptions request .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/generatekey/requests/GenerateRemoteKeyRequest.java b/src/main/java/com/merge/api/resources/ticketing/generatekey/requests/GenerateRemoteKeyRequest.java index 38a87fed4..d1024d870 100644 --- a/src/main/java/com/merge/api/resources/ticketing/generatekey/requests/GenerateRemoteKeyRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/generatekey/requests/GenerateRemoteKeyRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = GenerateRemoteKeyRequest.Builder.class) public final class GenerateRemoteKeyRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(GenerateRemoteKeyRequest other); } @@ -95,7 +96,7 @@ public Builder from(GenerateRemoteKeyRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/issues/IssuesClient.java b/src/main/java/com/merge/api/resources/ticketing/issues/IssuesClient.java index 174776cae..17931c31c 100644 --- a/src/main/java/com/merge/api/resources/ticketing/issues/IssuesClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/issues/IssuesClient.java @@ -105,7 +105,8 @@ public PaginatedIssueList list(IssuesListRequest request, RequestOptions request .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -147,6 +148,7 @@ public Issue retrieve(String id, RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/issues/requests/IssuesListRequest.java b/src/main/java/com/merge/api/resources/ticketing/issues/requests/IssuesListRequest.java index 966fb4607..323d98156 100644 --- a/src/main/java/com/merge/api/resources/ticketing/issues/requests/IssuesListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/issues/requests/IssuesListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IssuesListRequest.Builder.class) public final class IssuesListRequest { private final Optional accountToken; @@ -308,7 +308,7 @@ public Builder accountToken(Optional accountToken) { } public Builder accountToken(String accountToken) { - this.accountToken = Optional.of(accountToken); + this.accountToken = Optional.ofNullable(accountToken); return this; } @@ -319,7 +319,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -330,7 +330,7 @@ public Builder endDate(Optional endDate) { } public Builder endDate(String endDate) { - this.endDate = Optional.of(endDate); + this.endDate = Optional.ofNullable(endDate); return this; } @@ -341,7 +341,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -352,7 +352,7 @@ public Builder firstIncidentTimeAfter(Optional firstIncidentTime } public Builder firstIncidentTimeAfter(OffsetDateTime firstIncidentTimeAfter) { - this.firstIncidentTimeAfter = Optional.of(firstIncidentTimeAfter); + this.firstIncidentTimeAfter = Optional.ofNullable(firstIncidentTimeAfter); return this; } @@ -363,7 +363,7 @@ public Builder firstIncidentTimeBefore(Optional firstIncidentTim } public Builder firstIncidentTimeBefore(OffsetDateTime firstIncidentTimeBefore) { - this.firstIncidentTimeBefore = Optional.of(firstIncidentTimeBefore); + this.firstIncidentTimeBefore = Optional.ofNullable(firstIncidentTimeBefore); return this; } @@ -374,7 +374,7 @@ public Builder includeMuted(Optional includeMuted) { } public Builder includeMuted(String includeMuted) { - this.includeMuted = Optional.of(includeMuted); + this.includeMuted = Optional.ofNullable(includeMuted); return this; } @@ -385,7 +385,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -396,7 +396,7 @@ public Builder lastIncidentTimeAfter(Optional lastIncidentTimeAf } public Builder lastIncidentTimeAfter(OffsetDateTime lastIncidentTimeAfter) { - this.lastIncidentTimeAfter = Optional.of(lastIncidentTimeAfter); + this.lastIncidentTimeAfter = Optional.ofNullable(lastIncidentTimeAfter); return this; } @@ -407,7 +407,7 @@ public Builder lastIncidentTimeBefore(Optional lastIncidentTimeB } public Builder lastIncidentTimeBefore(OffsetDateTime lastIncidentTimeBefore) { - this.lastIncidentTimeBefore = Optional.of(lastIncidentTimeBefore); + this.lastIncidentTimeBefore = Optional.ofNullable(lastIncidentTimeBefore); return this; } @@ -418,7 +418,7 @@ public Builder linkedAccountId(Optional linkedAccountId) { } public Builder linkedAccountId(String linkedAccountId) { - this.linkedAccountId = Optional.of(linkedAccountId); + this.linkedAccountId = Optional.ofNullable(linkedAccountId); return this; } @@ -429,7 +429,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -440,7 +440,7 @@ public Builder startDate(Optional startDate) { } public Builder startDate(String startDate) { - this.startDate = Optional.of(startDate); + this.startDate = Optional.ofNullable(startDate); return this; } @@ -451,7 +451,7 @@ public Builder status(Optional status) { } public Builder status(IssuesListRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/LinkedAccountsClient.java b/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/LinkedAccountsClient.java index 38a19b0d7..cd5e77193 100644 --- a/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/LinkedAccountsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/LinkedAccountsClient.java @@ -98,7 +98,8 @@ public PaginatedAccountDetailsAndActionsList list( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/requests/LinkedAccountsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/requests/LinkedAccountsListRequest.java index 9705ae44d..4f75cf305 100644 --- a/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/requests/LinkedAccountsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/linkedaccounts/requests/LinkedAccountsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountsListRequest.Builder.class) public final class LinkedAccountsListRequest { private final Optional category; @@ -301,7 +301,7 @@ public Builder category(Optional category) { } public Builder category(LinkedAccountsListRequestCategory category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -312,7 +312,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -323,7 +323,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -334,7 +334,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -345,7 +345,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -356,7 +356,7 @@ public Builder endUserOriginIds(Optional endUserOriginIds) { } public Builder endUserOriginIds(String endUserOriginIds) { - this.endUserOriginIds = Optional.of(endUserOriginIds); + this.endUserOriginIds = Optional.ofNullable(endUserOriginIds); return this; } @@ -367,7 +367,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -378,7 +378,7 @@ public Builder ids(Optional ids) { } public Builder ids(String ids) { - this.ids = Optional.of(ids); + this.ids = Optional.ofNullable(ids); return this; } @@ -389,7 +389,7 @@ public Builder includeDuplicates(Optional includeDuplicates) { } public Builder includeDuplicates(Boolean includeDuplicates) { - this.includeDuplicates = Optional.of(includeDuplicates); + this.includeDuplicates = Optional.ofNullable(includeDuplicates); return this; } @@ -400,7 +400,7 @@ public Builder integrationName(Optional integrationName) { } public Builder integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } @@ -411,7 +411,7 @@ public Builder isTestAccount(Optional isTestAccount) { } public Builder isTestAccount(String isTestAccount) { - this.isTestAccount = Optional.of(isTestAccount); + this.isTestAccount = Optional.ofNullable(isTestAccount); return this; } @@ -422,7 +422,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -433,7 +433,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/linktoken/LinkTokenClient.java b/src/main/java/com/merge/api/resources/ticketing/linktoken/LinkTokenClient.java index 3a1e38783..b8c8c7949 100644 --- a/src/main/java/com/merge/api/resources/ticketing/linktoken/LinkTokenClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/linktoken/LinkTokenClient.java @@ -55,6 +55,7 @@ public LinkToken create(EndUserDetailsRequest request, RequestOptions requestOpt .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/linktoken/requests/EndUserDetailsRequest.java b/src/main/java/com/merge/api/resources/ticketing/linktoken/requests/EndUserDetailsRequest.java index d59f078ea..9a5f1a332 100644 --- a/src/main/java/com/merge/api/resources/ticketing/linktoken/requests/EndUserDetailsRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/linktoken/requests/EndUserDetailsRequest.java @@ -23,8 +23,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = EndUserDetailsRequest.Builder.class) public final class EndUserDetailsRequest { private final String endUserEmailAddress; @@ -252,17 +253,17 @@ public static EndUserEmailAddressStage builder() { } public interface EndUserEmailAddressStage { - EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress); + EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress); Builder from(EndUserDetailsRequest other); } public interface EndUserOrganizationNameStage { - EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName); + EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserOriginIdStage { - _FinalStage endUserOriginId(String endUserOriginId); + _FinalStage endUserOriginId(@NotNull String endUserOriginId); } public interface _FinalStage { @@ -373,7 +374,7 @@ public Builder from(EndUserDetailsRequest other) { */ @java.lang.Override @JsonSetter("end_user_email_address") - public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddress) { + public EndUserOrganizationNameStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @@ -384,7 +385,7 @@ public EndUserOrganizationNameStage endUserEmailAddress(String endUserEmailAddre */ @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserOriginIdStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @@ -395,7 +396,7 @@ public EndUserOriginIdStage endUserOrganizationName(String endUserOrganizationNa */ @java.lang.Override @JsonSetter("end_user_origin_id") - public _FinalStage endUserOriginId(String endUserOriginId) { + public _FinalStage endUserOriginId(@NotNull String endUserOriginId) { this.endUserOriginId = endUserOriginId; return this; } @@ -406,7 +407,7 @@ public _FinalStage endUserOriginId(String endUserOriginId) { */ @java.lang.Override public _FinalStage integrationSpecificConfig(Map integrationSpecificConfig) { - this.integrationSpecificConfig = Optional.of(integrationSpecificConfig); + this.integrationSpecificConfig = Optional.ofNullable(integrationSpecificConfig); return this; } @@ -423,7 +424,7 @@ public _FinalStage integrationSpecificConfig(Optional> int */ @java.lang.Override public _FinalStage areSyncsDisabled(Boolean areSyncsDisabled) { - this.areSyncsDisabled = Optional.of(areSyncsDisabled); + this.areSyncsDisabled = Optional.ofNullable(areSyncsDisabled); return this; } @@ -444,7 +445,7 @@ public _FinalStage areSyncsDisabled(Optional areSyncsDisabled) { */ @java.lang.Override public _FinalStage language(LanguageEnum language) { - this.language = Optional.of(language); + this.language = Optional.ofNullable(language); return this; } @@ -462,7 +463,7 @@ public _FinalStage language(Optional language) { @java.lang.Override public _FinalStage categoryCommonModelScopes( Map>> categoryCommonModelScopes) { - this.categoryCommonModelScopes = Optional.of(categoryCommonModelScopes); + this.categoryCommonModelScopes = Optional.ofNullable(categoryCommonModelScopes); return this; } @@ -481,7 +482,7 @@ public _FinalStage categoryCommonModelScopes( */ @java.lang.Override public _FinalStage commonModels(List commonModels) { - this.commonModels = Optional.of(commonModels); + this.commonModels = Optional.ofNullable(commonModels); return this; } @@ -498,7 +499,7 @@ public _FinalStage commonModels(Optional> com */ @java.lang.Override public _FinalStage hideAdminMagicLink(Boolean hideAdminMagicLink) { - this.hideAdminMagicLink = Optional.of(hideAdminMagicLink); + this.hideAdminMagicLink = Optional.ofNullable(hideAdminMagicLink); return this; } @@ -515,7 +516,7 @@ public _FinalStage hideAdminMagicLink(Optional hideAdminMagicLink) { */ @java.lang.Override public _FinalStage shouldCreateMagicLinkUrl(Boolean shouldCreateMagicLinkUrl) { - this.shouldCreateMagicLinkUrl = Optional.of(shouldCreateMagicLinkUrl); + this.shouldCreateMagicLinkUrl = Optional.ofNullable(shouldCreateMagicLinkUrl); return this; } @@ -532,7 +533,7 @@ public _FinalStage shouldCreateMagicLinkUrl(Optional shouldCreateMagicL */ @java.lang.Override public _FinalStage linkExpiryMins(Integer linkExpiryMins) { - this.linkExpiryMins = Optional.of(linkExpiryMins); + this.linkExpiryMins = Optional.ofNullable(linkExpiryMins); return this; } @@ -549,7 +550,7 @@ public _FinalStage linkExpiryMins(Optional linkExpiryMins) { */ @java.lang.Override public _FinalStage integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/projects/ProjectsClient.java b/src/main/java/com/merge/api/resources/ticketing/projects/ProjectsClient.java index 476f1c9c3..e16b6de45 100644 --- a/src/main/java/com/merge/api/resources/ticketing/projects/ProjectsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/projects/ProjectsClient.java @@ -92,7 +92,8 @@ public PaginatedProjectList list(ProjectsListRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -113,13 +114,6 @@ public PaginatedProjectList list(ProjectsListRequest request, RequestOptions req } } - /** - * Returns a Project object with the given id. - */ - public Project retrieve(String id) { - return retrieve(id, ProjectsRetrieveRequest.builder().build()); - } - /** * Returns a Project object with the given id. */ @@ -143,7 +137,8 @@ public Project retrieve(String id, ProjectsRetrieveRequest request, RequestOptio .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -164,13 +159,6 @@ public Project retrieve(String id, ProjectsRetrieveRequest request, RequestOptio } } - /** - * Returns a list of User objects. - */ - public PaginatedUserList usersList(String parentId) { - return usersList(parentId, ProjectsUsersListRequest.builder().build()); - } - /** * Returns a list of User objects. */ @@ -214,7 +202,8 @@ public PaginatedUserList usersList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsListRequest.java index ddd8a0e65..8a1adb53d 100644 --- a/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ProjectsListRequest.Builder.class) public final class ProjectsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsRetrieveRequest.java index 25bc48d8b..7fb18c7dc 100644 --- a/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ProjectsRetrieveRequest.Builder.class) public final class ProjectsRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsUsersListRequest.java b/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsUsersListRequest.java index b417a4e83..5e9a433e7 100644 --- a/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsUsersListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/projects/requests/ProjectsUsersListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ProjectsUsersListRequest.Builder.class) public final class ProjectsUsersListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder expand(Optional expand) { } public Builder expand(ProjectsUsersListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -198,7 +198,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -209,7 +209,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -220,7 +220,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/regeneratekey/RegenerateKeyClient.java b/src/main/java/com/merge/api/resources/ticketing/regeneratekey/RegenerateKeyClient.java index f27638a09..e8cf0c19c 100644 --- a/src/main/java/com/merge/api/resources/ticketing/regeneratekey/RegenerateKeyClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/regeneratekey/RegenerateKeyClient.java @@ -55,6 +55,7 @@ public RemoteKey create(RemoteKeyForRegenerationRequest request, RequestOptions .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/regeneratekey/requests/RemoteKeyForRegenerationRequest.java b/src/main/java/com/merge/api/resources/ticketing/regeneratekey/requests/RemoteKeyForRegenerationRequest.java index 92044393e..d27604c47 100644 --- a/src/main/java/com/merge/api/resources/ticketing/regeneratekey/requests/RemoteKeyForRegenerationRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/regeneratekey/requests/RemoteKeyForRegenerationRequest.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKeyForRegenerationRequest.Builder.class) public final class RemoteKeyForRegenerationRequest { private final String name; @@ -65,7 +66,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(RemoteKeyForRegenerationRequest other); } @@ -95,7 +96,7 @@ public Builder from(RemoteKeyForRegenerationRequest other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/roles/RolesClient.java b/src/main/java/com/merge/api/resources/ticketing/roles/RolesClient.java index 7c3edb8f3..ef213e5e5 100644 --- a/src/main/java/com/merge/api/resources/ticketing/roles/RolesClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/roles/RolesClient.java @@ -90,7 +90,8 @@ public PaginatedRoleList list(RolesListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedRoleList list(RolesListRequest request, RequestOptions requestOp } } - /** - * Returns a Role object with the given id. - */ - public Role retrieve(String id) { - return retrieve(id, RolesRetrieveRequest.builder().build()); - } - /** * Returns a Role object with the given id. */ @@ -141,7 +135,8 @@ public Role retrieve(String id, RolesRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesListRequest.java b/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesListRequest.java index 0735b9a60..39ac7f035 100644 --- a/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RolesListRequest.Builder.class) public final class RolesListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesRetrieveRequest.java index bc8615f30..b1cd109aa 100644 --- a/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/roles/requests/RolesRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RolesRetrieveRequest.Builder.class) public final class RolesRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/scopes/ScopesClient.java b/src/main/java/com/merge/api/resources/ticketing/scopes/ScopesClient.java index a058837b8..48fed55ea 100644 --- a/src/main/java/com/merge/api/resources/ticketing/scopes/ScopesClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/scopes/ScopesClient.java @@ -48,6 +48,7 @@ public CommonModelScopeApi defaultScopesRetrieve(RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -88,6 +89,7 @@ public CommonModelScopeApi linkedAccountScopesRetrieve(RequestOptions requestOpt .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -136,6 +138,7 @@ public CommonModelScopeApi linkedAccountScopesCreate( .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/ticketing/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java index bcd10d0c9..5c4fd2901 100644 --- a/src/main/java/com/merge/api/resources/ticketing/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/scopes/requests/LinkedAccountCommonModelScopeDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountCommonModelScopeDeserializerRequest.Builder.class) public final class LinkedAccountCommonModelScopeDeserializerRequest { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/ticketing/syncstatus/SyncStatusClient.java b/src/main/java/com/merge/api/resources/ticketing/syncstatus/SyncStatusClient.java index 71041c9ea..bdfb8a655 100644 --- a/src/main/java/com/merge/api/resources/ticketing/syncstatus/SyncStatusClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/syncstatus/SyncStatusClient.java @@ -56,7 +56,8 @@ public PaginatedSyncStatusList list(SyncStatusListRequest request, RequestOption .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/syncstatus/requests/SyncStatusListRequest.java b/src/main/java/com/merge/api/resources/ticketing/syncstatus/requests/SyncStatusListRequest.java index 62197a036..33bc3a5cf 100644 --- a/src/main/java/com/merge/api/resources/ticketing/syncstatus/requests/SyncStatusListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/syncstatus/requests/SyncStatusListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatusListRequest.Builder.class) public final class SyncStatusListRequest { private final Optional cursor; @@ -102,7 +102,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -113,7 +113,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tags/TagsClient.java b/src/main/java/com/merge/api/resources/ticketing/tags/TagsClient.java index 575b8e7de..8a6c986aa 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tags/TagsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/tags/TagsClient.java @@ -90,7 +90,8 @@ public PaginatedTagList list(TagsListRequest request, RequestOptions requestOpti .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedTagList list(TagsListRequest request, RequestOptions requestOpti } } - /** - * Returns a Tag object with the given id. - */ - public Tag retrieve(String id) { - return retrieve(id, TagsRetrieveRequest.builder().build()); - } - /** * Returns a Tag object with the given id. */ @@ -141,7 +135,8 @@ public Tag retrieve(String id, TagsRetrieveRequest request, RequestOptions reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsListRequest.java index d8392e396..32785bc78 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TagsListRequest.Builder.class) public final class TagsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsRetrieveRequest.java index deb60200d..8b74e7c55 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tags/requests/TagsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TagsRetrieveRequest.Builder.class) public final class TagsRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/teams/TeamsClient.java b/src/main/java/com/merge/api/resources/ticketing/teams/TeamsClient.java index 1ea1505d1..73e895774 100644 --- a/src/main/java/com/merge/api/resources/ticketing/teams/TeamsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/teams/TeamsClient.java @@ -90,7 +90,8 @@ public PaginatedTeamList list(TeamsListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -111,13 +112,6 @@ public PaginatedTeamList list(TeamsListRequest request, RequestOptions requestOp } } - /** - * Returns a Team object with the given id. - */ - public Team retrieve(String id) { - return retrieve(id, TeamsRetrieveRequest.builder().build()); - } - /** * Returns a Team object with the given id. */ @@ -141,7 +135,8 @@ public Team retrieve(String id, TeamsRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsListRequest.java index 169152b45..563112ad2 100644 --- a/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TeamsListRequest.Builder.class) public final class TeamsListRequest { private final Optional createdAfter; @@ -244,7 +244,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -255,7 +255,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -266,7 +266,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -277,7 +277,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -288,7 +288,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -299,7 +299,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -310,7 +310,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -321,7 +321,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -332,7 +332,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -343,7 +343,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsRetrieveRequest.java index 2fcef4732..466b6fb63 100644 --- a/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/teams/requests/TeamsRetrieveRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TeamsRetrieveRequest.Builder.class) public final class TeamsRetrieveRequest { private final Optional includeRemoteData; @@ -87,7 +87,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tickets/TicketsClient.java b/src/main/java/com/merge/api/resources/ticketing/tickets/TicketsClient.java index af44ecfce..ddf7ead76 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tickets/TicketsClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/tickets/TicketsClient.java @@ -184,7 +184,8 @@ public PaginatedTicketList list(TicketsListRequest request, RequestOptions reque .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -239,7 +240,8 @@ public TicketResponse create(TicketEndpointRequest request, RequestOptions reque .url(httpUrl.build()) .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -260,13 +262,6 @@ public TicketResponse create(TicketEndpointRequest request, RequestOptions reque } } - /** - * Returns a Ticket object with the given id. - */ - public Ticket retrieve(String id) { - return retrieve(id, TicketsRetrieveRequest.builder().build()); - } - /** * Returns a Ticket object with the given id. */ @@ -306,7 +301,8 @@ public Ticket retrieve(String id, TicketsRetrieveRequest request, RequestOptions .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -363,7 +359,8 @@ public TicketResponse partialUpdate( .url(httpUrl.build()) .method("PATCH", body) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -384,13 +381,6 @@ public TicketResponse partialUpdate( } } - /** - * Returns a list of Viewer objects. - */ - public PaginatedViewerList viewersList(String ticketId) { - return viewersList(ticketId, TicketsViewersListRequest.builder().build()); - } - /** * Returns a list of Viewer objects. */ @@ -434,7 +424,8 @@ public PaginatedViewerList viewersList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -476,6 +467,7 @@ public MetaResponse metaPatchRetrieve(String id, RequestOptions requestOptions) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -516,6 +508,7 @@ public MetaResponse metaPostRetrieve(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -587,7 +580,8 @@ public PaginatedRemoteFieldClassList remoteFieldClassesList( .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/PatchedTicketEndpointRequest.java b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/PatchedTicketEndpointRequest.java index 18f211cee..df7fa2a06 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/PatchedTicketEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/PatchedTicketEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedTicketEndpointRequest.Builder.class) public final class PatchedTicketEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(PatchedTicketRequest model); + _FinalStage model(@NotNull PatchedTicketRequest model); Builder from(PatchedTicketEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(PatchedTicketEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(PatchedTicketRequest model) { + public _FinalStage model(@NotNull PatchedTicketRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(PatchedTicketRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketEndpointRequest.java b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketEndpointRequest.java index ed0d70bb1..a32538680 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketEndpointRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketEndpointRequest.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketEndpointRequest.Builder.class) public final class TicketEndpointRequest { private final Optional isDebugMode; @@ -91,7 +92,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(TicketRequest model); + _FinalStage model(@NotNull TicketRequest model); Builder from(TicketEndpointRequest other); } @@ -131,7 +132,7 @@ public Builder from(TicketEndpointRequest other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(TicketRequest model) { + public _FinalStage model(@NotNull TicketRequest model) { this.model = model; return this; } @@ -142,7 +143,7 @@ public _FinalStage model(TicketRequest model) { */ @java.lang.Override public _FinalStage runAsync(Boolean runAsync) { - this.runAsync = Optional.of(runAsync); + this.runAsync = Optional.ofNullable(runAsync); return this; } @@ -159,7 +160,7 @@ public _FinalStage runAsync(Optional runAsync) { */ @java.lang.Override public _FinalStage isDebugMode(Boolean isDebugMode) { - this.isDebugMode = Optional.of(isDebugMode); + this.isDebugMode = Optional.ofNullable(isDebugMode); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsListRequest.java b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsListRequest.java index 3d9754cbd..19d2d8a05 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsListRequest.java @@ -22,7 +22,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketsListRequest.Builder.class) public final class TicketsListRequest { private final Optional accountId; @@ -628,7 +628,7 @@ public Builder accountId(Optional accountId) { } public Builder accountId(String accountId) { - this.accountId = Optional.of(accountId); + this.accountId = Optional.ofNullable(accountId); return this; } @@ -639,7 +639,7 @@ public Builder assigneeIds(Optional assigneeIds) { } public Builder assigneeIds(String assigneeIds) { - this.assigneeIds = Optional.of(assigneeIds); + this.assigneeIds = Optional.ofNullable(assigneeIds); return this; } @@ -650,7 +650,7 @@ public Builder collectionIds(Optional collectionIds) { } public Builder collectionIds(String collectionIds) { - this.collectionIds = Optional.of(collectionIds); + this.collectionIds = Optional.ofNullable(collectionIds); return this; } @@ -661,7 +661,7 @@ public Builder completedAfter(Optional completedAfter) { } public Builder completedAfter(OffsetDateTime completedAfter) { - this.completedAfter = Optional.of(completedAfter); + this.completedAfter = Optional.ofNullable(completedAfter); return this; } @@ -672,7 +672,7 @@ public Builder completedBefore(Optional completedBefore) { } public Builder completedBefore(OffsetDateTime completedBefore) { - this.completedBefore = Optional.of(completedBefore); + this.completedBefore = Optional.ofNullable(completedBefore); return this; } @@ -683,7 +683,7 @@ public Builder contactId(Optional contactId) { } public Builder contactId(String contactId) { - this.contactId = Optional.of(contactId); + this.contactId = Optional.ofNullable(contactId); return this; } @@ -694,7 +694,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -705,7 +705,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -716,7 +716,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -727,7 +727,7 @@ public Builder dueAfter(Optional dueAfter) { } public Builder dueAfter(OffsetDateTime dueAfter) { - this.dueAfter = Optional.of(dueAfter); + this.dueAfter = Optional.ofNullable(dueAfter); return this; } @@ -738,7 +738,7 @@ public Builder dueBefore(Optional dueBefore) { } public Builder dueBefore(OffsetDateTime dueBefore) { - this.dueBefore = Optional.of(dueBefore); + this.dueBefore = Optional.ofNullable(dueBefore); return this; } @@ -749,7 +749,7 @@ public Builder expand(Optional expand) { } public Builder expand(TicketsListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -760,7 +760,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -771,7 +771,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -782,7 +782,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -793,7 +793,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -804,7 +804,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -815,7 +815,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -826,7 +826,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -837,7 +837,7 @@ public Builder parentTicketId(Optional parentTicketId) { } public Builder parentTicketId(String parentTicketId) { - this.parentTicketId = Optional.of(parentTicketId); + this.parentTicketId = Optional.ofNullable(parentTicketId); return this; } @@ -848,7 +848,7 @@ public Builder priority(Optional priority) { } public Builder priority(TicketsListRequestPriority priority) { - this.priority = Optional.of(priority); + this.priority = Optional.ofNullable(priority); return this; } @@ -859,7 +859,7 @@ public Builder remoteCreatedAfter(Optional remoteCreatedAfter) { } public Builder remoteCreatedAfter(OffsetDateTime remoteCreatedAfter) { - this.remoteCreatedAfter = Optional.of(remoteCreatedAfter); + this.remoteCreatedAfter = Optional.ofNullable(remoteCreatedAfter); return this; } @@ -870,7 +870,7 @@ public Builder remoteCreatedBefore(Optional remoteCreatedBefore) } public Builder remoteCreatedBefore(OffsetDateTime remoteCreatedBefore) { - this.remoteCreatedBefore = Optional.of(remoteCreatedBefore); + this.remoteCreatedBefore = Optional.ofNullable(remoteCreatedBefore); return this; } @@ -881,7 +881,7 @@ public Builder remoteFields(Optional remoteField } public Builder remoteFields(TicketsListRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -892,7 +892,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -903,7 +903,7 @@ public Builder remoteUpdatedAfter(Optional remoteUpdatedAfter) { } public Builder remoteUpdatedAfter(OffsetDateTime remoteUpdatedAfter) { - this.remoteUpdatedAfter = Optional.of(remoteUpdatedAfter); + this.remoteUpdatedAfter = Optional.ofNullable(remoteUpdatedAfter); return this; } @@ -914,7 +914,7 @@ public Builder remoteUpdatedBefore(Optional remoteUpdatedBefore) } public Builder remoteUpdatedBefore(OffsetDateTime remoteUpdatedBefore) { - this.remoteUpdatedBefore = Optional.of(remoteUpdatedBefore); + this.remoteUpdatedBefore = Optional.ofNullable(remoteUpdatedBefore); return this; } @@ -925,7 +925,7 @@ public Builder showEnumOrigins(Optional showE } public Builder showEnumOrigins(TicketsListRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } @@ -936,7 +936,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -947,7 +947,7 @@ public Builder tags(Optional tags) { } public Builder tags(String tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } @@ -958,7 +958,7 @@ public Builder ticketType(Optional ticketType) { } public Builder ticketType(String ticketType) { - this.ticketType = Optional.of(ticketType); + this.ticketType = Optional.ofNullable(ticketType); return this; } @@ -969,7 +969,7 @@ public Builder ticketUrl(Optional ticketUrl) { } public Builder ticketUrl(String ticketUrl) { - this.ticketUrl = Optional.of(ticketUrl); + this.ticketUrl = Optional.ofNullable(ticketUrl); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRemoteFieldClassesListRequest.java b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRemoteFieldClassesListRequest.java index f6042b871..b9c1165fb 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRemoteFieldClassesListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRemoteFieldClassesListRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketsRemoteFieldClassesListRequest.Builder.class) public final class TicketsRemoteFieldClassesListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -198,7 +198,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -209,7 +209,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -220,7 +220,7 @@ public Builder isCommonModelField(Optional isCommonModelField) { } public Builder isCommonModelField(Boolean isCommonModelField) { - this.isCommonModelField = Optional.of(isCommonModelField); + this.isCommonModelField = Optional.ofNullable(isCommonModelField); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRetrieveRequest.java index cb1c215c0..d2f358ea3 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsRetrieveRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketsRetrieveRequest.Builder.class) public final class TicketsRetrieveRequest { private final Optional expand; @@ -157,7 +157,7 @@ public Builder expand(Optional expand) { } public Builder expand(TicketsRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -168,7 +168,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -179,7 +179,7 @@ public Builder includeRemoteFields(Optional includeRemoteFields) { } public Builder includeRemoteFields(Boolean includeRemoteFields) { - this.includeRemoteFields = Optional.of(includeRemoteFields); + this.includeRemoteFields = Optional.ofNullable(includeRemoteFields); return this; } @@ -190,7 +190,7 @@ public Builder remoteFields(Optional remoteF } public Builder remoteFields(TicketsRetrieveRequestRemoteFields remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } @@ -201,7 +201,7 @@ public Builder showEnumOrigins(Optional s } public Builder showEnumOrigins(TicketsRetrieveRequestShowEnumOrigins showEnumOrigins) { - this.showEnumOrigins = Optional.of(showEnumOrigins); + this.showEnumOrigins = Optional.ofNullable(showEnumOrigins); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsViewersListRequest.java b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsViewersListRequest.java index 2e5b096e2..50e6f5c63 100644 --- a/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsViewersListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/tickets/requests/TicketsViewersListRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketsViewersListRequest.Builder.class) public final class TicketsViewersListRequest { private final Optional cursor; @@ -176,7 +176,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -187,7 +187,7 @@ public Builder expand(Optional expand) { } public Builder expand(TicketsViewersListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -198,7 +198,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -209,7 +209,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -220,7 +220,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -231,7 +231,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Account.java b/src/main/java/com/merge/api/resources/ticketing/types/Account.java index 392fd10d4..3e6c5631a 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Account.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Account.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Account.Builder.class) public final class Account { private final Optional id; @@ -220,7 +220,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -231,7 +231,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -242,7 +242,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -253,7 +253,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -264,7 +264,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -275,7 +275,7 @@ public Builder domains(Optional>> domains) { } public Builder domains(List> domains) { - this.domains = Optional.of(domains); + this.domains = Optional.ofNullable(domains); return this; } @@ -286,7 +286,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -297,7 +297,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -308,7 +308,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AccountDetails.java b/src/main/java/com/merge/api/resources/ticketing/types/AccountDetails.java index 80a7450ec..9e71de3cc 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AccountDetails.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AccountDetails.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetails.Builder.class) public final class AccountDetails { private final Optional id; @@ -248,7 +248,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -259,7 +259,7 @@ public Builder integration(Optional integration) { } public Builder integration(String integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -270,7 +270,7 @@ public Builder integrationSlug(Optional integrationSlug) { } public Builder integrationSlug(String integrationSlug) { - this.integrationSlug = Optional.of(integrationSlug); + this.integrationSlug = Optional.ofNullable(integrationSlug); return this; } @@ -281,7 +281,7 @@ public Builder category(Optional category) { } public Builder category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } @@ -292,7 +292,7 @@ public Builder endUserOriginId(Optional endUserOriginId) { } public Builder endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -303,7 +303,7 @@ public Builder endUserOrganizationName(Optional endUserOrganizationName) } public Builder endUserOrganizationName(String endUserOrganizationName) { - this.endUserOrganizationName = Optional.of(endUserOrganizationName); + this.endUserOrganizationName = Optional.ofNullable(endUserOrganizationName); return this; } @@ -314,7 +314,7 @@ public Builder endUserEmailAddress(Optional endUserEmailAddress) { } public Builder endUserEmailAddress(String endUserEmailAddress) { - this.endUserEmailAddress = Optional.of(endUserEmailAddress); + this.endUserEmailAddress = Optional.ofNullable(endUserEmailAddress); return this; } @@ -325,7 +325,7 @@ public Builder status(Optional status) { } public Builder status(String status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -336,7 +336,7 @@ public Builder webhookListenerUrl(Optional webhookListenerUrl) { } public Builder webhookListenerUrl(String webhookListenerUrl) { - this.webhookListenerUrl = Optional.of(webhookListenerUrl); + this.webhookListenerUrl = Optional.ofNullable(webhookListenerUrl); return this; } @@ -347,7 +347,7 @@ public Builder isDuplicate(Optional isDuplicate) { } public Builder isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -358,7 +358,7 @@ public Builder accountType(Optional accountType) { } public Builder accountType(String accountType) { - this.accountType = Optional.of(accountType); + this.accountType = Optional.ofNullable(accountType); return this; } @@ -369,7 +369,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActions.java b/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActions.java index ccf06dc8e..ac67f3597 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActions.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActions.Builder.class) public final class AccountDetailsAndActions { private final String id; @@ -206,33 +207,33 @@ public static IdStage builder() { } public interface IdStage { - StatusStage id(String id); + StatusStage id(@NotNull String id); Builder from(AccountDetailsAndActions other); } public interface StatusStage { - EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status); + EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status); } public interface EndUserOrganizationNameStage { - EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName); + EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName); } public interface EndUserEmailAddressStage { - WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress); + WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress); } public interface WebhookListenerUrlStage { - AccountTypeStage webhookListenerUrl(String webhookListenerUrl); + AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl); } public interface AccountTypeStage { - CompletedAtStage accountType(String accountType); + CompletedAtStage accountType(@NotNull String accountType); } public interface CompletedAtStage { - _FinalStage completedAt(OffsetDateTime completedAt); + _FinalStage completedAt(@NotNull OffsetDateTime completedAt); } public interface _FinalStage { @@ -324,56 +325,56 @@ public Builder from(AccountDetailsAndActions other) { @java.lang.Override @JsonSetter("id") - public StatusStage id(String id) { + public StatusStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override @JsonSetter("status") - public EndUserOrganizationNameStage status(AccountDetailsAndActionsStatusEnum status) { + public EndUserOrganizationNameStage status(@NotNull AccountDetailsAndActionsStatusEnum status) { this.status = status; return this; } @java.lang.Override @JsonSetter("end_user_organization_name") - public EndUserEmailAddressStage endUserOrganizationName(String endUserOrganizationName) { + public EndUserEmailAddressStage endUserOrganizationName(@NotNull String endUserOrganizationName) { this.endUserOrganizationName = endUserOrganizationName; return this; } @java.lang.Override @JsonSetter("end_user_email_address") - public WebhookListenerUrlStage endUserEmailAddress(String endUserEmailAddress) { + public WebhookListenerUrlStage endUserEmailAddress(@NotNull String endUserEmailAddress) { this.endUserEmailAddress = endUserEmailAddress; return this; } @java.lang.Override @JsonSetter("webhook_listener_url") - public AccountTypeStage webhookListenerUrl(String webhookListenerUrl) { + public AccountTypeStage webhookListenerUrl(@NotNull String webhookListenerUrl) { this.webhookListenerUrl = webhookListenerUrl; return this; } @java.lang.Override @JsonSetter("account_type") - public CompletedAtStage accountType(String accountType) { + public CompletedAtStage accountType(@NotNull String accountType) { this.accountType = accountType; return this; } @java.lang.Override @JsonSetter("completed_at") - public _FinalStage completedAt(OffsetDateTime completedAt) { + public _FinalStage completedAt(@NotNull OffsetDateTime completedAt) { this.completedAt = completedAt; return this; } @java.lang.Override public _FinalStage integration(AccountDetailsAndActionsIntegration integration) { - this.integration = Optional.of(integration); + this.integration = Optional.ofNullable(integration); return this; } @@ -390,7 +391,7 @@ public _FinalStage integration(Optional int */ @java.lang.Override public _FinalStage isDuplicate(Boolean isDuplicate) { - this.isDuplicate = Optional.of(isDuplicate); + this.isDuplicate = Optional.ofNullable(isDuplicate); return this; } @@ -407,7 +408,7 @@ public _FinalStage isDuplicate(Optional isDuplicate) { */ @java.lang.Override public _FinalStage subdomain(String subdomain) { - this.subdomain = Optional.of(subdomain); + this.subdomain = Optional.ofNullable(subdomain); return this; } @@ -420,7 +421,7 @@ public _FinalStage subdomain(Optional subdomain) { @java.lang.Override public _FinalStage endUserOriginId(String endUserOriginId) { - this.endUserOriginId = Optional.of(endUserOriginId); + this.endUserOriginId = Optional.ofNullable(endUserOriginId); return this; } @@ -433,7 +434,7 @@ public _FinalStage endUserOriginId(Optional endUserOriginId) { @java.lang.Override public _FinalStage statusDetail(String statusDetail) { - this.statusDetail = Optional.of(statusDetail); + this.statusDetail = Optional.ofNullable(statusDetail); return this; } @@ -446,7 +447,7 @@ public _FinalStage statusDetail(Optional statusDetail) { @java.lang.Override public _FinalStage category(CategoryEnum category) { - this.category = Optional.of(category); + this.category = Optional.ofNullable(category); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.java b/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.java index 312d197fe..4256c68b3 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AccountDetailsAndActionsIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountDetailsAndActionsIntegration.Builder.class) public final class AccountDetailsAndActionsIntegration { private final String name; @@ -147,17 +148,17 @@ public static NameStage builder() { } public interface NameStage { - ColorStage name(String name); + ColorStage name(@NotNull String name); Builder from(AccountDetailsAndActionsIntegration other); } public interface ColorStage { - SlugStage color(String color); + SlugStage color(@NotNull String color); } public interface SlugStage { - PassthroughAvailableStage slug(String slug); + PassthroughAvailableStage slug(@NotNull String slug); } public interface PassthroughAvailableStage { @@ -225,21 +226,21 @@ public Builder from(AccountDetailsAndActionsIntegration other) { @java.lang.Override @JsonSetter("name") - public ColorStage name(String name) { + public ColorStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("color") - public SlugStage color(String color) { + public SlugStage color(@NotNull String color) { this.color = color; return this; } @java.lang.Override @JsonSetter("slug") - public PassthroughAvailableStage slug(String slug) { + public PassthroughAvailableStage slug(@NotNull String slug) { this.slug = slug; return this; } @@ -253,7 +254,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } @@ -266,7 +267,7 @@ public _FinalStage availableModelOperations(Optional> avail @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -279,7 +280,7 @@ public _FinalStage squareImage(Optional squareImage) { @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AccountIntegration.java b/src/main/java/com/merge/api/resources/ticketing/types/AccountIntegration.java index 15e6c82df..8fe667026 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AccountIntegration.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AccountIntegration.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountIntegration.Builder.class) public final class AccountIntegration { private final String name; @@ -195,7 +196,7 @@ public static NameStage builder() { } public interface NameStage { - _FinalStage name(String name); + _FinalStage name(@NotNull String name); Builder from(AccountIntegration other); } @@ -288,7 +289,7 @@ public Builder from(AccountIntegration other) { */ @java.lang.Override @JsonSetter("name") - public _FinalStage name(String name) { + public _FinalStage name(@NotNull String name) { this.name = name; return this; } @@ -299,7 +300,7 @@ public _FinalStage name(String name) { */ @java.lang.Override public _FinalStage categoryBetaStatus(Map categoryBetaStatus) { - this.categoryBetaStatus = Optional.of(categoryBetaStatus); + this.categoryBetaStatus = Optional.ofNullable(categoryBetaStatus); return this; } @@ -316,7 +317,7 @@ public _FinalStage categoryBetaStatus(Optional> categoryBe */ @java.lang.Override public _FinalStage webhookSetupGuideUrl(String webhookSetupGuideUrl) { - this.webhookSetupGuideUrl = Optional.of(webhookSetupGuideUrl); + this.webhookSetupGuideUrl = Optional.ofNullable(webhookSetupGuideUrl); return this; } @@ -333,7 +334,7 @@ public _FinalStage webhookSetupGuideUrl(Optional webhookSetupGuideUrl) { */ @java.lang.Override public _FinalStage apiEndpointsToDocumentationUrls(Map apiEndpointsToDocumentationUrls) { - this.apiEndpointsToDocumentationUrls = Optional.of(apiEndpointsToDocumentationUrls); + this.apiEndpointsToDocumentationUrls = Optional.ofNullable(apiEndpointsToDocumentationUrls); return this; } @@ -347,7 +348,7 @@ public _FinalStage apiEndpointsToDocumentationUrls( @java.lang.Override public _FinalStage slug(String slug) { - this.slug = Optional.of(slug); + this.slug = Optional.ofNullable(slug); return this; } @@ -364,7 +365,7 @@ public _FinalStage slug(Optional slug) { */ @java.lang.Override public _FinalStage color(String color) { - this.color = Optional.of(color); + this.color = Optional.ofNullable(color); return this; } @@ -381,7 +382,7 @@ public _FinalStage color(Optional color) { */ @java.lang.Override public _FinalStage squareImage(String squareImage) { - this.squareImage = Optional.of(squareImage); + this.squareImage = Optional.ofNullable(squareImage); return this; } @@ -398,7 +399,7 @@ public _FinalStage squareImage(Optional squareImage) { */ @java.lang.Override public _FinalStage image(String image) { - this.image = Optional.of(image); + this.image = Optional.ofNullable(image); return this; } @@ -415,7 +416,7 @@ public _FinalStage image(Optional image) { */ @java.lang.Override public _FinalStage categories(List categories) { - this.categories = Optional.of(categories); + this.categories = Optional.ofNullable(categories); return this; } @@ -432,7 +433,7 @@ public _FinalStage categories(Optional> categories) { */ @java.lang.Override public _FinalStage abbreviatedName(String abbreviatedName) { - this.abbreviatedName = Optional.of(abbreviatedName); + this.abbreviatedName = Optional.ofNullable(abbreviatedName); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AccountToken.java b/src/main/java/com/merge/api/resources/ticketing/types/AccountToken.java index 8640af286..4e107947e 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AccountToken.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AccountToken.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AccountToken.Builder.class) public final class AccountToken { private final String accountToken; @@ -71,13 +72,13 @@ public static AccountTokenStage builder() { } public interface AccountTokenStage { - IntegrationStage accountToken(String accountToken); + IntegrationStage accountToken(@NotNull String accountToken); Builder from(AccountToken other); } public interface IntegrationStage { - _FinalStage integration(AccountIntegration integration); + _FinalStage integration(@NotNull AccountIntegration integration); } public interface _FinalStage { @@ -104,14 +105,14 @@ public Builder from(AccountToken other) { @java.lang.Override @JsonSetter("account_token") - public IntegrationStage accountToken(String accountToken) { + public IntegrationStage accountToken(@NotNull String accountToken) { this.accountToken = accountToken; return this; } @java.lang.Override @JsonSetter("integration") - public _FinalStage integration(AccountIntegration integration) { + public _FinalStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AdvancedMetadata.java b/src/main/java/com/merge/api/resources/ticketing/types/AdvancedMetadata.java index d665627a1..07bd9a508 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AdvancedMetadata.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AdvancedMetadata.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AdvancedMetadata.Builder.class) public final class AdvancedMetadata { private final String id; @@ -119,7 +120,7 @@ public static IdStage builder() { } public interface IdStage { - _FinalStage id(String id); + _FinalStage id(@NotNull String id); Builder from(AdvancedMetadata other); } @@ -180,14 +181,14 @@ public Builder from(AdvancedMetadata other) { @java.lang.Override @JsonSetter("id") - public _FinalStage id(String id) { + public _FinalStage id(@NotNull String id) { this.id = id; return this; } @java.lang.Override public _FinalStage fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -200,7 +201,7 @@ public _FinalStage fieldChoices(Optional> fieldChoices) { @java.lang.Override public _FinalStage isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -213,7 +214,7 @@ public _FinalStage isCustom(Optional isCustom) { @java.lang.Override public _FinalStage isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -226,7 +227,7 @@ public _FinalStage isRequired(Optional isRequired) { @java.lang.Override public _FinalStage description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -239,7 +240,7 @@ public _FinalStage description(Optional description) { @java.lang.Override public _FinalStage displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AsyncPassthroughReciept.java b/src/main/java/com/merge/api/resources/ticketing/types/AsyncPassthroughReciept.java index f852ad0d4..80d15a99b 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AsyncPassthroughReciept.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AsyncPassthroughReciept.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AsyncPassthroughReciept.Builder.class) public final class AsyncPassthroughReciept { private final String asyncPassthroughReceiptId; @@ -62,7 +63,7 @@ public static AsyncPassthroughReceiptIdStage builder() { } public interface AsyncPassthroughReceiptIdStage { - _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId); + _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId); Builder from(AsyncPassthroughReciept other); } @@ -88,7 +89,7 @@ public Builder from(AsyncPassthroughReciept other) { @java.lang.Override @JsonSetter("async_passthrough_receipt_id") - public _FinalStage asyncPassthroughReceiptId(String asyncPassthroughReceiptId) { + public _FinalStage asyncPassthroughReceiptId(@NotNull String asyncPassthroughReceiptId) { this.asyncPassthroughReceiptId = asyncPassthroughReceiptId; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Attachment.java b/src/main/java/com/merge/api/resources/ticketing/types/Attachment.java index 76b68f81d..185734308 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Attachment.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Attachment.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Attachment.Builder.class) public final class Attachment { private final Optional id; @@ -288,7 +288,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -299,7 +299,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -310,7 +310,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -321,7 +321,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -332,7 +332,7 @@ public Builder fileName(Optional fileName) { } public Builder fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -343,7 +343,7 @@ public Builder ticket(Optional ticket) { } public Builder ticket(AttachmentTicket ticket) { - this.ticket = Optional.of(ticket); + this.ticket = Optional.ofNullable(ticket); return this; } @@ -354,7 +354,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -365,7 +365,7 @@ public Builder contentType(Optional contentType) { } public Builder contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -376,7 +376,7 @@ public Builder uploadedBy(Optional uploadedBy) { } public Builder uploadedBy(String uploadedBy) { - this.uploadedBy = Optional.of(uploadedBy); + this.uploadedBy = Optional.ofNullable(uploadedBy); return this; } @@ -387,7 +387,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -398,7 +398,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -409,7 +409,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -420,7 +420,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AttachmentRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/AttachmentRequest.java index b033d63bd..dd31f1322 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AttachmentRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AttachmentRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AttachmentRequest.Builder.class) public final class AttachmentRequest { private final Optional fileName; @@ -187,7 +187,7 @@ public Builder fileName(Optional fileName) { } public Builder fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -198,7 +198,7 @@ public Builder ticket(Optional ticket) { } public Builder ticket(AttachmentRequestTicket ticket) { - this.ticket = Optional.of(ticket); + this.ticket = Optional.ofNullable(ticket); return this; } @@ -209,7 +209,7 @@ public Builder fileUrl(Optional fileUrl) { } public Builder fileUrl(String fileUrl) { - this.fileUrl = Optional.of(fileUrl); + this.fileUrl = Optional.ofNullable(fileUrl); return this; } @@ -220,7 +220,7 @@ public Builder contentType(Optional contentType) { } public Builder contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -231,7 +231,7 @@ public Builder uploadedBy(Optional uploadedBy) { } public Builder uploadedBy(String uploadedBy) { - this.uploadedBy = Optional.of(uploadedBy); + this.uploadedBy = Optional.ofNullable(uploadedBy); return this; } @@ -242,7 +242,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -253,7 +253,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AuditLogEvent.java b/src/main/java/com/merge/api/resources/ticketing/types/AuditLogEvent.java index 9252076d7..fd30c4cbe 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AuditLogEvent.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AuditLogEvent.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AuditLogEvent.Builder.class) public final class AuditLogEvent { private final Optional id; @@ -208,21 +209,21 @@ public static RoleStage builder() { } public interface RoleStage { - IpAddressStage role(AuditLogEventRole role); + IpAddressStage role(@NotNull AuditLogEventRole role); Builder from(AuditLogEvent other); } public interface IpAddressStage { - EventTypeStage ipAddress(String ipAddress); + EventTypeStage ipAddress(@NotNull String ipAddress); } public interface EventTypeStage { - EventDescriptionStage eventType(AuditLogEventEventType eventType); + EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType); } public interface EventDescriptionStage { - _FinalStage eventDescription(String eventDescription); + _FinalStage eventDescription(@NotNull String eventDescription); } public interface _FinalStage { @@ -296,14 +297,14 @@ public Builder from(AuditLogEvent other) { */ @java.lang.Override @JsonSetter("role") - public IpAddressStage role(AuditLogEventRole role) { + public IpAddressStage role(@NotNull AuditLogEventRole role) { this.role = role; return this; } @java.lang.Override @JsonSetter("ip_address") - public EventTypeStage ipAddress(String ipAddress) { + public EventTypeStage ipAddress(@NotNull String ipAddress) { this.ipAddress = ipAddress; return this; } @@ -357,21 +358,21 @@ public EventTypeStage ipAddress(String ipAddress) { */ @java.lang.Override @JsonSetter("event_type") - public EventDescriptionStage eventType(AuditLogEventEventType eventType) { + public EventDescriptionStage eventType(@NotNull AuditLogEventEventType eventType) { this.eventType = eventType; return this; } @java.lang.Override @JsonSetter("event_description") - public _FinalStage eventDescription(String eventDescription) { + public _FinalStage eventDescription(@NotNull String eventDescription) { this.eventDescription = eventDescription; return this; } @java.lang.Override public _FinalStage createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -388,7 +389,7 @@ public _FinalStage createdAt(Optional createdAt) { */ @java.lang.Override public _FinalStage userEmail(String userEmail) { - this.userEmail = Optional.of(userEmail); + this.userEmail = Optional.ofNullable(userEmail); return this; } @@ -405,7 +406,7 @@ public _FinalStage userEmail(Optional userEmail) { */ @java.lang.Override public _FinalStage userName(String userName) { - this.userName = Optional.of(userName); + this.userName = Optional.ofNullable(userName); return this; } @@ -418,7 +419,7 @@ public _FinalStage userName(Optional userName) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/AvailableActions.java b/src/main/java/com/merge/api/resources/ticketing/types/AvailableActions.java index 00c302a8a..81648221f 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/AvailableActions.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/AvailableActions.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = AvailableActions.Builder.class) public final class AvailableActions { private final AccountIntegration integration; @@ -87,7 +88,7 @@ public static IntegrationStage builder() { } public interface IntegrationStage { - PassthroughAvailableStage integration(AccountIntegration integration); + PassthroughAvailableStage integration(@NotNull AccountIntegration integration); Builder from(AvailableActions other); } @@ -127,7 +128,7 @@ public Builder from(AvailableActions other) { @java.lang.Override @JsonSetter("integration") - public PassthroughAvailableStage integration(AccountIntegration integration) { + public PassthroughAvailableStage integration(@NotNull AccountIntegration integration) { this.integration = integration; return this; } @@ -141,7 +142,7 @@ public _FinalStage passthroughAvailable(boolean passthroughAvailable) { @java.lang.Override public _FinalStage availableModelOperations(List availableModelOperations) { - this.availableModelOperations = Optional.of(availableModelOperations); + this.availableModelOperations = Optional.ofNullable(availableModelOperations); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Collection.java b/src/main/java/com/merge/api/resources/ticketing/types/Collection.java index a98f98679..49d64e0b0 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Collection.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Collection.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Collection.Builder.class) public final class Collection { private final Optional id; @@ -294,7 +294,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -305,7 +305,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -316,7 +316,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -327,7 +327,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -338,7 +338,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -349,7 +349,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -360,7 +360,7 @@ public Builder collectionType(Optional collectionType) } public Builder collectionType(CollectionCollectionType collectionType) { - this.collectionType = Optional.of(collectionType); + this.collectionType = Optional.ofNullable(collectionType); return this; } @@ -371,7 +371,7 @@ public Builder parentCollection(Optional parentColle } public Builder parentCollection(CollectionParentCollection parentCollection) { - this.parentCollection = Optional.of(parentCollection); + this.parentCollection = Optional.ofNullable(parentCollection); return this; } @@ -382,7 +382,7 @@ public Builder teams(Optional>> teams) { } public Builder teams(List> teams) { - this.teams = Optional.of(teams); + this.teams = Optional.ofNullable(teams); return this; } @@ -393,7 +393,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -404,7 +404,7 @@ public Builder accessLevel(Optional accessLevel) { } public Builder accessLevel(CollectionAccessLevel accessLevel) { - this.accessLevel = Optional.of(accessLevel); + this.accessLevel = Optional.ofNullable(accessLevel); return this; } @@ -415,7 +415,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -426,7 +426,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Comment.java b/src/main/java/com/merge/api/resources/ticketing/types/Comment.java index 0e776b6ef..503780bbd 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Comment.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Comment.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Comment.Builder.class) public final class Comment { private final Optional id; @@ -305,7 +305,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -316,7 +316,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -327,7 +327,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -338,7 +338,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -349,7 +349,7 @@ public Builder user(Optional user) { } public Builder user(CommentUser user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -360,7 +360,7 @@ public Builder contact(Optional contact) { } public Builder contact(CommentContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -371,7 +371,7 @@ public Builder body(Optional body) { } public Builder body(String body) { - this.body = Optional.of(body); + this.body = Optional.ofNullable(body); return this; } @@ -382,7 +382,7 @@ public Builder htmlBody(Optional htmlBody) { } public Builder htmlBody(String htmlBody) { - this.htmlBody = Optional.of(htmlBody); + this.htmlBody = Optional.ofNullable(htmlBody); return this; } @@ -393,7 +393,7 @@ public Builder ticket(Optional ticket) { } public Builder ticket(CommentTicket ticket) { - this.ticket = Optional.of(ticket); + this.ticket = Optional.ofNullable(ticket); return this; } @@ -404,7 +404,7 @@ public Builder isPrivate(Optional isPrivate) { } public Builder isPrivate(Boolean isPrivate) { - this.isPrivate = Optional.of(isPrivate); + this.isPrivate = Optional.ofNullable(isPrivate); return this; } @@ -415,7 +415,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -426,7 +426,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -437,7 +437,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -448,7 +448,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/CommentRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/CommentRequest.java index 8e1847504..50f7097d9 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/CommentRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/CommentRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommentRequest.Builder.class) public final class CommentRequest { private final Optional user; @@ -204,7 +204,7 @@ public Builder user(Optional user) { } public Builder user(CommentRequestUser user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -215,7 +215,7 @@ public Builder contact(Optional contact) { } public Builder contact(CommentRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -226,7 +226,7 @@ public Builder body(Optional body) { } public Builder body(String body) { - this.body = Optional.of(body); + this.body = Optional.ofNullable(body); return this; } @@ -237,7 +237,7 @@ public Builder htmlBody(Optional htmlBody) { } public Builder htmlBody(String htmlBody) { - this.htmlBody = Optional.of(htmlBody); + this.htmlBody = Optional.ofNullable(htmlBody); return this; } @@ -248,7 +248,7 @@ public Builder ticket(Optional ticket) { } public Builder ticket(CommentRequestTicket ticket) { - this.ticket = Optional.of(ticket); + this.ticket = Optional.ofNullable(ticket); return this; } @@ -259,7 +259,7 @@ public Builder isPrivate(Optional isPrivate) { } public Builder isPrivate(Boolean isPrivate) { - this.isPrivate = Optional.of(isPrivate); + this.isPrivate = Optional.ofNullable(isPrivate); return this; } @@ -270,7 +270,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -281,7 +281,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/CommentResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/CommentResponse.java index 8077e05e6..22851e95c 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/CommentResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/CommentResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommentResponse.Builder.class) public final class CommentResponse { private final Comment model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Comment model); + _FinalStage model(@NotNull Comment model); Builder from(CommentResponse other); } @@ -149,14 +150,14 @@ public Builder from(CommentResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Comment model) { + public _FinalStage model(@NotNull Comment model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopeApi.java b/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopeApi.java index 26948a797..33640fdcd 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopeApi.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopeApi.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Objects; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopeApi.Builder.class) public final class CommonModelScopeApi { private final List commonModels; diff --git a/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopesBodyRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopesBodyRequest.java index cde937f0f..bae80b1d8 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopesBodyRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/CommonModelScopesBodyRequest.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = CommonModelScopesBodyRequest.Builder.class) public final class CommonModelScopesBodyRequest { private final String modelId; @@ -87,7 +88,7 @@ public static ModelIdStage builder() { } public interface ModelIdStage { - _FinalStage modelId(String modelId); + _FinalStage modelId(@NotNull String modelId); Builder from(CommonModelScopesBodyRequest other); } @@ -131,7 +132,7 @@ public Builder from(CommonModelScopesBodyRequest other) { @java.lang.Override @JsonSetter("model_id") - public _FinalStage modelId(String modelId) { + public _FinalStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Contact.java b/src/main/java/com/merge/api/resources/ticketing/types/Contact.java index 004273a02..e8638bfb3 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Contact.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Contact.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Contact.Builder.class) public final class Contact { private final Optional id; @@ -271,7 +271,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -282,7 +282,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -293,7 +293,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -304,7 +304,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -315,7 +315,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -326,7 +326,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -337,7 +337,7 @@ public Builder phoneNumber(Optional phoneNumber) { } public Builder phoneNumber(String phoneNumber) { - this.phoneNumber = Optional.of(phoneNumber); + this.phoneNumber = Optional.ofNullable(phoneNumber); return this; } @@ -348,7 +348,7 @@ public Builder details(Optional details) { } public Builder details(String details) { - this.details = Optional.of(details); + this.details = Optional.ofNullable(details); return this; } @@ -359,7 +359,7 @@ public Builder account(Optional account) { } public Builder account(ContactAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -370,7 +370,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -381,7 +381,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -392,7 +392,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ContactRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/ContactRequest.java index b8b84aafc..11b57d15c 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ContactRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ContactRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ContactRequest.Builder.class) public final class ContactRequest { private final Optional name; @@ -187,7 +187,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -198,7 +198,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -209,7 +209,7 @@ public Builder phoneNumber(Optional phoneNumber) { } public Builder phoneNumber(String phoneNumber) { - this.phoneNumber = Optional.of(phoneNumber); + this.phoneNumber = Optional.ofNullable(phoneNumber); return this; } @@ -220,7 +220,7 @@ public Builder details(Optional details) { } public Builder details(String details) { - this.details = Optional.of(details); + this.details = Optional.ofNullable(details); return this; } @@ -231,7 +231,7 @@ public Builder account(Optional account) { } public Builder account(ContactRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -242,7 +242,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -253,7 +253,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/DataPassthroughRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/DataPassthroughRequest.java index cf38213d8..16ae8aefe 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/DataPassthroughRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/DataPassthroughRequest.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DataPassthroughRequest.Builder.class) public final class DataPassthroughRequest { private final MethodEnum method; @@ -164,13 +165,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(MethodEnum method); + PathStage method(@NotNull MethodEnum method); Builder from(DataPassthroughRequest other); } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); } public interface _FinalStage { @@ -239,7 +240,7 @@ public Builder from(DataPassthroughRequest other) { @java.lang.Override @JsonSetter("method") - public PathStage method(MethodEnum method) { + public PathStage method(@NotNull MethodEnum method) { this.method = method; return this; } @@ -250,7 +251,7 @@ public PathStage method(MethodEnum method) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @@ -261,7 +262,7 @@ public _FinalStage path(String path) { */ @java.lang.Override public _FinalStage normalizeResponse(Boolean normalizeResponse) { - this.normalizeResponse = Optional.of(normalizeResponse); + this.normalizeResponse = Optional.ofNullable(normalizeResponse); return this; } @@ -274,7 +275,7 @@ public _FinalStage normalizeResponse(Optional normalizeResponse) { @java.lang.Override public _FinalStage requestFormat(RequestFormatEnum requestFormat) { - this.requestFormat = Optional.of(requestFormat); + this.requestFormat = Optional.ofNullable(requestFormat); return this; } @@ -291,7 +292,7 @@ public _FinalStage requestFormat(Optional requestFormat) { */ @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -308,7 +309,7 @@ public _FinalStage headers(Optional> headers) { */ @java.lang.Override public _FinalStage multipartFormData(List multipartFormData) { - this.multipartFormData = Optional.of(multipartFormData); + this.multipartFormData = Optional.ofNullable(multipartFormData); return this; } @@ -325,7 +326,7 @@ public _FinalStage multipartFormData(Optional> m */ @java.lang.Override public _FinalStage data(String data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } @@ -342,7 +343,7 @@ public _FinalStage data(Optional data) { */ @java.lang.Override public _FinalStage baseUrlOverride(String baseUrlOverride) { - this.baseUrlOverride = Optional.of(baseUrlOverride); + this.baseUrlOverride = Optional.ofNullable(baseUrlOverride); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/DebugModeLog.java b/src/main/java/com/merge/api/resources/ticketing/types/DebugModeLog.java index b6345ee5a..e52e1396f 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/DebugModeLog.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/DebugModeLog.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModeLog.Builder.class) public final class DebugModeLog { private final String logId; @@ -84,17 +85,17 @@ public static LogIdStage builder() { } public interface LogIdStage { - DashboardViewStage logId(String logId); + DashboardViewStage logId(@NotNull String logId); Builder from(DebugModeLog other); } public interface DashboardViewStage { - LogSummaryStage dashboardView(String dashboardView); + LogSummaryStage dashboardView(@NotNull String dashboardView); } public interface LogSummaryStage { - _FinalStage logSummary(DebugModelLogSummary logSummary); + _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary); } public interface _FinalStage { @@ -124,21 +125,21 @@ public Builder from(DebugModeLog other) { @java.lang.Override @JsonSetter("log_id") - public DashboardViewStage logId(String logId) { + public DashboardViewStage logId(@NotNull String logId) { this.logId = logId; return this; } @java.lang.Override @JsonSetter("dashboard_view") - public LogSummaryStage dashboardView(String dashboardView) { + public LogSummaryStage dashboardView(@NotNull String dashboardView) { this.dashboardView = dashboardView; return this; } @java.lang.Override @JsonSetter("log_summary") - public _FinalStage logSummary(DebugModelLogSummary logSummary) { + public _FinalStage logSummary(@NotNull DebugModelLogSummary logSummary) { this.logSummary = logSummary; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/DebugModelLogSummary.java b/src/main/java/com/merge/api/resources/ticketing/types/DebugModelLogSummary.java index 04bab448d..595bf1cd1 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/DebugModelLogSummary.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/DebugModelLogSummary.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = DebugModelLogSummary.Builder.class) public final class DebugModelLogSummary { private final String url; @@ -78,13 +79,13 @@ public static UrlStage builder() { } public interface UrlStage { - MethodStage url(String url); + MethodStage url(@NotNull String url); Builder from(DebugModelLogSummary other); } public interface MethodStage { - StatusCodeStage method(String method); + StatusCodeStage method(@NotNull String method); } public interface StatusCodeStage { @@ -118,14 +119,14 @@ public Builder from(DebugModelLogSummary other) { @java.lang.Override @JsonSetter("url") - public MethodStage url(String url) { + public MethodStage url(@NotNull String url) { this.url = url; return this; } @java.lang.Override @JsonSetter("method") - public StatusCodeStage method(String method) { + public StatusCodeStage method(@NotNull String method) { this.method = method; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ErrorValidationProblem.java b/src/main/java/com/merge/api/resources/ticketing/types/ErrorValidationProblem.java index a3722d684..8bfa66ec3 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ErrorValidationProblem.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ErrorValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ErrorValidationProblem.Builder.class) public final class ErrorValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(ErrorValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(ErrorValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApi.java b/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApi.java index f07fb0636..2f4d32ada 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApi.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApi.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApi.Builder.class) public final class ExternalTargetFieldApi { private final Optional name; @@ -110,7 +110,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -121,7 +121,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -132,7 +132,7 @@ public Builder isMapped(Optional isMapped) { } public Builder isMapped(String isMapped) { - this.isMapped = Optional.of(isMapped); + this.isMapped = Optional.ofNullable(isMapped); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApiResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApiResponse.java index 0808d1f5e..8e9b1b1ed 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ExternalTargetFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ExternalTargetFieldApiResponse.Builder.class) public final class ExternalTargetFieldApiResponse { private final Optional> ticket; @@ -228,7 +228,7 @@ public Builder ticket(Optional> ticket) { } public Builder ticket(List ticket) { - this.ticket = Optional.of(ticket); + this.ticket = Optional.ofNullable(ticket); return this; } @@ -239,7 +239,7 @@ public Builder comment(Optional> comment) { } public Builder comment(List comment) { - this.comment = Optional.of(comment); + this.comment = Optional.ofNullable(comment); return this; } @@ -250,7 +250,7 @@ public Builder project(Optional> project) { } public Builder project(List project) { - this.project = Optional.of(project); + this.project = Optional.ofNullable(project); return this; } @@ -261,7 +261,7 @@ public Builder collection(Optional> collection) { } public Builder collection(List collection) { - this.collection = Optional.of(collection); + this.collection = Optional.ofNullable(collection); return this; } @@ -272,7 +272,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -283,7 +283,7 @@ public Builder role(Optional> role) { } public Builder role(List role) { - this.role = Optional.of(role); + this.role = Optional.ofNullable(role); return this; } @@ -294,7 +294,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -305,7 +305,7 @@ public Builder team(Optional> team) { } public Builder team(List team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -316,7 +316,7 @@ public Builder attachment(Optional> attachment) { } public Builder attachment(List attachment) { - this.attachment = Optional.of(attachment); + this.attachment = Optional.ofNullable(attachment); return this; } @@ -327,7 +327,7 @@ public Builder tag(Optional> tag) { } public Builder tag(List tag) { - this.tag = Optional.of(tag); + this.tag = Optional.ofNullable(tag); return this; } @@ -338,7 +338,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstance.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstance.java index f457e62be..0cf775e8a 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstance.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstance.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstance.Builder.class) public final class FieldMappingApiInstance { private final Optional id; @@ -125,7 +125,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -136,7 +136,7 @@ public Builder isIntegrationWide(Optional isIntegrationWide) { } public Builder isIntegrationWide(Boolean isIntegrationWide) { - this.isIntegrationWide = Optional.of(isIntegrationWide); + this.isIntegrationWide = Optional.ofNullable(isIntegrationWide); return this; } @@ -147,7 +147,7 @@ public Builder targetField(Optional targetFi } public Builder targetField(FieldMappingApiInstanceTargetField targetField) { - this.targetField = Optional.of(targetField); + this.targetField = Optional.ofNullable(targetField); return this; } @@ -158,7 +158,7 @@ public Builder remoteField(Optional remoteFi } public Builder remoteField(FieldMappingApiInstanceRemoteField remoteField) { - this.remoteField = Optional.of(remoteField); + this.remoteField = Optional.ofNullable(remoteField); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.java index e20524074..505876f78 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteField.Builder.class) public final class FieldMappingApiInstanceRemoteField { private final Optional remoteKeyName; @@ -88,7 +89,8 @@ public static RemoteEndpointInfoStage builder() { } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo); Builder from(FieldMappingApiInstanceRemoteField other); } @@ -128,14 +130,15 @@ public Builder from(FieldMappingApiInstanceRemoteField other) { @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo( + @NotNull FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage schema(Map schema) { - this.schema = Optional.of(schema); + this.schema = Optional.ofNullable(schema); return this; } @@ -148,7 +151,7 @@ public _FinalStage schema(Optional> schema) { @java.lang.Override public _FinalStage remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java index be8dc5ce7..b52432d0b 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo.Builder.class) public final class FieldMappingApiInstanceRemoteFieldRemoteEndpointInfo { private final Optional method; @@ -114,7 +114,7 @@ public Builder method(Optional method) { } public Builder method(String method) { - this.method = Optional.of(method); + this.method = Optional.ofNullable(method); return this; } @@ -125,7 +125,7 @@ public Builder urlPath(Optional urlPath) { } public Builder urlPath(String urlPath) { - this.urlPath = Optional.of(urlPath); + this.urlPath = Optional.ofNullable(urlPath); return this; } @@ -136,7 +136,7 @@ public Builder fieldTraversalPath(Optional> fieldTraversalPath) { } public Builder fieldTraversalPath(List fieldTraversalPath) { - this.fieldTraversalPath = Optional.of(fieldTraversalPath); + this.fieldTraversalPath = Optional.ofNullable(fieldTraversalPath); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceResponse.java index 027b5ce5a..83a86731d 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceResponse.Builder.class) public final class FieldMappingApiInstanceResponse { private final Optional> ticket; @@ -228,7 +228,7 @@ public Builder ticket(Optional> ticket) { } public Builder ticket(List ticket) { - this.ticket = Optional.of(ticket); + this.ticket = Optional.ofNullable(ticket); return this; } @@ -239,7 +239,7 @@ public Builder comment(Optional> comment) { } public Builder comment(List comment) { - this.comment = Optional.of(comment); + this.comment = Optional.ofNullable(comment); return this; } @@ -250,7 +250,7 @@ public Builder project(Optional> project) { } public Builder project(List project) { - this.project = Optional.of(project); + this.project = Optional.ofNullable(project); return this; } @@ -261,7 +261,7 @@ public Builder collection(Optional> collection) { } public Builder collection(List collection) { - this.collection = Optional.of(collection); + this.collection = Optional.ofNullable(collection); return this; } @@ -272,7 +272,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -283,7 +283,7 @@ public Builder role(Optional> role) { } public Builder role(List role) { - this.role = Optional.of(role); + this.role = Optional.ofNullable(role); return this; } @@ -294,7 +294,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -305,7 +305,7 @@ public Builder team(Optional> team) { } public Builder team(List team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -316,7 +316,7 @@ public Builder attachment(Optional> attachment) { } public Builder attachment(List attachment) { - this.attachment = Optional.of(attachment); + this.attachment = Optional.ofNullable(attachment); return this; } @@ -327,7 +327,7 @@ public Builder tag(Optional> tag) { } public Builder tag(List tag) { - this.tag = Optional.of(tag); + this.tag = Optional.ofNullable(tag); return this; } @@ -338,7 +338,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceTargetField.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceTargetField.java index 810f0c4cf..358746331 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceTargetField.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingApiInstanceTargetField.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingApiInstanceTargetField.Builder.class) public final class FieldMappingApiInstanceTargetField { private final String name; @@ -82,13 +83,13 @@ public static NameStage builder() { } public interface NameStage { - DescriptionStage name(String name); + DescriptionStage name(@NotNull String name); Builder from(FieldMappingApiInstanceTargetField other); } public interface DescriptionStage { - IsOrganizationWideStage description(String description); + IsOrganizationWideStage description(@NotNull String description); } public interface IsOrganizationWideStage { @@ -122,14 +123,14 @@ public Builder from(FieldMappingApiInstanceTargetField other) { @java.lang.Override @JsonSetter("name") - public DescriptionStage name(String name) { + public DescriptionStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("description") - public IsOrganizationWideStage description(String description) { + public IsOrganizationWideStage description(@NotNull String description) { this.description = description; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingInstanceResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingInstanceResponse.java index c72e80cad..fa050462a 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingInstanceResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldMappingInstanceResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldMappingInstanceResponse.Builder.class) public final class FieldMappingInstanceResponse { private final FieldMappingApiInstance model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(FieldMappingApiInstance model); + _FinalStage model(@NotNull FieldMappingApiInstance model); Builder from(FieldMappingInstanceResponse other); } @@ -149,14 +150,14 @@ public Builder from(FieldMappingInstanceResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(FieldMappingApiInstance model) { + public _FinalStage model(@NotNull FieldMappingApiInstance model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializer.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializer.java index 8f4c3cc91..8fb738548 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializer.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializer.Builder.class) public final class FieldPermissionDeserializer { private final Optional> enabledFields; @@ -100,7 +100,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -111,7 +111,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializerRequest.java index 361cd97da..137a97a4b 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/FieldPermissionDeserializerRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = FieldPermissionDeserializerRequest.Builder.class) public final class FieldPermissionDeserializerRequest { private final Optional> enabledFields; @@ -101,7 +101,7 @@ public Builder enabledFields(Optional> enabledFields) { } public Builder enabledFields(List enabledFields) { - this.enabledFields = Optional.of(enabledFields); + this.enabledFields = Optional.ofNullable(enabledFields); return this; } @@ -112,7 +112,7 @@ public Builder disabledFields(Optional> disabledFields) { } public Builder disabledFields(List disabledFields) { - this.disabledFields = Optional.of(disabledFields); + this.disabledFields = Optional.ofNullable(disabledFields); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.java b/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.java index dba216e29..7fc461a60 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializer.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializer.Builder.class) public final class IndividualCommonModelScopeDeserializer { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializer other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializer other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializer fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional fieldP @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.java index 914175d19..262c52987 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/IndividualCommonModelScopeDeserializerRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = IndividualCommonModelScopeDeserializerRequest.Builder.class) public final class IndividualCommonModelScopeDeserializerRequest { private final String modelName; @@ -87,7 +88,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(IndividualCommonModelScopeDeserializerRequest other); } @@ -127,14 +128,14 @@ public Builder from(IndividualCommonModelScopeDeserializerRequest other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override public _FinalStage fieldPermissions(FieldPermissionDeserializerRequest fieldPermissions) { - this.fieldPermissions = Optional.of(fieldPermissions); + this.fieldPermissions = Optional.ofNullable(fieldPermissions); return this; } @@ -147,7 +148,7 @@ public _FinalStage fieldPermissions(Optional @java.lang.Override public _FinalStage modelPermissions(Map modelPermissions) { - this.modelPermissions = Optional.of(modelPermissions); + this.modelPermissions = Optional.ofNullable(modelPermissions); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Issue.java b/src/main/java/com/merge/api/resources/ticketing/types/Issue.java index 9e47f81db..a36f4d7be 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Issue.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Issue.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Issue.Builder.class) public final class Issue { private final Optional id; @@ -154,7 +155,7 @@ public static ErrorDescriptionStage builder() { } public interface ErrorDescriptionStage { - _FinalStage errorDescription(String errorDescription); + _FinalStage errorDescription(@NotNull String errorDescription); Builder from(Issue other); } @@ -229,14 +230,14 @@ public Builder from(Issue other) { @java.lang.Override @JsonSetter("error_description") - public _FinalStage errorDescription(String errorDescription) { + public _FinalStage errorDescription(@NotNull String errorDescription) { this.errorDescription = errorDescription; return this; } @java.lang.Override public _FinalStage errorDetails(List errorDetails) { - this.errorDetails = Optional.of(errorDetails); + this.errorDetails = Optional.ofNullable(errorDetails); return this; } @@ -249,7 +250,7 @@ public _FinalStage errorDetails(Optional> errorDetails) { @java.lang.Override public _FinalStage isMuted(Boolean isMuted) { - this.isMuted = Optional.of(isMuted); + this.isMuted = Optional.ofNullable(isMuted); return this; } @@ -262,7 +263,7 @@ public _FinalStage isMuted(Optional isMuted) { @java.lang.Override public _FinalStage lastIncidentTime(OffsetDateTime lastIncidentTime) { - this.lastIncidentTime = Optional.of(lastIncidentTime); + this.lastIncidentTime = Optional.ofNullable(lastIncidentTime); return this; } @@ -275,7 +276,7 @@ public _FinalStage lastIncidentTime(Optional lastIncidentTime) { @java.lang.Override public _FinalStage firstIncidentTime(OffsetDateTime firstIncidentTime) { - this.firstIncidentTime = Optional.of(firstIncidentTime); + this.firstIncidentTime = Optional.ofNullable(firstIncidentTime); return this; } @@ -288,7 +289,7 @@ public _FinalStage firstIncidentTime(Optional firstIncidentTime) @java.lang.Override public _FinalStage endUser(Map endUser) { - this.endUser = Optional.of(endUser); + this.endUser = Optional.ofNullable(endUser); return this; } @@ -309,7 +310,7 @@ public _FinalStage endUser(Optional> endUser) { */ @java.lang.Override public _FinalStage status(IssueStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -322,7 +323,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ItemSchema.java b/src/main/java/com/merge/api/resources/ticketing/types/ItemSchema.java index 9931dc982..8850579c4 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ItemSchema.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ItemSchema.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ItemSchema.Builder.class) public final class ItemSchema { private final Optional itemType; @@ -113,7 +113,7 @@ public Builder itemType(Optional itemType) { } public Builder itemType(ItemTypeEnum itemType) { - this.itemType = Optional.of(itemType); + this.itemType = Optional.ofNullable(itemType); return this; } @@ -124,7 +124,7 @@ public Builder itemFormat(Optional itemFormat) { } public Builder itemFormat(ItemFormatEnum itemFormat) { - this.itemFormat = Optional.of(itemFormat); + this.itemFormat = Optional.ofNullable(itemFormat); return this; } @@ -135,7 +135,7 @@ public Builder itemChoices(Optional> itemChoices) { } public Builder itemChoices(List itemChoices) { - this.itemChoices = Optional.of(itemChoices); + this.itemChoices = Optional.ofNullable(itemChoices); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/LinkToken.java b/src/main/java/com/merge/api/resources/ticketing/types/LinkToken.java index 183bc7bf8..0037880c3 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/LinkToken.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/LinkToken.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkToken.Builder.class) public final class LinkToken { private final String linkToken; @@ -86,7 +87,7 @@ public static LinkTokenStage builder() { } public interface LinkTokenStage { - _FinalStage linkToken(String linkToken); + _FinalStage linkToken(@NotNull String linkToken); Builder from(LinkToken other); } @@ -126,14 +127,14 @@ public Builder from(LinkToken other) { @java.lang.Override @JsonSetter("link_token") - public _FinalStage linkToken(String linkToken) { + public _FinalStage linkToken(@NotNull String linkToken) { this.linkToken = linkToken; return this; } @java.lang.Override public _FinalStage magicLinkUrl(String magicLinkUrl) { - this.magicLinkUrl = Optional.of(magicLinkUrl); + this.magicLinkUrl = Optional.ofNullable(magicLinkUrl); return this; } @@ -146,7 +147,7 @@ public _FinalStage magicLinkUrl(Optional magicLinkUrl) { @java.lang.Override public _FinalStage integrationName(String integrationName) { - this.integrationName = Optional.of(integrationName); + this.integrationName = Optional.ofNullable(integrationName); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/LinkedAccountStatus.java b/src/main/java/com/merge/api/resources/ticketing/types/LinkedAccountStatus.java index d8ff72b9b..2f66c76b2 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/LinkedAccountStatus.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/LinkedAccountStatus.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = LinkedAccountStatus.Builder.class) public final class LinkedAccountStatus { private final String linkedAccountStatus; @@ -71,7 +72,7 @@ public static LinkedAccountStatusStage builder() { } public interface LinkedAccountStatusStage { - CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus); + CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus); Builder from(LinkedAccountStatus other); } @@ -104,7 +105,7 @@ public Builder from(LinkedAccountStatus other) { @java.lang.Override @JsonSetter("linked_account_status") - public CanMakeRequestStage linkedAccountStatus(String linkedAccountStatus) { + public CanMakeRequestStage linkedAccountStatus(@NotNull String linkedAccountStatus) { this.linkedAccountStatus = linkedAccountStatus; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/MetaResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/MetaResponse.java index 00221787e..f6d3b88a5 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/MetaResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/MetaResponse.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MetaResponse.Builder.class) public final class MetaResponse { private final Map requestSchema; @@ -184,7 +184,7 @@ public _FinalStage hasRequiredLinkedAccountParams(boolean hasRequiredLinkedAccou @java.lang.Override public _FinalStage status(LinkedAccountStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -197,7 +197,7 @@ public _FinalStage status(Optional status) { @java.lang.Override public _FinalStage remoteFieldClasses(Map remoteFieldClasses) { - this.remoteFieldClasses = Optional.of(remoteFieldClasses); + this.remoteFieldClasses = Optional.ofNullable(remoteFieldClasses); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ModelOperation.java b/src/main/java/com/merge/api/resources/ticketing/types/ModelOperation.java index 40ba97d5e..6ee065d3d 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ModelOperation.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ModelOperation.java @@ -17,8 +17,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelOperation.Builder.class) public final class ModelOperation { private final String modelName; @@ -98,7 +99,7 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - _FinalStage modelName(String modelName); + _FinalStage modelName(@NotNull String modelName); Builder from(ModelOperation other); } @@ -151,7 +152,7 @@ public Builder from(ModelOperation other) { @java.lang.Override @JsonSetter("model_name") - public _FinalStage modelName(String modelName) { + public _FinalStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializer.java b/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializer.java index 4e4abfa6d..0dd3bf4f2 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializer.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializer.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializer.Builder.class) public final class ModelPermissionDeserializer { private final Optional isEnabled; @@ -84,7 +84,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializerRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializerRequest.java index c04205ddb..779a0e8fa 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializerRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ModelPermissionDeserializerRequest.java @@ -17,7 +17,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ModelPermissionDeserializerRequest.Builder.class) public final class ModelPermissionDeserializerRequest { private final Optional isEnabled; @@ -85,7 +85,7 @@ public Builder isEnabled(Optional isEnabled) { } public Builder isEnabled(Boolean isEnabled) { - this.isEnabled = Optional.of(isEnabled); + this.isEnabled = Optional.ofNullable(isEnabled); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/MultipartFormFieldRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/MultipartFormFieldRequest.java index 9bd1a9424..9ec4046cd 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/MultipartFormFieldRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/MultipartFormFieldRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = MultipartFormFieldRequest.Builder.class) public final class MultipartFormFieldRequest { private final String name; @@ -126,13 +127,13 @@ public static NameStage builder() { } public interface NameStage { - DataStage name(String name); + DataStage name(@NotNull String name); Builder from(MultipartFormFieldRequest other); } public interface DataStage { - _FinalStage data(String data); + _FinalStage data(@NotNull String data); } public interface _FinalStage { @@ -184,7 +185,7 @@ public Builder from(MultipartFormFieldRequest other) { */ @java.lang.Override @JsonSetter("name") - public DataStage name(String name) { + public DataStage name(@NotNull String name) { this.name = name; return this; } @@ -195,7 +196,7 @@ public DataStage name(String name) { */ @java.lang.Override @JsonSetter("data") - public _FinalStage data(String data) { + public _FinalStage data(@NotNull String data) { this.data = data; return this; } @@ -206,7 +207,7 @@ public _FinalStage data(String data) { */ @java.lang.Override public _FinalStage contentType(String contentType) { - this.contentType = Optional.of(contentType); + this.contentType = Optional.ofNullable(contentType); return this; } @@ -223,7 +224,7 @@ public _FinalStage contentType(Optional contentType) { */ @java.lang.Override public _FinalStage fileName(String fileName) { - this.fileName = Optional.of(fileName); + this.fileName = Optional.ofNullable(fileName); return this; } @@ -245,7 +246,7 @@ public _FinalStage fileName(Optional fileName) { */ @java.lang.Override public _FinalStage encoding(MultipartFormFieldRequestEncoding encoding) { - this.encoding = Optional.of(encoding); + this.encoding = Optional.ofNullable(encoding); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.java index d5ecbb29c..4f2bfbf13 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountDetailsAndActionsList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountDetailsAndActionsList.Builder.class) public final class PaginatedAccountDetailsAndActionsList { private final Optional next; @@ -112,7 +112,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -123,7 +123,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -134,7 +134,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountList.java index b013c9654..1d514c1a6 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAccountList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAccountList.Builder.class) public final class PaginatedAccountList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAttachmentList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAttachmentList.java index a02c8b210..91cdf9eac 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAttachmentList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAttachmentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAttachmentList.Builder.class) public final class PaginatedAttachmentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAuditLogEventList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAuditLogEventList.java index bf923953c..2239a0c7e 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAuditLogEventList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedAuditLogEventList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedAuditLogEventList.Builder.class) public final class PaginatedAuditLogEventList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCollectionList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCollectionList.java index ce5dd7338..f4508bdfa 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCollectionList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCollectionList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCollectionList.Builder.class) public final class PaginatedCollectionList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCommentList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCommentList.java index 06a1bd7f0..d2aceba41 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCommentList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedCommentList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedCommentList.Builder.class) public final class PaginatedCommentList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedContactList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedContactList.java index 093856bfa..6c4edf6ec 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedContactList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedContactList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedContactList.Builder.class) public final class PaginatedContactList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedIssueList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedIssueList.java index 8205632ac..127326d85 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedIssueList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedIssueList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedIssueList.Builder.class) public final class PaginatedIssueList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedProjectList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedProjectList.java index 2bd8f4247..c8eda362e 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedProjectList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedProjectList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedProjectList.Builder.class) public final class PaginatedProjectList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRemoteFieldClassList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRemoteFieldClassList.java index 8e06774ca..17423cc62 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRemoteFieldClassList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRemoteFieldClassList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedRemoteFieldClassList.Builder.class) public final class PaginatedRemoteFieldClassList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRoleList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRoleList.java index 555d8c48c..6d7afb396 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRoleList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedRoleList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedRoleList.Builder.class) public final class PaginatedRoleList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedSyncStatusList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedSyncStatusList.java index b9644a149..1adc8ee86 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedSyncStatusList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedSyncStatusList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedSyncStatusList.Builder.class) public final class PaginatedSyncStatusList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTagList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTagList.java index 21ff6d132..b28fb3301 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTagList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTagList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTagList.Builder.class) public final class PaginatedTagList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTeamList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTeamList.java index ea07fd04c..8837f0617 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTeamList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTeamList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTeamList.Builder.class) public final class PaginatedTeamList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTicketList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTicketList.java index e88f33742..30691dd60 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTicketList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedTicketList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedTicketList.Builder.class) public final class PaginatedTicketList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedUserList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedUserList.java index 70a753328..b28364e15 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedUserList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedUserList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedUserList.Builder.class) public final class PaginatedUserList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedViewerList.java b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedViewerList.java index 2999f8dd0..3f9f719ec 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PaginatedViewerList.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PaginatedViewerList.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PaginatedViewerList.Builder.class) public final class PaginatedViewerList { private final Optional next; @@ -111,7 +111,7 @@ public Builder next(Optional next) { } public Builder next(String next) { - this.next = Optional.of(next); + this.next = Optional.ofNullable(next); return this; } @@ -122,7 +122,7 @@ public Builder previous(Optional previous) { } public Builder previous(String previous) { - this.previous = Optional.of(previous); + this.previous = Optional.ofNullable(previous); return this; } @@ -133,7 +133,7 @@ public Builder results(Optional> results) { } public Builder results(List results) { - this.results = Optional.of(results); + this.results = Optional.ofNullable(results); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/PatchedTicketRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/PatchedTicketRequest.java index 32f9a3d8e..048a5ea7d 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/PatchedTicketRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/PatchedTicketRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = PatchedTicketRequest.Builder.class) public final class PatchedTicketRequest { private final Optional name; @@ -413,7 +413,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -424,7 +424,7 @@ public Builder assignees(Optional>> assignees) { } public Builder assignees(List> assignees) { - this.assignees = Optional.of(assignees); + this.assignees = Optional.ofNullable(assignees); return this; } @@ -435,7 +435,7 @@ public Builder assignedTeams(Optional>> assignedTeams) { } public Builder assignedTeams(List> assignedTeams) { - this.assignedTeams = Optional.of(assignedTeams); + this.assignedTeams = Optional.ofNullable(assignedTeams); return this; } @@ -446,7 +446,7 @@ public Builder creator(Optional creator) { } public Builder creator(String creator) { - this.creator = Optional.of(creator); + this.creator = Optional.ofNullable(creator); return this; } @@ -457,7 +457,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -468,7 +468,7 @@ public Builder status(Optional status) { } public Builder status(PatchedTicketRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -479,7 +479,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -490,7 +490,7 @@ public Builder collections(Optional>> collections) { } public Builder collections(List> collections) { - this.collections = Optional.of(collections); + this.collections = Optional.ofNullable(collections); return this; } @@ -501,7 +501,7 @@ public Builder ticketType(Optional ticketType) { } public Builder ticketType(String ticketType) { - this.ticketType = Optional.of(ticketType); + this.ticketType = Optional.ofNullable(ticketType); return this; } @@ -512,7 +512,7 @@ public Builder account(Optional account) { } public Builder account(String account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -523,7 +523,7 @@ public Builder contact(Optional contact) { } public Builder contact(String contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -534,7 +534,7 @@ public Builder parentTicket(Optional parentTicket) { } public Builder parentTicket(String parentTicket) { - this.parentTicket = Optional.of(parentTicket); + this.parentTicket = Optional.ofNullable(parentTicket); return this; } @@ -545,7 +545,7 @@ public Builder tags(Optional>> tags) { } public Builder tags(List> tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } @@ -556,7 +556,7 @@ public Builder roles(Optional>> roles) { } public Builder roles(List> roles) { - this.roles = Optional.of(roles); + this.roles = Optional.ofNullable(roles); return this; } @@ -567,7 +567,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } @@ -578,7 +578,7 @@ public Builder ticketUrl(Optional ticketUrl) { } public Builder ticketUrl(String ticketUrl) { - this.ticketUrl = Optional.of(ticketUrl); + this.ticketUrl = Optional.ofNullable(ticketUrl); return this; } @@ -589,7 +589,7 @@ public Builder priority(Optional priority) { } public Builder priority(PatchedTicketRequestPriority priority) { - this.priority = Optional.of(priority); + this.priority = Optional.ofNullable(priority); return this; } @@ -600,7 +600,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -611,7 +611,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -622,7 +622,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Project.java b/src/main/java/com/merge/api/resources/ticketing/types/Project.java index 15ba2cf8a..b7db013e6 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Project.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Project.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Project.Builder.class) public final class Project { private final Optional id; @@ -220,7 +220,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -231,7 +231,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -242,7 +242,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -253,7 +253,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -264,7 +264,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -275,7 +275,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -286,7 +286,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -297,7 +297,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -308,7 +308,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteData.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteData.java index 323ae73a6..6e0b07910 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteData.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteData.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteData.Builder.class) public final class RemoteData { private final String path; @@ -76,7 +77,7 @@ public static PathStage builder() { } public interface PathStage { - _FinalStage path(String path); + _FinalStage path(@NotNull String path); Builder from(RemoteData other); } @@ -113,14 +114,14 @@ public Builder from(RemoteData other) { */ @java.lang.Override @JsonSetter("path") - public _FinalStage path(String path) { + public _FinalStage path(@NotNull String path) { this.path = path; return this; } @java.lang.Override public _FinalStage data(JsonNode data) { - this.data = Optional.of(data); + this.data = Optional.ofNullable(data); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteEndpointInfo.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteEndpointInfo.java index e5849638b..6039ca289 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteEndpointInfo.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteEndpointInfo.java @@ -18,8 +18,9 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteEndpointInfo.Builder.class) public final class RemoteEndpointInfo { private final String method; @@ -88,13 +89,13 @@ public static MethodStage builder() { } public interface MethodStage { - UrlPathStage method(String method); + UrlPathStage method(@NotNull String method); Builder from(RemoteEndpointInfo other); } public interface UrlPathStage { - _FinalStage urlPath(String urlPath); + _FinalStage urlPath(@NotNull String urlPath); } public interface _FinalStage { @@ -130,14 +131,14 @@ public Builder from(RemoteEndpointInfo other) { @java.lang.Override @JsonSetter("method") - public UrlPathStage method(String method) { + public UrlPathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("url_path") - public _FinalStage urlPath(String urlPath) { + public _FinalStage urlPath(@NotNull String urlPath) { this.urlPath = urlPath; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteField.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteField.java index e3278dcbd..de378894f 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteField.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteField.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteField.Builder.class) public final class RemoteField { private final RemoteFieldRemoteFieldClass remoteFieldClass; @@ -76,7 +77,7 @@ public static RemoteFieldClassStage builder() { } public interface RemoteFieldClassStage { - _FinalStage remoteFieldClass(RemoteFieldRemoteFieldClass remoteFieldClass); + _FinalStage remoteFieldClass(@NotNull RemoteFieldRemoteFieldClass remoteFieldClass); Builder from(RemoteField other); } @@ -109,14 +110,14 @@ public Builder from(RemoteField other) { @java.lang.Override @JsonSetter("remote_field_class") - public _FinalStage remoteFieldClass(RemoteFieldRemoteFieldClass remoteFieldClass) { + public _FinalStage remoteFieldClass(@NotNull RemoteFieldRemoteFieldClass remoteFieldClass) { this.remoteFieldClass = remoteFieldClass; return this; } @java.lang.Override public _FinalStage value(JsonNode value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApi.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApi.java index 06d67875c..024fef7e3 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApi.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApi.java @@ -19,8 +19,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApi.Builder.class) public final class RemoteFieldApi { private final Map schema; @@ -125,13 +126,13 @@ public static RemoteKeyNameStage builder() { } public interface RemoteKeyNameStage { - RemoteEndpointInfoStage remoteKeyName(String remoteKeyName); + RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName); Builder from(RemoteFieldApi other); } public interface RemoteEndpointInfoStage { - _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo); + _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo); } public interface _FinalStage { @@ -188,21 +189,21 @@ public Builder from(RemoteFieldApi other) { @java.lang.Override @JsonSetter("remote_key_name") - public RemoteEndpointInfoStage remoteKeyName(String remoteKeyName) { + public RemoteEndpointInfoStage remoteKeyName(@NotNull String remoteKeyName) { this.remoteKeyName = remoteKeyName; return this; } @java.lang.Override @JsonSetter("remote_endpoint_info") - public _FinalStage remoteEndpointInfo(RemoteEndpointInfo remoteEndpointInfo) { + public _FinalStage remoteEndpointInfo(@NotNull RemoteEndpointInfo remoteEndpointInfo) { this.remoteEndpointInfo = remoteEndpointInfo; return this; } @java.lang.Override public _FinalStage coverage(RemoteFieldApiCoverage coverage) { - this.coverage = Optional.of(coverage); + this.coverage = Optional.ofNullable(coverage); return this; } @@ -215,7 +216,7 @@ public _FinalStage coverage(Optional coverage) { @java.lang.Override public _FinalStage advancedMetadata(AdvancedMetadata advancedMetadata) { - this.advancedMetadata = Optional.of(advancedMetadata); + this.advancedMetadata = Optional.ofNullable(advancedMetadata); return this; } @@ -228,7 +229,7 @@ public _FinalStage advancedMetadata(Optional advancedMetadata) @java.lang.Override public _FinalStage exampleValues(List exampleValues) { - this.exampleValues = Optional.of(exampleValues); + this.exampleValues = Optional.ofNullable(exampleValues); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApiResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApiResponse.java index adc4abcfd..b9cee4146 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApiResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldApiResponse.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldApiResponse.Builder.class) public final class RemoteFieldApiResponse { private final Optional> ticket; @@ -228,7 +228,7 @@ public Builder ticket(Optional> ticket) { } public Builder ticket(List ticket) { - this.ticket = Optional.of(ticket); + this.ticket = Optional.ofNullable(ticket); return this; } @@ -239,7 +239,7 @@ public Builder comment(Optional> comment) { } public Builder comment(List comment) { - this.comment = Optional.of(comment); + this.comment = Optional.ofNullable(comment); return this; } @@ -250,7 +250,7 @@ public Builder project(Optional> project) { } public Builder project(List project) { - this.project = Optional.of(project); + this.project = Optional.ofNullable(project); return this; } @@ -261,7 +261,7 @@ public Builder collection(Optional> collection) { } public Builder collection(List collection) { - this.collection = Optional.of(collection); + this.collection = Optional.ofNullable(collection); return this; } @@ -272,7 +272,7 @@ public Builder user(Optional> user) { } public Builder user(List user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } @@ -283,7 +283,7 @@ public Builder role(Optional> role) { } public Builder role(List role) { - this.role = Optional.of(role); + this.role = Optional.ofNullable(role); return this; } @@ -294,7 +294,7 @@ public Builder account(Optional> account) { } public Builder account(List account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -305,7 +305,7 @@ public Builder team(Optional> team) { } public Builder team(List team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -316,7 +316,7 @@ public Builder attachment(Optional> attachment) { } public Builder attachment(List attachment) { - this.attachment = Optional.of(attachment); + this.attachment = Optional.ofNullable(attachment); return this; } @@ -327,7 +327,7 @@ public Builder tag(Optional> tag) { } public Builder tag(List tag) { - this.tag = Optional.of(tag); + this.tag = Optional.ofNullable(tag); return this; } @@ -338,7 +338,7 @@ public Builder contact(Optional> contact) { } public Builder contact(List contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClass.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClass.java index a1483fe2d..207e7f3b8 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClass.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClass.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldClass.Builder.class) public final class RemoteFieldClass { private final Optional id; @@ -214,7 +214,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -225,7 +225,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } @@ -236,7 +236,7 @@ public Builder remoteKeyName(Optional remoteKeyName) { } public Builder remoteKeyName(String remoteKeyName) { - this.remoteKeyName = Optional.of(remoteKeyName); + this.remoteKeyName = Optional.ofNullable(remoteKeyName); return this; } @@ -247,7 +247,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -258,7 +258,7 @@ public Builder isCustom(Optional isCustom) { } public Builder isCustom(Boolean isCustom) { - this.isCustom = Optional.of(isCustom); + this.isCustom = Optional.ofNullable(isCustom); return this; } @@ -269,7 +269,7 @@ public Builder isRequired(Optional isRequired) { } public Builder isRequired(Boolean isRequired) { - this.isRequired = Optional.of(isRequired); + this.isRequired = Optional.ofNullable(isRequired); return this; } @@ -280,7 +280,7 @@ public Builder fieldType(Optional fieldType) { } public Builder fieldType(RemoteFieldClassFieldType fieldType) { - this.fieldType = Optional.of(fieldType); + this.fieldType = Optional.ofNullable(fieldType); return this; } @@ -291,7 +291,7 @@ public Builder fieldFormat(Optional fieldFormat) { } public Builder fieldFormat(RemoteFieldClassFieldFormat fieldFormat) { - this.fieldFormat = Optional.of(fieldFormat); + this.fieldFormat = Optional.ofNullable(fieldFormat); return this; } @@ -302,7 +302,7 @@ public Builder fieldChoices(Optional> fie } public Builder fieldChoices(List fieldChoices) { - this.fieldChoices = Optional.of(fieldChoices); + this.fieldChoices = Optional.ofNullable(fieldChoices); return this; } @@ -313,7 +313,7 @@ public Builder itemSchema(Optional itemSchema) { } public Builder itemSchema(ItemSchema itemSchema) { - this.itemSchema = Optional.of(itemSchema); + this.itemSchema = Optional.ofNullable(itemSchema); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.java index b74d30a74..f3fa93b72 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldClassFieldChoicesItem.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldClassFieldChoicesItem.Builder.class) public final class RemoteFieldClassFieldChoicesItem { private final Optional value; @@ -97,7 +97,7 @@ public Builder value(Optional value) { } public Builder value(JsonNode value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } @@ -108,7 +108,7 @@ public Builder displayName(Optional displayName) { } public Builder displayName(String displayName) { - this.displayName = Optional.of(displayName); + this.displayName = Optional.ofNullable(displayName); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldRequest.java index c730742a7..6e53411b6 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteFieldRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteFieldRequest.Builder.class) public final class RemoteFieldRequest { private final RemoteFieldRequestRemoteFieldClass remoteFieldClass; @@ -75,7 +76,7 @@ public static RemoteFieldClassStage builder() { } public interface RemoteFieldClassStage { - _FinalStage remoteFieldClass(RemoteFieldRequestRemoteFieldClass remoteFieldClass); + _FinalStage remoteFieldClass(@NotNull RemoteFieldRequestRemoteFieldClass remoteFieldClass); Builder from(RemoteFieldRequest other); } @@ -108,14 +109,14 @@ public Builder from(RemoteFieldRequest other) { @java.lang.Override @JsonSetter("remote_field_class") - public _FinalStage remoteFieldClass(RemoteFieldRequestRemoteFieldClass remoteFieldClass) { + public _FinalStage remoteFieldClass(@NotNull RemoteFieldRequestRemoteFieldClass remoteFieldClass) { this.remoteFieldClass = remoteFieldClass; return this; } @java.lang.Override public _FinalStage value(String value) { - this.value = Optional.of(value); + this.value = Optional.ofNullable(value); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteKey.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteKey.java index c8f52885a..5b40af562 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteKey.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteKey.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteKey.Builder.class) public final class RemoteKey { private final String name; @@ -70,13 +71,13 @@ public static NameStage builder() { } public interface NameStage { - KeyStage name(String name); + KeyStage name(@NotNull String name); Builder from(RemoteKey other); } public interface KeyStage { - _FinalStage key(String key); + _FinalStage key(@NotNull String key); } public interface _FinalStage { @@ -103,14 +104,14 @@ public Builder from(RemoteKey other) { @java.lang.Override @JsonSetter("name") - public KeyStage name(String name) { + public KeyStage name(@NotNull String name) { this.name = name; return this; } @java.lang.Override @JsonSetter("key") - public _FinalStage key(String key) { + public _FinalStage key(@NotNull String key) { this.key = key; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/RemoteResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/RemoteResponse.java index 28a6b7bc6..9a19c5fe5 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/RemoteResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/RemoteResponse.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = RemoteResponse.Builder.class) public final class RemoteResponse { private final String method; @@ -134,13 +135,13 @@ public static MethodStage builder() { } public interface MethodStage { - PathStage method(String method); + PathStage method(@NotNull String method); Builder from(RemoteResponse other); } public interface PathStage { - StatusStage path(String path); + StatusStage path(@NotNull String path); } public interface StatusStage { @@ -148,7 +149,7 @@ public interface StatusStage { } public interface ResponseStage { - _FinalStage response(JsonNode response); + _FinalStage response(@NotNull JsonNode response); } public interface _FinalStage { @@ -202,14 +203,14 @@ public Builder from(RemoteResponse other) { @java.lang.Override @JsonSetter("method") - public PathStage method(String method) { + public PathStage method(@NotNull String method) { this.method = method; return this; } @java.lang.Override @JsonSetter("path") - public StatusStage path(String path) { + public StatusStage path(@NotNull String path) { this.path = path; return this; } @@ -223,14 +224,14 @@ public ResponseStage status(int status) { @java.lang.Override @JsonSetter("response") - public _FinalStage response(JsonNode response) { + public _FinalStage response(@NotNull JsonNode response) { this.response = response; return this; } @java.lang.Override public _FinalStage headers(Map headers) { - this.headers = Optional.of(headers); + this.headers = Optional.ofNullable(headers); return this; } @@ -243,7 +244,7 @@ public _FinalStage headers(Optional> headers) { @java.lang.Override public _FinalStage responseType(ResponseTypeEnum responseType) { - this.responseType = Optional.of(responseType); + this.responseType = Optional.ofNullable(responseType); return this; } @@ -256,7 +257,7 @@ public _FinalStage responseType(Optional responseType) { @java.lang.Override public _FinalStage responseHeaders(Map responseHeaders) { - this.responseHeaders = Optional.of(responseHeaders); + this.responseHeaders = Optional.ofNullable(responseHeaders); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Role.java b/src/main/java/com/merge/api/resources/ticketing/types/Role.java index 26a61ccf7..6af4320c4 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Role.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Role.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Role.Builder.class) public final class Role { private final Optional id; @@ -242,7 +242,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -253,7 +253,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -264,7 +264,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -275,7 +275,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -286,7 +286,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -297,7 +297,7 @@ public Builder ticketActions(Optional>> tic } public Builder ticketActions(List> ticketActions) { - this.ticketActions = Optional.of(ticketActions); + this.ticketActions = Optional.ofNullable(ticketActions); return this; } @@ -308,7 +308,7 @@ public Builder ticketAccess(Optional ticketAccess) { } public Builder ticketAccess(RoleTicketAccess ticketAccess) { - this.ticketAccess = Optional.of(ticketAccess); + this.ticketAccess = Optional.ofNullable(ticketAccess); return this; } @@ -319,7 +319,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -330,7 +330,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -341,7 +341,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/SyncStatus.java b/src/main/java/com/merge/api/resources/ticketing/types/SyncStatus.java index 93aa2d6f8..2d4470222 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/SyncStatus.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/SyncStatus.java @@ -17,8 +17,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = SyncStatus.Builder.class) public final class SyncStatus { private final String modelName; @@ -134,17 +135,17 @@ public static ModelNameStage builder() { } public interface ModelNameStage { - ModelIdStage modelName(String modelName); + ModelIdStage modelName(@NotNull String modelName); Builder from(SyncStatus other); } public interface ModelIdStage { - StatusStage modelId(String modelId); + StatusStage modelId(@NotNull String modelId); } public interface StatusStage { - IsInitialSyncStage status(SyncStatusStatusEnum status); + IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status); } public interface IsInitialSyncStage { @@ -205,21 +206,21 @@ public Builder from(SyncStatus other) { @java.lang.Override @JsonSetter("model_name") - public ModelIdStage modelName(String modelName) { + public ModelIdStage modelName(@NotNull String modelName) { this.modelName = modelName; return this; } @java.lang.Override @JsonSetter("model_id") - public StatusStage modelId(String modelId) { + public StatusStage modelId(@NotNull String modelId) { this.modelId = modelId; return this; } @java.lang.Override @JsonSetter("status") - public IsInitialSyncStage status(SyncStatusStatusEnum status) { + public IsInitialSyncStage status(@NotNull SyncStatusStatusEnum status) { this.status = status; return this; } @@ -234,7 +235,7 @@ public _FinalStage isInitialSync(boolean isInitialSync) { @java.lang.Override public _FinalStage selectiveSyncConfigurationsUsage( SelectiveSyncConfigurationsUsageEnum selectiveSyncConfigurationsUsage) { - this.selectiveSyncConfigurationsUsage = Optional.of(selectiveSyncConfigurationsUsage); + this.selectiveSyncConfigurationsUsage = Optional.ofNullable(selectiveSyncConfigurationsUsage); return this; } @@ -248,7 +249,7 @@ public _FinalStage selectiveSyncConfigurationsUsage( @java.lang.Override public _FinalStage nextSyncStart(OffsetDateTime nextSyncStart) { - this.nextSyncStart = Optional.of(nextSyncStart); + this.nextSyncStart = Optional.ofNullable(nextSyncStart); return this; } @@ -261,7 +262,7 @@ public _FinalStage nextSyncStart(Optional nextSyncStart) { @java.lang.Override public _FinalStage lastSyncStart(OffsetDateTime lastSyncStart) { - this.lastSyncStart = Optional.of(lastSyncStart); + this.lastSyncStart = Optional.ofNullable(lastSyncStart); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Tag.java b/src/main/java/com/merge/api/resources/ticketing/types/Tag.java index 9f445b9b4..098475f76 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Tag.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Tag.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Tag.Builder.class) public final class Tag { private final Optional remoteId; @@ -203,7 +203,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -214,7 +214,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -225,7 +225,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -236,7 +236,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -247,7 +247,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -258,7 +258,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -269,7 +269,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -280,7 +280,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Team.java b/src/main/java/com/merge/api/resources/ticketing/types/Team.java index f93396e37..7f45a23a7 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Team.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Team.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Team.Builder.class) public final class Team { private final Optional id; @@ -220,7 +220,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -231,7 +231,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -242,7 +242,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -253,7 +253,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -264,7 +264,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -275,7 +275,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -286,7 +286,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -297,7 +297,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -308,7 +308,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Ticket.java b/src/main/java/com/merge/api/resources/ticketing/types/Ticket.java index d9c67e5d5..561dee691 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Ticket.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Ticket.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Ticket.Builder.class) public final class Ticket { private final Optional id; @@ -543,7 +543,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -554,7 +554,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -565,7 +565,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -576,7 +576,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -587,7 +587,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -598,7 +598,7 @@ public Builder assignees(Optional>> assignees } public Builder assignees(List> assignees) { - this.assignees = Optional.of(assignees); + this.assignees = Optional.ofNullable(assignees); return this; } @@ -609,7 +609,7 @@ public Builder assignedTeams(Optional>> a } public Builder assignedTeams(List> assignedTeams) { - this.assignedTeams = Optional.of(assignedTeams); + this.assignedTeams = Optional.ofNullable(assignedTeams); return this; } @@ -620,7 +620,7 @@ public Builder creator(Optional creator) { } public Builder creator(TicketCreator creator) { - this.creator = Optional.of(creator); + this.creator = Optional.ofNullable(creator); return this; } @@ -631,7 +631,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -642,7 +642,7 @@ public Builder status(Optional status) { } public Builder status(TicketStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -653,7 +653,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -664,7 +664,7 @@ public Builder collections(Optional>> colle } public Builder collections(List> collections) { - this.collections = Optional.of(collections); + this.collections = Optional.ofNullable(collections); return this; } @@ -675,7 +675,7 @@ public Builder ticketType(Optional ticketType) { } public Builder ticketType(String ticketType) { - this.ticketType = Optional.of(ticketType); + this.ticketType = Optional.ofNullable(ticketType); return this; } @@ -686,7 +686,7 @@ public Builder account(Optional account) { } public Builder account(TicketAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -697,7 +697,7 @@ public Builder contact(Optional contact) { } public Builder contact(TicketContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -708,7 +708,7 @@ public Builder parentTicket(Optional parentTicket) { } public Builder parentTicket(TicketParentTicket parentTicket) { - this.parentTicket = Optional.of(parentTicket); + this.parentTicket = Optional.ofNullable(parentTicket); return this; } @@ -719,7 +719,7 @@ public Builder attachments(Optional>> attac } public Builder attachments(List> attachments) { - this.attachments = Optional.of(attachments); + this.attachments = Optional.ofNullable(attachments); return this; } @@ -730,7 +730,7 @@ public Builder tags(Optional>> tags) { } public Builder tags(List> tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } @@ -741,7 +741,7 @@ public Builder roles(Optional>> roles) { } public Builder roles(List> roles) { - this.roles = Optional.of(roles); + this.roles = Optional.ofNullable(roles); return this; } @@ -752,7 +752,7 @@ public Builder remoteCreatedAt(Optional remoteCreatedAt) { } public Builder remoteCreatedAt(OffsetDateTime remoteCreatedAt) { - this.remoteCreatedAt = Optional.of(remoteCreatedAt); + this.remoteCreatedAt = Optional.ofNullable(remoteCreatedAt); return this; } @@ -763,7 +763,7 @@ public Builder remoteUpdatedAt(Optional remoteUpdatedAt) { } public Builder remoteUpdatedAt(OffsetDateTime remoteUpdatedAt) { - this.remoteUpdatedAt = Optional.of(remoteUpdatedAt); + this.remoteUpdatedAt = Optional.ofNullable(remoteUpdatedAt); return this; } @@ -774,7 +774,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } @@ -785,7 +785,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -796,7 +796,7 @@ public Builder ticketUrl(Optional ticketUrl) { } public Builder ticketUrl(String ticketUrl) { - this.ticketUrl = Optional.of(ticketUrl); + this.ticketUrl = Optional.ofNullable(ticketUrl); return this; } @@ -807,7 +807,7 @@ public Builder priority(Optional priority) { } public Builder priority(TicketPriority priority) { - this.priority = Optional.of(priority); + this.priority = Optional.ofNullable(priority); return this; } @@ -818,7 +818,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -829,7 +829,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } @@ -840,7 +840,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/TicketRequest.java b/src/main/java/com/merge/api/resources/ticketing/types/TicketRequest.java index 744619cef..122774387 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/TicketRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/TicketRequest.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketRequest.Builder.class) public final class TicketRequest { private final Optional name; @@ -427,7 +427,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -438,7 +438,7 @@ public Builder assignees(Optional>> as } public Builder assignees(List> assignees) { - this.assignees = Optional.of(assignees); + this.assignees = Optional.ofNullable(assignees); return this; } @@ -449,7 +449,7 @@ public Builder assignedTeams(Optional> assignedTeams) { - this.assignedTeams = Optional.of(assignedTeams); + this.assignedTeams = Optional.ofNullable(assignedTeams); return this; } @@ -460,7 +460,7 @@ public Builder creator(Optional creator) { } public Builder creator(TicketRequestCreator creator) { - this.creator = Optional.of(creator); + this.creator = Optional.ofNullable(creator); return this; } @@ -471,7 +471,7 @@ public Builder dueDate(Optional dueDate) { } public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = Optional.of(dueDate); + this.dueDate = Optional.ofNullable(dueDate); return this; } @@ -482,7 +482,7 @@ public Builder status(Optional status) { } public Builder status(TicketRequestStatus status) { - this.status = Optional.of(status); + this.status = Optional.ofNullable(status); return this; } @@ -493,7 +493,7 @@ public Builder description(Optional description) { } public Builder description(String description) { - this.description = Optional.of(description); + this.description = Optional.ofNullable(description); return this; } @@ -504,7 +504,7 @@ public Builder collections(Optional> } public Builder collections(List> collections) { - this.collections = Optional.of(collections); + this.collections = Optional.ofNullable(collections); return this; } @@ -515,7 +515,7 @@ public Builder ticketType(Optional ticketType) { } public Builder ticketType(String ticketType) { - this.ticketType = Optional.of(ticketType); + this.ticketType = Optional.ofNullable(ticketType); return this; } @@ -526,7 +526,7 @@ public Builder account(Optional account) { } public Builder account(TicketRequestAccount account) { - this.account = Optional.of(account); + this.account = Optional.ofNullable(account); return this; } @@ -537,7 +537,7 @@ public Builder contact(Optional contact) { } public Builder contact(TicketRequestContact contact) { - this.contact = Optional.of(contact); + this.contact = Optional.ofNullable(contact); return this; } @@ -548,7 +548,7 @@ public Builder parentTicket(Optional parentTicket) { } public Builder parentTicket(TicketRequestParentTicket parentTicket) { - this.parentTicket = Optional.of(parentTicket); + this.parentTicket = Optional.ofNullable(parentTicket); return this; } @@ -559,7 +559,7 @@ public Builder attachments(Optional> } public Builder attachments(List> attachments) { - this.attachments = Optional.of(attachments); + this.attachments = Optional.ofNullable(attachments); return this; } @@ -570,7 +570,7 @@ public Builder tags(Optional>> tags) { } public Builder tags(List> tags) { - this.tags = Optional.of(tags); + this.tags = Optional.ofNullable(tags); return this; } @@ -581,7 +581,7 @@ public Builder roles(Optional>> roles) { } public Builder roles(List> roles) { - this.roles = Optional.of(roles); + this.roles = Optional.ofNullable(roles); return this; } @@ -592,7 +592,7 @@ public Builder completedAt(Optional completedAt) { } public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = Optional.of(completedAt); + this.completedAt = Optional.ofNullable(completedAt); return this; } @@ -603,7 +603,7 @@ public Builder ticketUrl(Optional ticketUrl) { } public Builder ticketUrl(String ticketUrl) { - this.ticketUrl = Optional.of(ticketUrl); + this.ticketUrl = Optional.ofNullable(ticketUrl); return this; } @@ -614,7 +614,7 @@ public Builder priority(Optional priority) { } public Builder priority(TicketRequestPriority priority) { - this.priority = Optional.of(priority); + this.priority = Optional.ofNullable(priority); return this; } @@ -625,7 +625,7 @@ public Builder integrationParams(Optional> integrationPara } public Builder integrationParams(Map integrationParams) { - this.integrationParams = Optional.of(integrationParams); + this.integrationParams = Optional.ofNullable(integrationParams); return this; } @@ -636,7 +636,7 @@ public Builder linkedAccountParams(Optional> linkedAccount } public Builder linkedAccountParams(Map linkedAccountParams) { - this.linkedAccountParams = Optional.of(linkedAccountParams); + this.linkedAccountParams = Optional.ofNullable(linkedAccountParams); return this; } @@ -647,7 +647,7 @@ public Builder remoteFields(Optional> remoteFields) { } public Builder remoteFields(List remoteFields) { - this.remoteFields = Optional.of(remoteFields); + this.remoteFields = Optional.ofNullable(remoteFields); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/TicketResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/TicketResponse.java index 2ddef4647..0f992b525 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/TicketResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/TicketResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketResponse.Builder.class) public final class TicketResponse { private final Ticket model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Ticket model); + _FinalStage model(@NotNull Ticket model); Builder from(TicketResponse other); } @@ -149,14 +150,14 @@ public Builder from(TicketResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Ticket model) { + public _FinalStage model(@NotNull Ticket model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/TicketingAttachmentResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/TicketingAttachmentResponse.java index 1fa01fecc..99cc7a95b 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/TicketingAttachmentResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/TicketingAttachmentResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketingAttachmentResponse.Builder.class) public final class TicketingAttachmentResponse { private final Attachment model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Attachment model); + _FinalStage model(@NotNull Attachment model); Builder from(TicketingAttachmentResponse other); } @@ -149,14 +150,14 @@ public Builder from(TicketingAttachmentResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Attachment model) { + public _FinalStage model(@NotNull Attachment model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/TicketingContactResponse.java b/src/main/java/com/merge/api/resources/ticketing/types/TicketingContactResponse.java index e3d921c68..a0bac2082 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/TicketingContactResponse.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/TicketingContactResponse.java @@ -18,8 +18,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = TicketingContactResponse.Builder.class) public final class TicketingContactResponse { private final Contact model; @@ -98,7 +99,7 @@ public static ModelStage builder() { } public interface ModelStage { - _FinalStage model(Contact model); + _FinalStage model(@NotNull Contact model); Builder from(TicketingContactResponse other); } @@ -149,14 +150,14 @@ public Builder from(TicketingContactResponse other) { @java.lang.Override @JsonSetter("model") - public _FinalStage model(Contact model) { + public _FinalStage model(@NotNull Contact model) { this.model = model; return this; } @java.lang.Override public _FinalStage logs(List logs) { - this.logs = Optional.of(logs); + this.logs = Optional.ofNullable(logs); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/User.java b/src/main/java/com/merge/api/resources/ticketing/types/User.java index 262020cfe..d8f1a4405 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/User.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/User.java @@ -20,7 +20,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = User.Builder.class) public final class User { private final Optional id; @@ -282,7 +282,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -293,7 +293,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -304,7 +304,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -315,7 +315,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -326,7 +326,7 @@ public Builder name(Optional name) { } public Builder name(String name) { - this.name = Optional.of(name); + this.name = Optional.ofNullable(name); return this; } @@ -337,7 +337,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -348,7 +348,7 @@ public Builder isActive(Optional isActive) { } public Builder isActive(Boolean isActive) { - this.isActive = Optional.of(isActive); + this.isActive = Optional.ofNullable(isActive); return this; } @@ -359,7 +359,7 @@ public Builder teams(Optional>> teams) { } public Builder teams(List> teams) { - this.teams = Optional.of(teams); + this.teams = Optional.ofNullable(teams); return this; } @@ -370,7 +370,7 @@ public Builder roles(Optional>> roles) { } public Builder roles(List> roles) { - this.roles = Optional.of(roles); + this.roles = Optional.ofNullable(roles); return this; } @@ -381,7 +381,7 @@ public Builder avatar(Optional avatar) { } public Builder avatar(String avatar) { - this.avatar = Optional.of(avatar); + this.avatar = Optional.ofNullable(avatar); return this; } @@ -392,7 +392,7 @@ public Builder remoteWasDeleted(Optional remoteWasDeleted) { } public Builder remoteWasDeleted(Boolean remoteWasDeleted) { - this.remoteWasDeleted = Optional.of(remoteWasDeleted); + this.remoteWasDeleted = Optional.ofNullable(remoteWasDeleted); return this; } @@ -403,7 +403,7 @@ public Builder fieldMappings(Optional> fieldMappings) { } public Builder fieldMappings(Map fieldMappings) { - this.fieldMappings = Optional.of(fieldMappings); + this.fieldMappings = Optional.ofNullable(fieldMappings); return this; } @@ -414,7 +414,7 @@ public Builder remoteData(Optional> remoteData) { } public Builder remoteData(List remoteData) { - this.remoteData = Optional.of(remoteData); + this.remoteData = Optional.ofNullable(remoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/ValidationProblemSource.java b/src/main/java/com/merge/api/resources/ticketing/types/ValidationProblemSource.java index 75aee07b5..a6476e550 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/ValidationProblemSource.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/ValidationProblemSource.java @@ -14,8 +14,9 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = ValidationProblemSource.Builder.class) public final class ValidationProblemSource { private final String pointer; @@ -62,7 +63,7 @@ public static PointerStage builder() { } public interface PointerStage { - _FinalStage pointer(String pointer); + _FinalStage pointer(@NotNull String pointer); Builder from(ValidationProblemSource other); } @@ -88,7 +89,7 @@ public Builder from(ValidationProblemSource other) { @java.lang.Override @JsonSetter("pointer") - public _FinalStage pointer(String pointer) { + public _FinalStage pointer(@NotNull String pointer) { this.pointer = pointer; return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/Viewer.java b/src/main/java/com/merge/api/resources/ticketing/types/Viewer.java index 53a2e3a64..94c69cba2 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/Viewer.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/Viewer.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = Viewer.Builder.class) public final class Viewer { private final Optional id; @@ -167,7 +167,7 @@ public Builder id(Optional id) { } public Builder id(String id) { - this.id = Optional.of(id); + this.id = Optional.ofNullable(id); return this; } @@ -178,7 +178,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } @@ -189,7 +189,7 @@ public Builder createdAt(Optional createdAt) { } public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = Optional.of(createdAt); + this.createdAt = Optional.ofNullable(createdAt); return this; } @@ -200,7 +200,7 @@ public Builder modifiedAt(Optional modifiedAt) { } public Builder modifiedAt(OffsetDateTime modifiedAt) { - this.modifiedAt = Optional.of(modifiedAt); + this.modifiedAt = Optional.ofNullable(modifiedAt); return this; } @@ -211,7 +211,7 @@ public Builder team(Optional team) { } public Builder team(ViewerTeam team) { - this.team = Optional.of(team); + this.team = Optional.ofNullable(team); return this; } @@ -222,7 +222,7 @@ public Builder user(Optional user) { } public Builder user(ViewerUser user) { - this.user = Optional.of(user); + this.user = Optional.ofNullable(user); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/WarningValidationProblem.java b/src/main/java/com/merge/api/resources/ticketing/types/WarningValidationProblem.java index 58692dcd5..34b6b0325 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/WarningValidationProblem.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/WarningValidationProblem.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WarningValidationProblem.Builder.class) public final class WarningValidationProblem { private final Optional source; @@ -96,17 +97,17 @@ public static TitleStage builder() { } public interface TitleStage { - DetailStage title(String title); + DetailStage title(@NotNull String title); Builder from(WarningValidationProblem other); } public interface DetailStage { - ProblemTypeStage detail(String detail); + ProblemTypeStage detail(@NotNull String detail); } public interface ProblemTypeStage { - _FinalStage problemType(String problemType); + _FinalStage problemType(@NotNull String problemType); } public interface _FinalStage { @@ -143,28 +144,28 @@ public Builder from(WarningValidationProblem other) { @java.lang.Override @JsonSetter("title") - public DetailStage title(String title) { + public DetailStage title(@NotNull String title) { this.title = title; return this; } @java.lang.Override @JsonSetter("detail") - public ProblemTypeStage detail(String detail) { + public ProblemTypeStage detail(@NotNull String detail) { this.detail = detail; return this; } @java.lang.Override @JsonSetter("problem_type") - public _FinalStage problemType(String problemType) { + public _FinalStage problemType(@NotNull String problemType) { this.problemType = problemType; return this; } @java.lang.Override public _FinalStage source(ValidationProblemSource source) { - this.source = Optional.of(source); + this.source = Optional.ofNullable(source); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/types/WebhookReceiver.java b/src/main/java/com/merge/api/resources/ticketing/types/WebhookReceiver.java index 94c6ac874..f010160d9 100644 --- a/src/main/java/com/merge/api/resources/ticketing/types/WebhookReceiver.java +++ b/src/main/java/com/merge/api/resources/ticketing/types/WebhookReceiver.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiver.Builder.class) public final class WebhookReceiver { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiver other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiver other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/users/UsersClient.java b/src/main/java/com/merge/api/resources/ticketing/users/UsersClient.java index 62d464255..188326cb9 100644 --- a/src/main/java/com/merge/api/resources/ticketing/users/UsersClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/users/UsersClient.java @@ -96,7 +96,8 @@ public PaginatedUserList list(UsersListRequest request, RequestOptions requestOp .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -117,13 +118,6 @@ public PaginatedUserList list(UsersListRequest request, RequestOptions requestOp } } - /** - * Returns a User object with the given id. - */ - public User retrieve(String id) { - return retrieve(id, UsersRetrieveRequest.builder().build()); - } - /** * Returns a User object with the given id. */ @@ -150,7 +144,8 @@ public User retrieve(String id, UsersRetrieveRequest request, RequestOptions req .url(httpUrl.build()) .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) - .addHeader("Content-Type", "application/json"); + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json"); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersListRequest.java b/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersListRequest.java index 779140aec..cc151fad4 100644 --- a/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersListRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersListRequest.java @@ -19,7 +19,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersListRequest.Builder.class) public final class UsersListRequest { private final Optional createdAfter; @@ -279,7 +279,7 @@ public Builder createdAfter(Optional createdAfter) { } public Builder createdAfter(OffsetDateTime createdAfter) { - this.createdAfter = Optional.of(createdAfter); + this.createdAfter = Optional.ofNullable(createdAfter); return this; } @@ -290,7 +290,7 @@ public Builder createdBefore(Optional createdBefore) { } public Builder createdBefore(OffsetDateTime createdBefore) { - this.createdBefore = Optional.of(createdBefore); + this.createdBefore = Optional.ofNullable(createdBefore); return this; } @@ -301,7 +301,7 @@ public Builder cursor(Optional cursor) { } public Builder cursor(String cursor) { - this.cursor = Optional.of(cursor); + this.cursor = Optional.ofNullable(cursor); return this; } @@ -312,7 +312,7 @@ public Builder emailAddress(Optional emailAddress) { } public Builder emailAddress(String emailAddress) { - this.emailAddress = Optional.of(emailAddress); + this.emailAddress = Optional.ofNullable(emailAddress); return this; } @@ -323,7 +323,7 @@ public Builder expand(Optional expand) { } public Builder expand(UsersListRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -334,7 +334,7 @@ public Builder includeDeletedData(Optional includeDeletedData) { } public Builder includeDeletedData(Boolean includeDeletedData) { - this.includeDeletedData = Optional.of(includeDeletedData); + this.includeDeletedData = Optional.ofNullable(includeDeletedData); return this; } @@ -345,7 +345,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } @@ -356,7 +356,7 @@ public Builder includeShellData(Optional includeShellData) { } public Builder includeShellData(Boolean includeShellData) { - this.includeShellData = Optional.of(includeShellData); + this.includeShellData = Optional.ofNullable(includeShellData); return this; } @@ -367,7 +367,7 @@ public Builder modifiedAfter(Optional modifiedAfter) { } public Builder modifiedAfter(OffsetDateTime modifiedAfter) { - this.modifiedAfter = Optional.of(modifiedAfter); + this.modifiedAfter = Optional.ofNullable(modifiedAfter); return this; } @@ -378,7 +378,7 @@ public Builder modifiedBefore(Optional modifiedBefore) { } public Builder modifiedBefore(OffsetDateTime modifiedBefore) { - this.modifiedBefore = Optional.of(modifiedBefore); + this.modifiedBefore = Optional.ofNullable(modifiedBefore); return this; } @@ -389,7 +389,7 @@ public Builder pageSize(Optional pageSize) { } public Builder pageSize(Integer pageSize) { - this.pageSize = Optional.of(pageSize); + this.pageSize = Optional.ofNullable(pageSize); return this; } @@ -400,7 +400,7 @@ public Builder remoteId(Optional remoteId) { } public Builder remoteId(String remoteId) { - this.remoteId = Optional.of(remoteId); + this.remoteId = Optional.ofNullable(remoteId); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersRetrieveRequest.java b/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersRetrieveRequest.java index e66b128ee..1d7296763 100644 --- a/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersRetrieveRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/users/requests/UsersRetrieveRequest.java @@ -18,7 +18,7 @@ import java.util.Objects; import java.util.Optional; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = UsersRetrieveRequest.Builder.class) public final class UsersRetrieveRequest { private final Optional expand; @@ -105,7 +105,7 @@ public Builder expand(Optional expand) { } public Builder expand(UsersRetrieveRequestExpand expand) { - this.expand = Optional.of(expand); + this.expand = Optional.ofNullable(expand); return this; } @@ -116,7 +116,7 @@ public Builder includeRemoteData(Optional includeRemoteData) { } public Builder includeRemoteData(Boolean includeRemoteData) { - this.includeRemoteData = Optional.of(includeRemoteData); + this.includeRemoteData = Optional.ofNullable(includeRemoteData); return this; } diff --git a/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/WebhookReceiversClient.java b/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/WebhookReceiversClient.java index 93b5e1c19..875ae6e08 100644 --- a/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/WebhookReceiversClient.java +++ b/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/WebhookReceiversClient.java @@ -50,6 +50,7 @@ public List list(RequestOptions requestOptions) { .method("GET", null) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { @@ -98,6 +99,7 @@ public WebhookReceiver create(WebhookReceiverRequest request, RequestOptions req .method("POST", body) .headers(Headers.of(clientOptions.headers(requestOptions))) .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") .build(); OkHttpClient client = clientOptions.httpClient(); if (requestOptions != null && requestOptions.getTimeout().isPresent()) { diff --git a/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/requests/WebhookReceiverRequest.java b/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/requests/WebhookReceiverRequest.java index 94d743d5d..c77117fdf 100644 --- a/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/requests/WebhookReceiverRequest.java +++ b/src/main/java/com/merge/api/resources/ticketing/webhookreceivers/requests/WebhookReceiverRequest.java @@ -16,8 +16,9 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.jetbrains.annotations.NotNull; -@JsonInclude(JsonInclude.Include.NON_EMPTY) +@JsonInclude(JsonInclude.Include.NON_ABSENT) @JsonDeserialize(builder = WebhookReceiverRequest.Builder.class) public final class WebhookReceiverRequest { private final String event; @@ -81,7 +82,7 @@ public static EventStage builder() { } public interface EventStage { - IsActiveStage event(String event); + IsActiveStage event(@NotNull String event); Builder from(WebhookReceiverRequest other); } @@ -121,7 +122,7 @@ public Builder from(WebhookReceiverRequest other) { @java.lang.Override @JsonSetter("event") - public IsActiveStage event(String event) { + public IsActiveStage event(@NotNull String event) { this.event = event; return this; } @@ -135,7 +136,7 @@ public _FinalStage isActive(boolean isActive) { @java.lang.Override public _FinalStage key(String key) { - this.key = Optional.of(key); + this.key = Optional.ofNullable(key); return this; }