Class V1ServicePort

java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1ServicePort

@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class V1ServicePort extends Object
ServicePort contains information on service's port.
  • Field Details

  • Constructor Details

    • V1ServicePort

      public V1ServicePort(Integer port)
  • Method Details

    • getAppProtocol

      public String getAppProtocol()
      The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.
      Returns:
      the appProtocol property value
    • setAppProtocol

      public void setAppProtocol(String appProtocol)
      Set the appProtocol property value
    • appProtocol

      public V1ServicePort appProtocol(String appProtocol)
      Set appProtocol in a chainable fashion.
      Returns:
      The same instance of V1ServicePort for chaining.
    • getName

      public String getName()
      The name of this port within the service. This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the 'name' field in the EndpointPort. Optional if only one ServicePort is defined on this service.
      Returns:
      the name property value
    • setName

      public void setName(String name)
      Set the name property value
    • name

      public V1ServicePort name(String name)
      Set name in a chainable fashion.
      Returns:
      The same instance of V1ServicePort for chaining.
    • getNodePort

      public Integer getNodePort()
      The port on each node on which this service is exposed when type is NodePort or LoadBalancer. Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
      Returns:
      the nodePort property value
    • setNodePort

      public void setNodePort(Integer nodePort)
      Set the nodePort property value
    • nodePort

      public V1ServicePort nodePort(Integer nodePort)
      Set nodePort in a chainable fashion.
      Returns:
      The same instance of V1ServicePort for chaining.
    • getPort

      public Integer getPort()
      The port that will be exposed by this service.
      Returns:
      the port property value
    • setPort

      public void setPort(Integer port)
      Set the port property value
    • port

      public V1ServicePort port(Integer port)
      Set port in a chainable fashion.
      Returns:
      The same instance of V1ServicePort for chaining.
    • getProtocol

      public String getProtocol()
      The IP protocol for this port. Supports \"TCP\", \"UDP\", and \"SCTP\". Default is TCP.
      Returns:
      the protocol property value
    • setProtocol

      public void setProtocol(String protocol)
      Set the protocol property value
    • protocol

      public V1ServicePort protocol(String protocol)
      Set protocol in a chainable fashion.
      Returns:
      The same instance of V1ServicePort for chaining.
    • getTargetPort

      public String getTargetPort()
      IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.
      Returns:
      the targetPort property value
    • setTargetPort

      public void setTargetPort(String targetPort)
      Set the targetPort property value
    • targetPort

      public V1ServicePort targetPort(String targetPort)
      Set targetPort in a chainable fashion.
      Returns:
      The same instance of V1ServicePort for chaining.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object