com.pulumi.azure.apimanagement.outputs.ApiDiagnosticBackendRequest Maven / Gradle / Ivy
// *** 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.apimanagement.outputs;
import com.pulumi.azure.apimanagement.outputs.ApiDiagnosticBackendRequestDataMasking;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ApiDiagnosticBackendRequest {
/**
* @return Number of payload bytes to log (up to 8192).
*
*/
private @Nullable Integer bodyBytes;
/**
* @return A `data_masking` block as defined below.
*
*/
private @Nullable ApiDiagnosticBackendRequestDataMasking dataMasking;
/**
* @return Specifies a list of headers to log.
*
*/
private @Nullable List headersToLogs;
private ApiDiagnosticBackendRequest() {}
/**
* @return Number of payload bytes to log (up to 8192).
*
*/
public Optional bodyBytes() {
return Optional.ofNullable(this.bodyBytes);
}
/**
* @return A `data_masking` block as defined below.
*
*/
public Optional dataMasking() {
return Optional.ofNullable(this.dataMasking);
}
/**
* @return Specifies a list of headers to log.
*
*/
public List headersToLogs() {
return this.headersToLogs == null ? List.of() : this.headersToLogs;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ApiDiagnosticBackendRequest defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable Integer bodyBytes;
private @Nullable ApiDiagnosticBackendRequestDataMasking dataMasking;
private @Nullable List headersToLogs;
public Builder() {}
public Builder(ApiDiagnosticBackendRequest defaults) {
Objects.requireNonNull(defaults);
this.bodyBytes = defaults.bodyBytes;
this.dataMasking = defaults.dataMasking;
this.headersToLogs = defaults.headersToLogs;
}
@CustomType.Setter
public Builder bodyBytes(@Nullable Integer bodyBytes) {
this.bodyBytes = bodyBytes;
return this;
}
@CustomType.Setter
public Builder dataMasking(@Nullable ApiDiagnosticBackendRequestDataMasking dataMasking) {
this.dataMasking = dataMasking;
return this;
}
@CustomType.Setter
public Builder headersToLogs(@Nullable List headersToLogs) {
this.headersToLogs = headersToLogs;
return this;
}
public Builder headersToLogs(String... headersToLogs) {
return headersToLogs(List.of(headersToLogs));
}
public ApiDiagnosticBackendRequest build() {
final var _resultValue = new ApiDiagnosticBackendRequest();
_resultValue.bodyBytes = bodyBytes;
_resultValue.dataMasking = dataMasking;
_resultValue.headersToLogs = headersToLogs;
return _resultValue;
}
}
}