public EndpointSliceArgs build() {
            if ($.addressType == null) {
                throw new MissingRequiredPropertyException("EndpointSliceArgs", "addressType");
            }
            $.apiVersion = Codegen.stringProp("apiVersion").output().arg($.apiVersion).getNullable();
            if ($.endpoints == null) {
                throw new MissingRequiredPropertyException("EndpointSliceArgs", "endpoints");
            }
            $.kind = Codegen.stringProp("kind").output().arg($.kind).getNullable();
            return $;
        }
@param ports ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates &#34;all ports&#34;. Each slice may include a maximum of 100 ports.

@return builder
sdk/java/src/main/java/com/pulumi/kubernetes/discovery/v1beta1/EndpointSliceArgs.java