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

/**
 * Properties of an artifact source.
 *
 * @extends models['Resource']
 */
class ArtifactSource extends models['Resource'] {
  /**
   * Create a ArtifactSource.
   * @member {string} [displayName] The artifact source's display name.
   * @member {string} [uri] The artifact source's URI.
   * @member {string} [sourceType] The artifact source's type. Possible values
   * include: 'VsoGit', 'GitHub'
   * @member {string} [folderPath] The folder containing artifacts.
   * @member {string} [armTemplateFolderPath] The folder containing Azure
   * Resource Manager templates.
   * @member {string} [branchRef] The artifact source's branch reference.
   * @member {string} [securityToken] The security token to authenticate to the
   * artifact source.
   * @member {string} [status] Indicates if the artifact source is enabled
   * (values: Enabled, Disabled). Possible values include: 'Enabled',
   * 'Disabled'
   * @member {date} [createdDate] The artifact source's creation date.
   * @member {string} [provisioningState] The provisioning status of the
   * resource.
   * @member {string} [uniqueIdentifier] The unique immutable identifier of a
   * resource (Guid).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ArtifactSource
   *
   * @returns {object} metadata of ArtifactSource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ArtifactSource',
      type: {
        name: 'Composite',
        className: 'ArtifactSource',
        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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          uri: {
            required: false,
            serializedName: 'properties.uri',
            type: {
              name: 'String'
            }
          },
          sourceType: {
            required: false,
            serializedName: 'properties.sourceType',
            type: {
              name: 'String'
            }
          },
          folderPath: {
            required: false,
            serializedName: 'properties.folderPath',
            type: {
              name: 'String'
            }
          },
          armTemplateFolderPath: {
            required: false,
            serializedName: 'properties.armTemplateFolderPath',
            type: {
              name: 'String'
            }
          },
          branchRef: {
            required: false,
            serializedName: 'properties.branchRef',
            type: {
              name: 'String'
            }
          },
          securityToken: {
            required: false,
            serializedName: 'properties.securityToken',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'properties.status',
            type: {
              name: 'String'
            }
          },
          createdDate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdDate',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uniqueIdentifier: {
            required: false,
            serializedName: 'properties.uniqueIdentifier',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ArtifactSource;
