Class V1EndpointSlice
java.lang.Object
io.kubernetes.client.openapi.models.V1EndpointSlice
- All Implemented Interfaces:
KubernetesObject
,KubernetesType
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-02-12T21:15:49.397498Z[Etc/UTC]",
comments="Generator version: 7.6.0")
public class V1EndpointSlice
extends Object
implements KubernetesObject
EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEndpointsItem
(V1Endpoint endpointsItem) addPortsItem
(DiscoveryV1EndpointPort portsItem) addressType
(String addressType) apiVersion
(String apiVersion) endpoints
(List<V1Endpoint> endpoints) boolean
static V1EndpointSlice
Create an instance of V1EndpointSlice given an JSON stringaddressType specifies the type of address carried by this EndpointSlice.APIVersion defines the versioned schema of this representation of an object.endpoints is a list of unique endpoints in this slice.getKind()
Kind is a string value representing the REST resource this object represents.Get metadatagetPorts()
ports specifies the list of network ports exposed by each endpoint in this slice.int
hashCode()
metadata
(V1ObjectMeta metadata) ports
(List<DiscoveryV1EndpointPort> ports) void
setAddressType
(String addressType) void
setApiVersion
(String apiVersion) void
setEndpoints
(List<V1Endpoint> endpoints) void
void
setMetadata
(V1ObjectMeta metadata) void
setPorts
(List<DiscoveryV1EndpointPort> ports) toJson()
Convert an instance of V1EndpointSlice to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_ADDRESS_TYPE
- See Also:
-
SERIALIZED_NAME_API_VERSION
- See Also:
-
SERIALIZED_NAME_ENDPOINTS
- See Also:
-
SERIALIZED_NAME_KIND
- See Also:
-
SERIALIZED_NAME_METADATA
- See Also:
-
SERIALIZED_NAME_PORTS
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1EndpointSlice
public V1EndpointSlice()
-
-
Method Details
-
addressType
-
getAddressType
addressType specifies the type of address carried by this EndpointSlice. All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.- Returns:
- addressType
-
setAddressType
-
apiVersion
-
getApiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources- Specified by:
getApiVersion
in interfaceKubernetesType
- Returns:
- apiVersion
-
setApiVersion
-
endpoints
-
addEndpointsItem
-
getEndpoints
endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.- Returns:
- endpoints
-
setEndpoints
-
kind
-
getKind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds- Specified by:
getKind
in interfaceKubernetesType
- Returns:
- kind
-
setKind
-
metadata
-
getMetadata
Get metadata- Specified by:
getMetadata
in interfaceKubernetesObject
- Returns:
- metadata
-
setMetadata
-
ports
-
addPortsItem
-
getPorts
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 \"all ports\". Each slice may include a maximum of 100 ports.- Returns:
- ports
-
setPorts
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to V1EndpointSlice
-
fromJson
Create an instance of V1EndpointSlice given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1EndpointSlice
- Throws:
IOException
- if the JSON string is invalid with respect to V1EndpointSlice
-
toJson
Convert an instance of V1EndpointSlice to an JSON string- Returns:
- JSON string
-