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

/**
 * Custom domain analysis.
 *
 * @extends models['ProxyOnlyResource']
 */
class CustomHostnameAnalysisResult extends models['ProxyOnlyResource'] {
  /**
   * Create a CustomHostnameAnalysisResult.
   * @member {boolean} [isHostnameAlreadyVerified] <code>true</code> if
   * hostname is already verified; otherwise, <code>false</code>.
   * @member {string} [customDomainVerificationTest] DNS verification test
   * result. Possible values include: 'Passed', 'Failed', 'Skipped'
   * @member {object} [customDomainVerificationFailureInfo] Raw failure
   * information if DNS verification fails.
   * @member {string} [customDomainVerificationFailureInfo.extendedCode] Type
   * of error.
   * @member {string} [customDomainVerificationFailureInfo.messageTemplate]
   * Message template.
   * @member {array} [customDomainVerificationFailureInfo.parameters]
   * Parameters for the template.
   * @member {array} [customDomainVerificationFailureInfo.innerErrors] Inner
   * errors.
   * @member {string} [customDomainVerificationFailureInfo.code] Basic error
   * code.
   * @member {string} [customDomainVerificationFailureInfo.message] Any details
   * of the error.
   * @member {boolean} [hasConflictOnScaleUnit] <code>true</code> if there is a
   * conflict on a scale unit; otherwise, <code>false</code>.
   * @member {boolean} [hasConflictAcrossSubscription] <code>true</code> if
   * htere is a conflict across subscriptions; otherwise, <code>false</code>.
   * @member {string} [conflictingAppResourceId] Name of the conflicting app on
   * scale unit if it's within the same subscription.
   * @member {array} [cNameRecords] CName records controller can see for this
   * hostname.
   * @member {array} [txtRecords] TXT records controller can see for this
   * hostname.
   * @member {array} [aRecords] A records controller can see for this hostname.
   * @member {array} [alternateCNameRecords] Alternate CName records controller
   * can see for this hostname.
   * @member {array} [alternateTxtRecords] Alternate TXT records controller can
   * see for this hostname.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of CustomHostnameAnalysisResult
   *
   * @returns {object} metadata of CustomHostnameAnalysisResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CustomHostnameAnalysisResult',
      type: {
        name: 'Composite',
        className: 'CustomHostnameAnalysisResult',
        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'
            }
          },
          isHostnameAlreadyVerified: {
            required: false,
            readOnly: true,
            serializedName: 'properties.isHostnameAlreadyVerified',
            type: {
              name: 'Boolean'
            }
          },
          customDomainVerificationTest: {
            required: false,
            readOnly: true,
            serializedName: 'properties.customDomainVerificationTest',
            type: {
              name: 'Enum',
              allowedValues: [ 'Passed', 'Failed', 'Skipped' ]
            }
          },
          customDomainVerificationFailureInfo: {
            required: false,
            readOnly: true,
            serializedName: 'properties.customDomainVerificationFailureInfo',
            type: {
              name: 'Composite',
              className: 'ErrorEntity'
            }
          },
          hasConflictOnScaleUnit: {
            required: false,
            readOnly: true,
            serializedName: 'properties.hasConflictOnScaleUnit',
            type: {
              name: 'Boolean'
            }
          },
          hasConflictAcrossSubscription: {
            required: false,
            readOnly: true,
            serializedName: 'properties.hasConflictAcrossSubscription',
            type: {
              name: 'Boolean'
            }
          },
          conflictingAppResourceId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.conflictingAppResourceId',
            type: {
              name: 'String'
            }
          },
          cNameRecords: {
            required: false,
            serializedName: 'properties.cNameRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          txtRecords: {
            required: false,
            serializedName: 'properties.txtRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          aRecords: {
            required: false,
            serializedName: 'properties.aRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          alternateCNameRecords: {
            required: false,
            serializedName: 'properties.alternateCNameRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          alternateTxtRecords: {
            required: false,
            serializedName: 'properties.alternateTxtRecords',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = CustomHostnameAnalysisResult;
