mirror of
https://github.com/LukeHagar/plexjava.git
synced 2025-12-07 04:20:49 +00:00
64 lines
2.0 KiB
Java
64 lines
2.0 KiB
Java
/*
|
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
*/
|
|
|
|
package dev.plexapi.sdk.models.operations;
|
|
|
|
import dev.plexapi.sdk.utils.Options;
|
|
import dev.plexapi.sdk.utils.RetryConfig;
|
|
import dev.plexapi.sdk.utils.Utils;
|
|
import java.lang.String;
|
|
import java.util.Optional;
|
|
|
|
public class GetPinRequestBuilder {
|
|
|
|
private GetPinRequest request;
|
|
private Optional<String> serverURL = Optional.empty();
|
|
private Optional<RetryConfig> retryConfig = Optional.empty();
|
|
private final SDKMethodInterfaces.MethodCallGetPin sdk;
|
|
|
|
public GetPinRequestBuilder(SDKMethodInterfaces.MethodCallGetPin sdk) {
|
|
this.sdk = sdk;
|
|
}
|
|
|
|
public GetPinRequestBuilder request(GetPinRequest request) {
|
|
Utils.checkNotNull(request, "request");
|
|
this.request = request;
|
|
return this;
|
|
}
|
|
|
|
public GetPinRequestBuilder serverURL(String serverURL) {
|
|
Utils.checkNotNull(serverURL, "serverURL");
|
|
this.serverURL = Optional.of(serverURL);
|
|
return this;
|
|
}
|
|
|
|
public GetPinRequestBuilder serverURL(Optional<String> serverURL) {
|
|
Utils.checkNotNull(serverURL, "serverURL");
|
|
this.serverURL = serverURL;
|
|
return this;
|
|
}
|
|
|
|
public GetPinRequestBuilder retryConfig(RetryConfig retryConfig) {
|
|
Utils.checkNotNull(retryConfig, "retryConfig");
|
|
this.retryConfig = Optional.of(retryConfig);
|
|
return this;
|
|
}
|
|
|
|
public GetPinRequestBuilder retryConfig(Optional<RetryConfig> retryConfig) {
|
|
Utils.checkNotNull(retryConfig, "retryConfig");
|
|
this.retryConfig = retryConfig;
|
|
return this;
|
|
}
|
|
|
|
public GetPinResponse call() throws Exception {
|
|
Optional<Options> options = Optional.of(Options.builder()
|
|
.retryConfig(retryConfig)
|
|
.build());
|
|
return sdk.getPin(
|
|
request,
|
|
serverURL,
|
|
options);
|
|
}
|
|
}
|