/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

const models = require('./index');

/**
 * Class representing a Airport.
 * @extends models['CivicStructure']
 */
class Airport extends models['CivicStructure'] {
  /**
   * Create a Airport.
   * @member {string} [iataCode]
   * @member {string} [icaoCode]
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Airport
   *
   * @returns {object} metadata of Airport
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Airport',
      type: {
        name: 'Composite',
        className: 'Airport',
        modelProperties: {
          _type: {
            required: true,
            serializedName: '_type',
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          contractualRules: {
            required: false,
            readOnly: true,
            serializedName: 'contractualRules',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ContractualRulesContractualRuleElementType',
                  type: {
                    name: 'Composite',
                    polymorphicDiscriminator: {
                      serializedName: '_type',
                      clientName: '_type'
                    },
                    uberParent: 'ContractualRulesContractualRule',
                    className: 'ContractualRulesContractualRule'
                  }
              }
            }
          },
          webSearchUrl: {
            required: false,
            readOnly: true,
            serializedName: 'webSearchUrl',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          url: {
            required: false,
            readOnly: true,
            serializedName: 'url',
            type: {
              name: 'String'
            }
          },
          image: {
            required: false,
            readOnly: true,
            serializedName: 'image',
            type: {
              name: 'Composite',
              className: 'ImageObject'
            }
          },
          description: {
            required: false,
            readOnly: true,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          entityPresentationInfo: {
            required: false,
            readOnly: true,
            serializedName: 'entityPresentationInfo',
            type: {
              name: 'Composite',
              className: 'EntitiesEntityPresentationInfo'
            }
          },
          bingId: {
            required: false,
            readOnly: true,
            serializedName: 'bingId',
            type: {
              name: 'String'
            }
          },
          address: {
            required: false,
            readOnly: true,
            serializedName: 'address',
            type: {
              name: 'Composite',
              className: 'PostalAddress'
            }
          },
          telephone: {
            required: false,
            readOnly: true,
            serializedName: 'telephone',
            type: {
              name: 'String'
            }
          },
          iataCode: {
            required: false,
            readOnly: true,
            serializedName: 'iataCode',
            type: {
              name: 'String'
            }
          },
          icaoCode: {
            required: false,
            readOnly: true,
            serializedName: 'icaoCode',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = Airport;
