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

/**
 * Factory's git repo information.
 *
 */
class FactoryRepoUpdate {
  /**
   * Create a FactoryRepoUpdate.
   * @member {string} [factoryResourceId] The factory resource id.
   * @member {object} [repoConfiguration] Git repo information of the factory.
   * @member {string} [repoConfiguration.accountName] Account name.
   * @member {string} [repoConfiguration.repositoryName] Rrepository name.
   * @member {string} [repoConfiguration.collaborationBranch] Collaboration
   * branch.
   * @member {string} [repoConfiguration.rootFolder] Root folder.
   * @member {string} [repoConfiguration.lastCommitId] Last commit id.
   * @member {string} [repoConfiguration.type] Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of FactoryRepoUpdate
   *
   * @returns {object} metadata of FactoryRepoUpdate
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FactoryRepoUpdate',
      type: {
        name: 'Composite',
        className: 'FactoryRepoUpdate',
        modelProperties: {
          factoryResourceId: {
            required: false,
            serializedName: 'factoryResourceId',
            type: {
              name: 'String'
            }
          },
          repoConfiguration: {
            required: false,
            serializedName: 'repoConfiguration',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'FactoryRepoConfiguration',
              className: 'FactoryRepoConfiguration'
            }
          }
        }
      }
    };
  }
}

module.exports = FactoryRepoUpdate;
