software.amazon.awscdk.services.ivs.alpha.PlaybackKeyPairProps Maven / Gradle / Ivy
Show all versions of ivs-alpha Show documentation
package software.amazon.awscdk.services.ivs.alpha;
/**
* (experimental) Properties for creating a new Playback Key Pair.
*
* Example:
*
*
* PlaybackKeyPair keyPair = PlaybackKeyPair.Builder.create(this, "PlaybackKeyPair")
* .publicKeyMaterial(myPublicKeyPemString)
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T10:56:42.151Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ivs.alpha.$Module.class, fqn = "@aws-cdk/aws-ivs-alpha.PlaybackKeyPairProps")
@software.amazon.jsii.Jsii.Proxy(PlaybackKeyPairProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface PlaybackKeyPairProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The public portion of a customer-generated key pair.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getPublicKeyMaterial();
/**
* (experimental) An arbitrary string (a nickname) assigned to a playback key pair that helps the customer identify that resource.
*
* The value does not need to be unique.
*
* Default: Automatically generated name
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getPlaybackKeyPairName() {
return null;
}
/**
* @return a {@link Builder} of {@link PlaybackKeyPairProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link PlaybackKeyPairProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String publicKeyMaterial;
java.lang.String playbackKeyPairName;
/**
* Sets the value of {@link PlaybackKeyPairProps#getPublicKeyMaterial}
* @param publicKeyMaterial The public portion of a customer-generated key pair. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder publicKeyMaterial(java.lang.String publicKeyMaterial) {
this.publicKeyMaterial = publicKeyMaterial;
return this;
}
/**
* Sets the value of {@link PlaybackKeyPairProps#getPlaybackKeyPairName}
* @param playbackKeyPairName An arbitrary string (a nickname) assigned to a playback key pair that helps the customer identify that resource.
* The value does not need to be unique.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder playbackKeyPairName(java.lang.String playbackKeyPairName) {
this.playbackKeyPairName = playbackKeyPairName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link PlaybackKeyPairProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public PlaybackKeyPairProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link PlaybackKeyPairProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PlaybackKeyPairProps {
private final java.lang.String publicKeyMaterial;
private final java.lang.String playbackKeyPairName;
/**
* 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.publicKeyMaterial = software.amazon.jsii.Kernel.get(this, "publicKeyMaterial", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.playbackKeyPairName = software.amazon.jsii.Kernel.get(this, "playbackKeyPairName", software.amazon.jsii.NativeType.forClass(java.lang.String.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.publicKeyMaterial = java.util.Objects.requireNonNull(builder.publicKeyMaterial, "publicKeyMaterial is required");
this.playbackKeyPairName = builder.playbackKeyPairName;
}
@Override
public final java.lang.String getPublicKeyMaterial() {
return this.publicKeyMaterial;
}
@Override
public final java.lang.String getPlaybackKeyPairName() {
return this.playbackKeyPairName;
}
@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("publicKeyMaterial", om.valueToTree(this.getPublicKeyMaterial()));
if (this.getPlaybackKeyPairName() != null) {
data.set("playbackKeyPairName", om.valueToTree(this.getPlaybackKeyPairName()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@aws-cdk/aws-ivs-alpha.PlaybackKeyPairProps"));
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;
PlaybackKeyPairProps.Jsii$Proxy that = (PlaybackKeyPairProps.Jsii$Proxy) o;
if (!publicKeyMaterial.equals(that.publicKeyMaterial)) return false;
return this.playbackKeyPairName != null ? this.playbackKeyPairName.equals(that.playbackKeyPairName) : that.playbackKeyPairName == null;
}
@Override
public final int hashCode() {
int result = this.publicKeyMaterial.hashCode();
result = 31 * result + (this.playbackKeyPairName != null ? this.playbackKeyPairName.hashCode() : 0);
return result;
}
}
}