com.pulumi.kubernetes.apiextensions.v1.outputs.WebhookConversion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.kubernetes.apiextensions.v1.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.apiextensions.v1.outputs.WebhookClientConfig;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class WebhookConversion {
/**
* @return clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
*
*/
private @Nullable WebhookClientConfig clientConfig;
/**
* @return conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
*
*/
private List conversionReviewVersions;
private WebhookConversion() {}
/**
* @return clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
*
*/
public Optional clientConfig() {
return Optional.ofNullable(this.clientConfig);
}
/**
* @return conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
*
*/
public List conversionReviewVersions() {
return this.conversionReviewVersions;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(WebhookConversion defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable WebhookClientConfig clientConfig;
private List conversionReviewVersions;
public Builder() {}
public Builder(WebhookConversion defaults) {
Objects.requireNonNull(defaults);
this.clientConfig = defaults.clientConfig;
this.conversionReviewVersions = defaults.conversionReviewVersions;
}
@CustomType.Setter
public Builder clientConfig(@Nullable WebhookClientConfig clientConfig) {
this.clientConfig = clientConfig;
return this;
}
@CustomType.Setter
public Builder conversionReviewVersions(List conversionReviewVersions) {
if (conversionReviewVersions == null) {
throw new MissingRequiredPropertyException("WebhookConversion", "conversionReviewVersions");
}
this.conversionReviewVersions = conversionReviewVersions;
return this;
}
public Builder conversionReviewVersions(String... conversionReviewVersions) {
return conversionReviewVersions(List.of(conversionReviewVersions));
}
public WebhookConversion build() {
final var _resultValue = new WebhookConversion();
_resultValue.clientConfig = clientConfig;
_resultValue.conversionReviewVersions = conversionReviewVersions;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy