
com.pulumi.azurenative.containerinstance.outputs.PortResponse 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.azurenative.containerinstance.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class PortResponse {
/**
* @return The port number.
*
*/
private Integer port;
/**
* @return The protocol associated with the port.
*
*/
private @Nullable String protocol;
private PortResponse() {}
/**
* @return The port number.
*
*/
public Integer port() {
return this.port;
}
/**
* @return The protocol associated with the port.
*
*/
public Optional protocol() {
return Optional.ofNullable(this.protocol);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(PortResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private Integer port;
private @Nullable String protocol;
public Builder() {}
public Builder(PortResponse defaults) {
Objects.requireNonNull(defaults);
this.port = defaults.port;
this.protocol = defaults.protocol;
}
@CustomType.Setter
public Builder port(Integer port) {
if (port == null) {
throw new MissingRequiredPropertyException("PortResponse", "port");
}
this.port = port;
return this;
}
@CustomType.Setter
public Builder protocol(@Nullable String protocol) {
this.protocol = protocol;
return this;
}
public PortResponse build() {
final var _resultValue = new PortResponse();
_resultValue.port = port;
_resultValue.protocol = protocol;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy