/*
 * 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');

/**
 * Describes a DNS record set (a collection of DNS records with the same name
 * and type).
 *
 * @extends models['BaseResource']
 */
class RecordSet extends models['BaseResource'] {
  /**
   * Create a RecordSet.
   * @member {string} [id] The ID of the record set.
   * @member {string} [name] The name of the record set.
   * @member {string} [type] The type of the record set.
   * @member {string} [etag] The etag of the record set.
   * @member {object} [metadata] The metadata attached to the record set.
   * @member {number} [tTL] The TTL (time-to-live) of the records in the record
   * set.
   * @member {string} [fqdn] Fully qualified domain name of the record set.
   * @member {array} [aRecords] The list of A records in the record set.
   * @member {array} [aaaaRecords] The list of AAAA records in the record set.
   * @member {array} [mxRecords] The list of MX records in the record set.
   * @member {array} [nsRecords] The list of NS records in the record set.
   * @member {array} [ptrRecords] The list of PTR records in the record set.
   * @member {array} [srvRecords] The list of SRV records in the record set.
   * @member {array} [txtRecords] The list of TXT records in the record set.
   * @member {object} [cnameRecord] The CNAME record in the  record set.
   * @member {string} [cnameRecord.cname] The canonical name for this CNAME
   * record.
   * @member {object} [soaRecord] The SOA record in the record set.
   * @member {string} [soaRecord.host] The domain name of the authoritative
   * name server for this SOA record.
   * @member {string} [soaRecord.email] The email contact for this SOA record.
   * @member {number} [soaRecord.serialNumber] The serial number for this SOA
   * record.
   * @member {number} [soaRecord.refreshTime] The refresh value for this SOA
   * record.
   * @member {number} [soaRecord.retryTime] The retry time for this SOA record.
   * @member {number} [soaRecord.expireTime] The expire time for this SOA
   * record.
   * @member {number} [soaRecord.minimumTtl] The minimum value for this SOA
   * record. By convention this is used to determine the negative caching
   * duration.
   * @member {array} [caaRecords] The list of CAA records in the record set.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of RecordSet
   *
   * @returns {object} metadata of RecordSet
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RecordSet',
      type: {
        name: 'Composite',
        className: 'RecordSet',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          metadata: {
            required: false,
            serializedName: 'properties.metadata',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          tTL: {
            required: false,
            serializedName: 'properties.TTL',
            type: {
              name: 'Number'
            }
          },
          fqdn: {
            required: false,
            readOnly: true,
            serializedName: 'properties.fqdn',
            type: {
              name: 'String'
            }
          },
          aRecords: {
            required: false,
            serializedName: 'properties.ARecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ARecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'ARecord'
                  }
              }
            }
          },
          aaaaRecords: {
            required: false,
            serializedName: 'properties.AAAARecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'AaaaRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'AaaaRecord'
                  }
              }
            }
          },
          mxRecords: {
            required: false,
            serializedName: 'properties.MXRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MxRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'MxRecord'
                  }
              }
            }
          },
          nsRecords: {
            required: false,
            serializedName: 'properties.NSRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NsRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'NsRecord'
                  }
              }
            }
          },
          ptrRecords: {
            required: false,
            serializedName: 'properties.PTRRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PtrRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'PtrRecord'
                  }
              }
            }
          },
          srvRecords: {
            required: false,
            serializedName: 'properties.SRVRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SrvRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'SrvRecord'
                  }
              }
            }
          },
          txtRecords: {
            required: false,
            serializedName: 'properties.TXTRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TxtRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'TxtRecord'
                  }
              }
            }
          },
          cnameRecord: {
            required: false,
            serializedName: 'properties.CNAMERecord',
            type: {
              name: 'Composite',
              className: 'CnameRecord'
            }
          },
          soaRecord: {
            required: false,
            serializedName: 'properties.SOARecord',
            type: {
              name: 'Composite',
              className: 'SoaRecord'
            }
          },
          caaRecords: {
            required: false,
            serializedName: 'properties.caaRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'CaaRecordElementType',
                  type: {
                    name: 'Composite',
                    className: 'CaaRecord'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = RecordSet;
