# 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 an exchange connection.
    #
    class ExchangeConnection

      include MsRestAzure

      # @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 ExchangeConnection class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ExchangeConnection',
          type: {
            name: 'Composite',
            class_name: 'ExchangeConnection',
            model_properties: {
              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
