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

/**
 * A hostname binding object.
 *
 * @extends models['ProxyOnlyResource']
 */
class HostNameBinding extends models['ProxyOnlyResource'] {
  /**
   * Create a HostNameBinding.
   * @member {string} [siteName] App Service app name.
   * @member {string} [domainId] Fully qualified ARM domain resource URI.
   * @member {string} [azureResourceName] Azure resource name.
   * @member {string} [azureResourceType] Azure resource type. Possible values
   * include: 'Website', 'TrafficManager'
   * @member {string} [customHostNameDnsRecordType] Custom DNS record type.
   * Possible values include: 'CName', 'A'
   * @member {string} [hostNameType] Hostname type. Possible values include:
   * 'Verified', 'Managed'
   * @member {string} [sslState] SSL type. Possible values include: 'Disabled',
   * 'SniEnabled', 'IpBasedEnabled'
   * @member {string} [thumbprint] SSL certificate thumbprint
   * @member {string} [virtualIP] Virtual IP address assigned to the hostname
   * if IP based SSL is enabled.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of HostNameBinding
   *
   * @returns {object} metadata of HostNameBinding
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HostNameBinding',
      type: {
        name: 'Composite',
        className: 'HostNameBinding',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          siteName: {
            required: false,
            serializedName: 'properties.siteName',
            type: {
              name: 'String'
            }
          },
          domainId: {
            required: false,
            serializedName: 'properties.domainId',
            type: {
              name: 'String'
            }
          },
          azureResourceName: {
            required: false,
            serializedName: 'properties.azureResourceName',
            type: {
              name: 'String'
            }
          },
          azureResourceType: {
            required: false,
            serializedName: 'properties.azureResourceType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Website', 'TrafficManager' ]
            }
          },
          customHostNameDnsRecordType: {
            required: false,
            serializedName: 'properties.customHostNameDnsRecordType',
            type: {
              name: 'Enum',
              allowedValues: [ 'CName', 'A' ]
            }
          },
          hostNameType: {
            required: false,
            serializedName: 'properties.hostNameType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Verified', 'Managed' ]
            }
          },
          sslState: {
            required: false,
            serializedName: 'properties.sslState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Disabled', 'SniEnabled', 'IpBasedEnabled' ]
            }
          },
          thumbprint: {
            required: false,
            serializedName: 'properties.thumbprint',
            type: {
              name: 'String'
            }
          },
          virtualIP: {
            required: false,
            readOnly: true,
            serializedName: 'properties.virtualIP',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = HostNameBinding;
