com.pulumi.azure.appinsights.outputs.StandardWebTestRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.appinsights.outputs;
import com.pulumi.azure.appinsights.outputs.StandardWebTestRequestHeader;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class StandardWebTestRequest {
/**
* @return The WebTest request body.
*
*/
private @Nullable String body;
/**
* @return Should the following of redirects be enabled? Defaults to `true`.
*
*/
private @Nullable Boolean followRedirectsEnabled;
/**
* @return One or more `header` blocks as defined above.
*
*/
private @Nullable List headers;
/**
* @return Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', and 'OPTIONS'. Defaults to `GET`.
*
*/
private @Nullable String httpVerb;
/**
* @return Should the parsing of dependend requests be enabled? Defaults to `true`.
*
*/
private @Nullable Boolean parseDependentRequestsEnabled;
/**
* @return The WebTest request URL.
*
*/
private String url;
private StandardWebTestRequest() {}
/**
* @return The WebTest request body.
*
*/
public Optional body() {
return Optional.ofNullable(this.body);
}
/**
* @return Should the following of redirects be enabled? Defaults to `true`.
*
*/
public Optional followRedirectsEnabled() {
return Optional.ofNullable(this.followRedirectsEnabled);
}
/**
* @return One or more `header` blocks as defined above.
*
*/
public List headers() {
return this.headers == null ? List.of() : this.headers;
}
/**
* @return Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', and 'OPTIONS'. Defaults to `GET`.
*
*/
public Optional httpVerb() {
return Optional.ofNullable(this.httpVerb);
}
/**
* @return Should the parsing of dependend requests be enabled? Defaults to `true`.
*
*/
public Optional parseDependentRequestsEnabled() {
return Optional.ofNullable(this.parseDependentRequestsEnabled);
}
/**
* @return The WebTest request URL.
*
*/
public String url() {
return this.url;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(StandardWebTestRequest defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String body;
private @Nullable Boolean followRedirectsEnabled;
private @Nullable List headers;
private @Nullable String httpVerb;
private @Nullable Boolean parseDependentRequestsEnabled;
private String url;
public Builder() {}
public Builder(StandardWebTestRequest defaults) {
Objects.requireNonNull(defaults);
this.body = defaults.body;
this.followRedirectsEnabled = defaults.followRedirectsEnabled;
this.headers = defaults.headers;
this.httpVerb = defaults.httpVerb;
this.parseDependentRequestsEnabled = defaults.parseDependentRequestsEnabled;
this.url = defaults.url;
}
@CustomType.Setter
public Builder body(@Nullable String body) {
this.body = body;
return this;
}
@CustomType.Setter
public Builder followRedirectsEnabled(@Nullable Boolean followRedirectsEnabled) {
this.followRedirectsEnabled = followRedirectsEnabled;
return this;
}
@CustomType.Setter
public Builder headers(@Nullable List headers) {
this.headers = headers;
return this;
}
public Builder headers(StandardWebTestRequestHeader... headers) {
return headers(List.of(headers));
}
@CustomType.Setter
public Builder httpVerb(@Nullable String httpVerb) {
this.httpVerb = httpVerb;
return this;
}
@CustomType.Setter
public Builder parseDependentRequestsEnabled(@Nullable Boolean parseDependentRequestsEnabled) {
this.parseDependentRequestsEnabled = parseDependentRequestsEnabled;
return this;
}
@CustomType.Setter
public Builder url(String url) {
if (url == null) {
throw new MissingRequiredPropertyException("StandardWebTestRequest", "url");
}
this.url = url;
return this;
}
public StandardWebTestRequest build() {
final var _resultValue = new StandardWebTestRequest();
_resultValue.body = body;
_resultValue.followRedirectsEnabled = followRedirectsEnabled;
_resultValue.headers = headers;
_resultValue.httpVerb = httpVerb;
_resultValue.parseDependentRequestsEnabled = parseDependentRequestsEnabled;
_resultValue.url = url;
return _resultValue;
}
}
}