com.pepperize.cdk.github.GithubCustomResourceProps Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdk-github Show documentation
Show all versions of cdk-github Show documentation
Manage GitHub resources like repositories, teams, members, integrations and workflows with the AWS CDK as Custom Resources in CloudFormation with [cdk-github](https://github.com/pepperize/cdk-github).
package com.pepperize.cdk.github;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.97.0 (build 729de35)", date = "2024-06-03T23:55:30.191Z")
@software.amazon.jsii.Jsii(module = com.pepperize.cdk.github.$Module.class, fqn = "@pepperize/cdk-github.GithubCustomResourceProps")
@software.amazon.jsii.Jsii.Proxy(GithubCustomResourceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface GithubCustomResourceProps extends software.amazon.jsii.JsiiSerializable, com.pepperize.cdk.github.GithubCustomResourceOptions {
/**
* The GitHub Api call to make when the resource is created.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.github.GithubApiCall getOnCreate() {
return null;
}
/**
* The GitHub Api call to make when the resource is deleted.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.github.GithubApiCall getOnDelete() {
return null;
}
/**
* The GitHub Api call to make when the resource is updated.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.github.GithubApiCall getOnUpdate() {
return null;
}
/**
* Cloudformation Resource type.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getResourceType() {
return null;
}
/**
* @return a {@link Builder} of {@link GithubCustomResourceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link GithubCustomResourceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
com.pepperize.cdk.github.GithubApiCall onCreate;
com.pepperize.cdk.github.GithubApiCall onDelete;
com.pepperize.cdk.github.GithubApiCall onUpdate;
java.lang.String resourceType;
com.pepperize.cdk.github.IAuthOptions authOptions;
/**
* Sets the value of {@link GithubCustomResourceProps#getOnCreate}
* @param onCreate The GitHub Api call to make when the resource is created.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder onCreate(com.pepperize.cdk.github.GithubApiCall onCreate) {
this.onCreate = onCreate;
return this;
}
/**
* Sets the value of {@link GithubCustomResourceProps#getOnDelete}
* @param onDelete The GitHub Api call to make when the resource is deleted.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder onDelete(com.pepperize.cdk.github.GithubApiCall onDelete) {
this.onDelete = onDelete;
return this;
}
/**
* Sets the value of {@link GithubCustomResourceProps#getOnUpdate}
* @param onUpdate The GitHub Api call to make when the resource is updated.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder onUpdate(com.pepperize.cdk.github.GithubApiCall onUpdate) {
this.onUpdate = onUpdate;
return this;
}
/**
* Sets the value of {@link GithubCustomResourceProps#getResourceType}
* @param resourceType Cloudformation Resource type.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder resourceType(java.lang.String resourceType) {
this.resourceType = resourceType;
return this;
}
/**
* Sets the value of {@link GithubCustomResourceProps#getAuthOptions}
* @param authOptions Currently, supports only GitHub App. This parameter is required.
*
* const auth = { appId, privateKey };
* const installationAuth = { appId, privateKey, installationId };
*
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder authOptions(com.pepperize.cdk.github.IAuthOptions authOptions) {
this.authOptions = authOptions;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link GithubCustomResourceProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public GithubCustomResourceProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link GithubCustomResourceProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements GithubCustomResourceProps {
private final com.pepperize.cdk.github.GithubApiCall onCreate;
private final com.pepperize.cdk.github.GithubApiCall onDelete;
private final com.pepperize.cdk.github.GithubApiCall onUpdate;
private final java.lang.String resourceType;
private final com.pepperize.cdk.github.IAuthOptions authOptions;
/**
* 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.onCreate = software.amazon.jsii.Kernel.get(this, "onCreate", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.github.GithubApiCall.class));
this.onDelete = software.amazon.jsii.Kernel.get(this, "onDelete", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.github.GithubApiCall.class));
this.onUpdate = software.amazon.jsii.Kernel.get(this, "onUpdate", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.github.GithubApiCall.class));
this.resourceType = software.amazon.jsii.Kernel.get(this, "resourceType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.authOptions = software.amazon.jsii.Kernel.get(this, "authOptions", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.github.IAuthOptions.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.onCreate = builder.onCreate;
this.onDelete = builder.onDelete;
this.onUpdate = builder.onUpdate;
this.resourceType = builder.resourceType;
this.authOptions = java.util.Objects.requireNonNull(builder.authOptions, "authOptions is required");
}
@Override
public final com.pepperize.cdk.github.GithubApiCall getOnCreate() {
return this.onCreate;
}
@Override
public final com.pepperize.cdk.github.GithubApiCall getOnDelete() {
return this.onDelete;
}
@Override
public final com.pepperize.cdk.github.GithubApiCall getOnUpdate() {
return this.onUpdate;
}
@Override
public final java.lang.String getResourceType() {
return this.resourceType;
}
@Override
public final com.pepperize.cdk.github.IAuthOptions getAuthOptions() {
return this.authOptions;
}
@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();
if (this.getOnCreate() != null) {
data.set("onCreate", om.valueToTree(this.getOnCreate()));
}
if (this.getOnDelete() != null) {
data.set("onDelete", om.valueToTree(this.getOnDelete()));
}
if (this.getOnUpdate() != null) {
data.set("onUpdate", om.valueToTree(this.getOnUpdate()));
}
if (this.getResourceType() != null) {
data.set("resourceType", om.valueToTree(this.getResourceType()));
}
data.set("authOptions", om.valueToTree(this.getAuthOptions()));
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@pepperize/cdk-github.GithubCustomResourceProps"));
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;
GithubCustomResourceProps.Jsii$Proxy that = (GithubCustomResourceProps.Jsii$Proxy) o;
if (this.onCreate != null ? !this.onCreate.equals(that.onCreate) : that.onCreate != null) return false;
if (this.onDelete != null ? !this.onDelete.equals(that.onDelete) : that.onDelete != null) return false;
if (this.onUpdate != null ? !this.onUpdate.equals(that.onUpdate) : that.onUpdate != null) return false;
if (this.resourceType != null ? !this.resourceType.equals(that.resourceType) : that.resourceType != null) return false;
return this.authOptions.equals(that.authOptions);
}
@Override
public final int hashCode() {
int result = this.onCreate != null ? this.onCreate.hashCode() : 0;
result = 31 * result + (this.onDelete != null ? this.onDelete.hashCode() : 0);
result = 31 * result + (this.onUpdate != null ? this.onUpdate.hashCode() : 0);
result = 31 * result + (this.resourceType != null ? this.resourceType.hashCode() : 0);
result = 31 * result + (this.authOptions.hashCode());
return result;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy