/**
 * Load Balancing API
 * API for the Load Balancing service. Use this API to manage load balancers, backend sets, and related items. For more
information, see [Overview of Load Balancing](/iaas/Content/Balance/Concepts/balanceoverview.htm).

 * OpenAPI spec version: 20170115
 *
 *
 * NOTE: This class is auto generated by OracleSDKGenerator.
 * Do not edit the class manually.
 *
 * Copyright (c) 2020, 2022, Oracle and/or its affiliates.  All rights reserved.
 * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
 */ import * as model from "../model" ; import common = require ( "oci-common" ) ; /**
* The properties that define a load balancer. For more information, see
* [Managing a Load Balancer](https://docs.cloud.oracle.com/Content/Balance/Tasks/managingloadbalancer.htm).
* <p>
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
* talk to an administrator. If you're an administrator who needs to write policies to give users access, see
* [Getting Started with Policies](https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).
* <p>
For information about endpoints and signing API requests, see
* [About the API](https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm). For information about available SDKs and tools, see
* [SDKS and Other Tools](https://docs.cloud.oracle.com/Content/API/Concepts/sdks.htm).
*
*/ export interface LoadBalancer { /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the load balancer.
     */ "id" : string ; /**
     * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the compartment containing the load balancer.
     */ "compartmentId" : string ; /**
      * A user-friendly name. It does not have to be unique, and it is changeable.
  * <p>
  Example: `example_load_balancer`
  *
      */ "displayName" : string ; /**
     * The current state of the load balancer.
     *
     */ "lifecycleState" : LoadBalancer . LifecycleState ; /**
      * The date and time the load balancer was created, in the format defined by RFC3339.
  * <p>
  Example: `2016-08-25T21:10:29.600Z`
  *
      */ "timeCreated" : Date ; /**
     * An array of IP addresses.
     *
     */ "ipAddresses" ? : Array < model . IpAddress > ; /**
      * A template that determines the total pre-provisioned bandwidth (ingress plus egress).
  * To get a list of available shapes, use the  {@link #listShapes(ListShapesRequest) listShapes} * operation.
  * <p>
  Example: `100Mbps`
  *
       "shapeName" : string ; "shapeDetails" ? : model . ShapeDetails ; /**
      * Whether the load balancer has a VCN-local (private) IP address.
  * <p>
  If \"true\", the service assigns a private IP address to the load balancer.
  * <p>
  If \"false\", the service assigns a public IP address to the load balancer.
  * <p>
  A public load balancer is accessible from the internet, depending on your VCN's
  * [security list rules](https://docs.cloud.oracle.com/Content/Network/Concepts/securitylists.htm). For more information about public and
  * private load balancers, see [How Load Balancing Works](https://docs.cloud.oracle.com/Content/Balance/Concepts/balanceoverview.htm#how-load-balancing-works).
  * <p>
  Example: `true`
  *
      */ "isPrivate" ? : boolean ; /**
     * An array of subnet [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
     */ "subnetIds" ? : Array < string > ; /**
      * An array of NSG [OCIDs](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) associated with the load
  * balancer.
  * <p>
  During the load balancer's creation, the service adds the new load balancer to the specified NSGs.
  * <p>
  The benefits of associating the load balancer with NSGs include:
  * <p>
  *  NSGs define network security rules to govern ingress and egress traffic for the load balancer.
  * <p>
  *  The network security rules of other resources can reference the NSGs associated with the load balancer
  *    to ensure access.
  * <p>
  Example: [\"ocid1.nsg.oc1.phx.unique_ID\"]
  *
      */ "networkSecurityGroupIds" ? : Array < string > ; "listeners" ? : { [ key ] : model . Listener ; } ; "hostnames" ? : { [ key ] : model . Hostname ; } ; "sslCipherSuites" ? : { [ key ] : model . SSLCipherSuite ; } ; "certificates" ? : { [ key ] : model . Certificate ; } ; "backendSets" ? : { [ key ] : model . BackendSet ; } ; "pathRouteSets" ? : { [ key ] : model . PathRouteSet ; } ; /**
      * Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
  * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
  * <p>
  Example: `{\"Department\": \"Finance\"}`
  *
      */ "freeformTags" ? : { [ key ] : string ; } ; /**
      * Defined tags for this resource. Each key is predefined and scoped to a namespace.
  * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
  * <p>
  Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
  *
      */ "definedTags" ? : { [ key ] : { [ key ] : any ; } ; } ; /**
      * System tags for this resource. Each key is predefined and scoped to a namespace.
  * For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
  * System tags can be viewed by users, but can only be created by the system.
  * <p>
  Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}`
  *
      */ "systemTags" ? : { [ key ] : { [ key ] : any ; } ; } ; "ruleSets" ? : { [ key ] : model . RuleSet ; } ; "routingPolicies" ? : { [ key ] : model . RoutingPolicy ; } ; } export namespace LoadBalancer { export enum LifecycleState { Creating = "CREATING" , Failed = "FAILED" , Active = "ACTIVE" , Deleting = "DELETING" , Deleted = "DELETED" , /**
         * This value is used if a service returns a value for this enum that is not recognized by this
         * version of the SDK.
         */ UnknownValue = "UNKNOWN_VALUE" } export function getJsonObj ( obj ) { const jsonObj = { ... obj , ... { "ipAddresses" : obj . ipAddresses ? obj . ipAddresses . map ( item => { return model . IpAddress . getJsonObj ( item ) ; } ) : undefined , "shapeDetails" : obj . shapeDetails ? model . ShapeDetails . getJsonObj ( obj . shapeDetails ) : undefined , "listeners" : obj . listeners ? common . mapContainer ( obj . listeners , model . Listener . getJsonObj ) : undefined , "hostnames" : obj . hostnames ? common . mapContainer ( obj . hostnames , model . Hostname . getJsonObj ) : undefined , "sslCipherSuites" : obj . sslCipherSuites ? common . mapContainer ( obj . sslCipherSuites , model . SSLCipherSuite . getJsonObj ) : undefined , "certificates" : obj . certificates ? common . mapContainer ( obj . certificates , model . Certificate . getJsonObj ) : undefined , "backendSets" : obj . backendSets ? common . mapContainer ( obj . backendSets , model . BackendSet . getJsonObj ) : undefined , "pathRouteSets" : obj . pathRouteSets ? common . mapContainer ( obj . pathRouteSets , model . PathRouteSet . getJsonObj ) : undefined , "ruleSets" : obj . ruleSets ? common . mapContainer ( obj . ruleSets , model . RuleSet . getJsonObj ) : undefined , "routingPolicies" : obj . routingPolicies ? common . mapContainer ( obj . routingPolicies , model . RoutingPolicy . getJsonObj ) : undefined } } ; return jsonObj ; } export function getDeserializedJsonObj ( obj ) { const jsonObj = { ... obj , ... { "ipAddresses" : obj . ipAddresses ? obj . ipAddresses . map ( item => { return model . IpAddress . getDeserializedJsonObj ( item ) ; } ) : undefined , "shapeDetails" : obj . shapeDetails ? model . ShapeDetails . getDeserializedJsonObj ( obj . shapeDetails ) : undefined , "listeners" : obj . listeners ? common . mapContainer ( obj . listeners , model . Listener . getDeserializedJsonObj ) : undefined , "hostnames" : obj . hostnames ? common . mapContainer ( obj . hostnames , model . Hostname . getDeserializedJsonObj ) : undefined , "sslCipherSuites" : obj . sslCipherSuites ? common . mapContainer ( obj . sslCipherSuites , model . SSLCipherSuite . getDeserializedJsonObj ) : undefined , "certificates" : obj . certificates ? common . mapContainer ( obj . certificates , model . Certificate . getDeserializedJsonObj ) : undefined , "backendSets" : obj . backendSets ? common . mapContainer ( obj . backendSets , model . BackendSet . getDeserializedJsonObj ) : undefined , "pathRouteSets" : obj . pathRouteSets ? common . mapContainer ( obj . pathRouteSets , model . PathRouteSet . getDeserializedJsonObj ) : undefined , "ruleSets" : obj . ruleSets ? common . mapContainer ( obj . ruleSets , model . RuleSet . getDeserializedJsonObj ) : undefined , "routingPolicies" : obj . routingPolicies ? common . mapContainer ( obj . routingPolicies , model . RoutingPolicy . getDeserializedJsonObj ) : undefined } } ; return jsonObj ; } }