All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.integtests.alpha.AwsApiCallOptions Maven / Gradle / Ivy

There is a newer version: 2.169.0-alpha.0
Show newest version
package software.amazon.awscdk.integtests.alpha;

/**
 * (experimental) Options to perform an AWS JavaScript V2 API call.
 * 

* Example: *

*

 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import software.amazon.awscdk.integtests.alpha.*;
 * Object parameters;
 * AwsApiCallOptions awsApiCallOptions = AwsApiCallOptions.builder()
 *         .api("api")
 *         .service("service")
 *         // the properties below are optional
 *         .outputPaths(List.of("outputPaths"))
 *         .parameters(parameters)
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-04T00:39:41.559Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.integtests.alpha.$Module.class, fqn = "@aws-cdk/integ-tests-alpha.AwsApiCallOptions") @software.amazon.jsii.Jsii.Proxy(AwsApiCallOptions.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public interface AwsApiCallOptions extends software.amazon.jsii.JsiiSerializable { /** * (experimental) The api call to make, i.e. getBucketLifecycle. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getApi(); /** * (experimental) The AWS service, i.e. S3. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getService(); /** * (experimental) Restrict the data returned by the API call to specific paths in the API response. *

* Use this to limit the data returned by the custom * resource if working with API calls that could potentially result in custom * response objects exceeding the hard limit of 4096 bytes. *

* Default: - return all data */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getOutputPaths() { return null; } /** * (experimental) Any parameters to pass to the api call. *

* Default: - no parameters */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Object getParameters() { return null; } /** * @return a {@link Builder} of {@link AwsApiCallOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link AwsApiCallOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String api; java.lang.String service; java.util.List outputPaths; java.lang.Object parameters; /** * Sets the value of {@link AwsApiCallOptions#getApi} * @param api The api call to make, i.e. getBucketLifecycle. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder api(java.lang.String api) { this.api = api; return this; } /** * Sets the value of {@link AwsApiCallOptions#getService} * @param service The AWS service, i.e. S3. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder service(java.lang.String service) { this.service = service; return this; } /** * Sets the value of {@link AwsApiCallOptions#getOutputPaths} * @param outputPaths Restrict the data returned by the API call to specific paths in the API response. * Use this to limit the data returned by the custom * resource if working with API calls that could potentially result in custom * response objects exceeding the hard limit of 4096 bytes. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder outputPaths(java.util.List outputPaths) { this.outputPaths = outputPaths; return this; } /** * Sets the value of {@link AwsApiCallOptions#getParameters} * @param parameters Any parameters to pass to the api call. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder parameters(java.lang.Object parameters) { this.parameters = parameters; return this; } /** * Builds the configured instance. * @return a new instance of {@link AwsApiCallOptions} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public AwsApiCallOptions build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link AwsApiCallOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AwsApiCallOptions { private final java.lang.String api; private final java.lang.String service; private final java.util.List outputPaths; private final java.lang.Object parameters; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.api = software.amazon.jsii.Kernel.get(this, "api", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.service = software.amazon.jsii.Kernel.get(this, "service", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.outputPaths = software.amazon.jsii.Kernel.get(this, "outputPaths", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.parameters = software.amazon.jsii.Kernel.get(this, "parameters", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.api = java.util.Objects.requireNonNull(builder.api, "api is required"); this.service = java.util.Objects.requireNonNull(builder.service, "service is required"); this.outputPaths = builder.outputPaths; this.parameters = builder.parameters; } @Override public final java.lang.String getApi() { return this.api; } @Override public final java.lang.String getService() { return this.service; } @Override public final java.util.List getOutputPaths() { return this.outputPaths; } @Override public final java.lang.Object getParameters() { return this.parameters; } @Override @software.amazon.jsii.Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("api", om.valueToTree(this.getApi())); data.set("service", om.valueToTree(this.getService())); if (this.getOutputPaths() != null) { data.set("outputPaths", om.valueToTree(this.getOutputPaths())); } if (this.getParameters() != null) { data.set("parameters", om.valueToTree(this.getParameters())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/integ-tests-alpha.AwsApiCallOptions")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public final boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AwsApiCallOptions.Jsii$Proxy that = (AwsApiCallOptions.Jsii$Proxy) o; if (!api.equals(that.api)) return false; if (!service.equals(that.service)) return false; if (this.outputPaths != null ? !this.outputPaths.equals(that.outputPaths) : that.outputPaths != null) return false; return this.parameters != null ? this.parameters.equals(that.parameters) : that.parameters == null; } @Override public final int hashCode() { int result = this.api.hashCode(); result = 31 * result + (this.service.hashCode()); result = 31 * result + (this.outputPaths != null ? this.outputPaths.hashCode() : 0); result = 31 * result + (this.parameters != null ? this.parameters.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy