SINGLE_NODE_FORMAT = {'address' => String, 'id' => Integer, 'status' => String, 'weight' => Fog::Nullable::Integer, 'port' => Integer, 'condition' => String, 'type' => String}
NODE_FORMAT = {'node' => SINGLE_NODE_FORMAT.merge({ 'metadata' => []})}
NODES_FORMAT = {'nodes' => [SINGLE_NODE_FORMAT]}
VIRTUAL_IP_FORMAT = {'type' => String, 'id' => Integer, 'type' => String, 'ipVersion' => String, 'address' => String}
VIRTUAL_IPS_FORMAT = { 'virtualIps' => [VIRTUAL_IP_FORMAT] }
SOURCE_ADDRESSES = {
  'ipv4Servicenet'  => String,
  'ipv4Public'      => String,
  'ipv6Public'      => String,
}
LOAD_BALANCER_USAGE_FORMAT = {
  'links' => [
    {
      'otherAttributes' => [],
      'href' => Fog::Nullable::String,
      'rel' => Fog::Nullable::String
    }
  ],
  'loadBalancerUsageRecords' => [
    {
      'id' => Fog::Nullable::Integer,
      'eventType' => Fog::Nullable::String,
      'averageNumConnections' => Fog::Nullable::Float,
      'incomingTransfer' => Fog::Nullable::Integer,
      'outgoingTransfer' => Fog::Nullable::Integer,
      'numVips' => Fog::Nullable::Integer,
      'numPolls' => Fog::Nullable::Integer,
      'startTime' => Fog::Nullable::String,
      'endTime' => Fog::Nullable::String,
      'vipType' => Fog::Nullable::String,
    }
  ]
}

SSL_TERMINATION_FORMAT = {
  'sslTermination' => {
    'certificate' => String,
    'privatekey' => String,
    'enabled' => Fog::Boolean,
    'securePort' => Integer,
    'secureTrafficOnly' => Fog::Boolean,
    'intermediateCertificate' => Fog::Nullable::String
  }
}

USAGE_FORMAT = {
  'accountId' => Integer,
  'loadBalancerUsages' => [
    {
      'loadBalancerId' => Fog::Nullable::Integer,
      'loadBalancerName' => Fog::Nullable::String
    }.merge(LOAD_BALANCER_USAGE_FORMAT)
  ],
  'accountUsage' => [
    {
      'startTime' => Fog::Nullable::String,
      'numLoadBalancers' => Fog::Nullable::Integer,
      'numPublicVips' => Fog::Nullable::Integer,
      'numServicenetVips' => Fog::Nullable::Integer
    }
  ]
}
CONNECTION_LOGGING_FORMAT = {
  'connectionLogging' => {
    'enabled' => Fog::Boolean
  }
}
CONNECTION_THROTTLING_FORMAT = {
  'connectionThrottle' => {
    'maxConnections' => Fog::Nullable::Integer,
    'minConnections' => Fog::Nullable::Integer,
    'maxConnectionRate' => Fog::Nullable::Integer,
    'rateInterval' => Fog::Nullable::Integer
  }
}
SESSION_PERSISTENCE_FORMAT = {
  'sessionPersistence' => {
    'persistenceType' => Fog::Nullable::String
  }
}

ACCESS_LIST_FORMAT = {
  'accessList' => [
    {
      'address' => String,
      'id' => Integer,
      'type' => String
    }
  ]
}
HEALTH_MONITOR_FORMAT = {
  'healthMonitor' => {
    'type' => Fog::Nullable::String,
    'delay' => Fog::Nullable::Integer,
    'timeout' => Fog::Nullable::Integer,
    'attemptsBeforeDeactivation' => Fog::Nullable::Integer,
    'path' => Fog::Nullable::String,
    'bodyRegex' => Fog::Nullable::String,
    'statusRegex' => Fog::Nullable::String
  }
}

STATUS_ACTIVE = 'ACTIVE'

LOAD_BALANCERS_FORMAT = {
  'loadBalancers' => [
    {
      'name' => String,
      'id' => Integer,
      'port' => Integer,
      'protocol' => String,
      'algorithm' => String,
      'status' => String,
      'virtualIps' => [VIRTUAL_IP_FORMAT],
      'created' => { 'time' => String },
      'updated' => { 'time' => String },
      'nodeCount' => Integer
    }]
}

LOAD_BALANCERS_DETAIL_FORMAT = {
  'loadBalancers' => [
    {
      'name' => String,
      'id' => Integer,
      'port' => Integer,
      'protocol' => String,
      'algorithm' => String,
      'sourceAddresses' => SOURCE_ADDRESSES,
      'status' => String,
      'virtualIps' => [VIRTUAL_IP_FORMAT],
      'nodes' => [SINGLE_NODE_FORMAT],
      'created' => { 'time' => String },
      'updated' => { 'time' => String }
    }]
}
LOAD_BALANCER_FORMAT = {
  'loadBalancer' => {
    'name' => String,
    'id' => Integer,
    'port' => Integer,
    'protocol' => String,
    'algorithm' => String,
    'sourceAddresses' => SOURCE_ADDRESSES,
    'status' => String,
    'cluster' => { 'name' => String },
    'virtualIps' => [VIRTUAL_IP_FORMAT],
    'nodes' => [SINGLE_NODE_FORMAT],
    'created' => { 'time' => String },
    'updated' => { 'time' => String },
    'contentCaching' => { 'enabled' => Fog::Boolean }
  }.merge(CONNECTION_LOGGING_FORMAT)
}

ERROR_PAGE_FORMAT = {
  'errorpage' => {
    'content' => String
  }
}

PRIVATE_KEY = '-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAqSXePu8qLmniU7jNxoWq3SLkR8txMsl1gFYftpq7NIFaGfzV
f4ZswYdEYDVWWRepQjS0TvsB0d5+usEUy/pcdZAlQLnn+540iLkvxKPVMzojUbG6
yOAmjC/xAZuExJHtfCrRHUQ4WQCwqyqANfP81y1inAb0zJGbtWUreV+nv8Ue77qX
77fOuqI6zOHinGZU7l25XGLcVUphgt8UtHZBzz2ahoftZ97DhUyQiSJQCaHXJd3Q
eIHAq9qc7hu+usiYZWz34A0lw/gAl+RYcdvVc8kIwWxpiSieqqBPOwNzN5B0+9uu
5sDzMGMFnnSWcNKIPumX0rke3xFUl3UD6GJwvwIDAQABAoIBABQ7alT+yH3avm6j
OUHYtTJUPRf1VqnrfPmH061E3sWN/1gCbQse6h1P77bOSnDHqsA3i6Wy0mnnAiOW
esVXQf3x6vLOCdiH+OKtu+/6ZMMG3jikWKI0ZYf5KAu4LW5RwiVK/c5RXagPtBIV
OFa7w299h0EAeAGMHSLaYhPXhDokyJa6yDkAQL3n+9L3V8kNWeCELfrqXnXF4X0K
CJp622tS/fW6kzppJyLJ4GPkK9HNMpu02/n2Z7swWypfF+7set+9/aNTooDYWzCu
dbnRgqEIG1IP8+t6HG6x9VujJVJLIW/WLITnQ/WTRXOQHBGhazgmwe1GPdxsQgXu
/wIcsIkCgYEA8Si0q+QhmJyoAm8vTHjo6+DD06YYTvSODLJOpOqr1ncGGDJ/evBw
x+9QsK3veXMbAK5G7Xss32IuXbBfjqQ89+/q/YT4BnS3T0OQa2WlR8tURNphCDr5
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