/* 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'; /** * IPBlock describes a particular CIDR (Ex. "192.168.1.0/24","2001:db8::/64") that is allowed to the pods matched by a NetworkPolicySpec's podSelector. The except entry describes CIDRs that should not be included within this rule. * @export * @interface IoK8sApiNetworkingV1IPBlock */ export interface IoK8sApiNetworkingV1IPBlock { /** * cidr is a string representing the IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" * @type {string} * @memberof IoK8sApiNetworkingV1IPBlock */ cidr: string; /** * except is a slice of CIDRs that should not be included within an IPBlock Valid examples are "192.168.1.0/24" or "2001:db8::/64" Except values will be rejected if they are outside the cidr range * @type {Array} * @memberof IoK8sApiNetworkingV1IPBlock */ except?: Array; } export function IoK8sApiNetworkingV1IPBlockFromJSON(json: any): IoK8sApiNetworkingV1IPBlock { return IoK8sApiNetworkingV1IPBlockFromJSONTyped(json, false); } export function IoK8sApiNetworkingV1IPBlockFromJSONTyped( json: any, _ignoreDiscriminator: boolean, ): IoK8sApiNetworkingV1IPBlock { if (json === undefined || json === null) { return json; } return { cidr: json['cidr'], except: !exists(json, 'except') ? undefined : json['except'], }; } export function IoK8sApiNetworkingV1IPBlockToJSON(value?: IoK8sApiNetworkingV1IPBlock | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { cidr: value.cidr, except: value.except, }; }