/* tslint:disable */ /* eslint-disable */ /** * Kubernetes * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: unversioned * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists } from '../runtime'; import { IoK8sApiCoreV1PortStatus, IoK8sApiCoreV1PortStatusFromJSON, IoK8sApiCoreV1PortStatusToJSON, } from './'; /** * LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point. * @export * @interface IoK8sApiCoreV1LoadBalancerIngress */ export interface IoK8sApiCoreV1LoadBalancerIngress { /** * Hostname is set for load-balancer ingress points that are DNS based (typically AWS load-balancers) * @type {string} * @memberof IoK8sApiCoreV1LoadBalancerIngress */ hostname?: string; /** * IP is set for load-balancer ingress points that are IP based (typically GCE or OpenStack load-balancers) * @type {string} * @memberof IoK8sApiCoreV1LoadBalancerIngress */ ip?: string; /** * IPMode specifies how the load-balancer IP behaves, and may only be specified when the ip field is specified. Setting this to "VIP" indicates that traffic is delivered to the node with the destination set to the load-balancer's IP and port. Setting this to "Proxy" indicates that traffic is delivered to the node or pod with the destination set to the node's IP and node port or the pod's IP and port. Service implementations may use this information to adjust traffic routing. * @type {string} * @memberof IoK8sApiCoreV1LoadBalancerIngress */ ipMode?: string; /** * Ports is a list of records of service ports If used, every port defined in the service should have an entry in it * @type {Array} * @memberof IoK8sApiCoreV1LoadBalancerIngress */ ports?: Array; } export function IoK8sApiCoreV1LoadBalancerIngressFromJSON( json: any, ): IoK8sApiCoreV1LoadBalancerIngress { return IoK8sApiCoreV1LoadBalancerIngressFromJSONTyped(json, false); } export function IoK8sApiCoreV1LoadBalancerIngressFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiCoreV1LoadBalancerIngress { if (json === undefined || json === null) { return json; } return { hostname: !exists(json, 'hostname') ? undefined : json['hostname'], ip: !exists(json, 'ip') ? undefined : json['ip'], ipMode: !exists(json, 'ipMode') ? undefined : json['ipMode'], ports: !exists(json, 'ports') ? undefined : (json['ports'] as Array).map(IoK8sApiCoreV1PortStatusFromJSON), }; } export function IoK8sApiCoreV1LoadBalancerIngressToJSON( value?: IoK8sApiCoreV1LoadBalancerIngress | null, ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { hostname: value.hostname, ip: value.ip, ipMode: value.ipMode, ports: value.ports === undefined ? undefined : (value.ports as Array).map(IoK8sApiCoreV1PortStatusToJSON), }; }