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

/**
 * Factory's GitHub repo information.
 *
 * @extends models['FactoryRepoConfiguration']
 */
class FactoryGitHubConfiguration extends models['FactoryRepoConfiguration'] {
  /**
   * Create a FactoryGitHubConfiguration.
   * @member {string} [hostName] GitHub Enterprise host name. For example:
   * https://github.mydomain.com
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of FactoryGitHubConfiguration
   *
   * @returns {object} metadata of FactoryGitHubConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FactoryGitHubConfiguration',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'FactoryRepoConfiguration',
        className: 'FactoryGitHubConfiguration',
        modelProperties: {
          accountName: {
            required: true,
            serializedName: 'accountName',
            type: {
              name: 'String'
            }
          },
          repositoryName: {
            required: true,
            serializedName: 'repositoryName',
            type: {
              name: 'String'
            }
          },
          collaborationBranch: {
            required: true,
            serializedName: 'collaborationBranch',
            type: {
              name: 'String'
            }
          },
          rootFolder: {
            required: true,
            serializedName: 'rootFolder',
            type: {
              name: 'String'
            }
          },
          lastCommitId: {
            required: false,
            serializedName: 'lastCommitId',
            type: {
              name: 'String'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          hostName: {
            required: false,
            serializedName: 'hostName',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = FactoryGitHubConfiguration;
