# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Peering::Mgmt::V2019_08_01_preview
  module Models
    #
    # The properties that define a direct connection.
    #
    class DirectConnection

      include MsRestAzure

      # @return [Integer] The bandwidth of the connection.
      attr_accessor :bandwidth_in_mbps

      # @return [Integer] The bandwidth that is actually provisioned.
      attr_accessor :provisioned_bandwidth_in_mbps

      # @return [SessionAddressProvider] The field indicating if Microsoft
      # provides session ip addresses. Possible values include: 'Microsoft',
      # 'Peer'
      attr_accessor :session_address_provider

      # @return [Boolean] The flag that indicates whether or not the connection
      # is used for peering service.
      attr_accessor :use_for_peering_service

      # @return [Integer] The PeeringDB.com ID of the facility at which the
      # connection has to be set up.
      attr_accessor :peering_dbfacility_id

      # @return [ConnectionState] The state of the connection. Possible values
      # include: 'None', 'PendingApproval', 'Approved', 'ProvisioningStarted',
      # 'ProvisioningFailed', 'ProvisioningCompleted', 'Validating', 'Active'
      attr_accessor :connection_state

      # @return [BgpSession] The BGP session associated with the connection.
      attr_accessor :bgp_session

      # @return [String] The unique identifier (GUID) for the connection.
      attr_accessor :connection_identifier


      #
      # Mapper for DirectConnection class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DirectConnection',
          type: {
            name: 'Composite',
            class_name: 'DirectConnection',
            model_properties: {
              bandwidth_in_mbps: {
                client_side_validation: true,
                required: false,
                serialized_name: 'bandwidthInMbps',
                type: {
                  name: 'Number'
                }
              },
              provisioned_bandwidth_in_mbps: {
                client_side_validation: true,
                required: false,
                serialized_name: 'provisionedBandwidthInMbps',
                type: {
                  name: 'Number'
                }
              },
              session_address_provider: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sessionAddressProvider',
                type: {
                  name: 'String'
                }
              },
              use_for_peering_service: {
                client_side_validation: true,
                required: false,
                serialized_name: 'useForPeeringService',
                type: {
                  name: 'Boolean'
                }
              },
              peering_dbfacility_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'peeringDBFacilityId',
                type: {
                  name: 'Number'
                }
              },
              connection_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'connectionState',
                type: {
                  name: 'String'
                }
              },
              bgp_session: {
                client_side_validation: true,
                required: false,
                serialized_name: 'bgpSession',
                type: {
                  name: 'Composite',
                  class_name: 'BgpSession'
                }
              },
              connection_identifier: {
                client_side_validation: true,
                required: false,
                serialized_name: 'connectionIdentifier',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
