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

/**
 * Docker container settings.
 *
 */
class ContainerSettings {
  /**
   * Create a ContainerSettings.
   * @member {object} imageSourceRegistry Image source registry. Information
   * about docker image and docker registry to download the container from.
   * @member {string} [imageSourceRegistry.serverUrl] URL for image repository.
   * @member {string} [imageSourceRegistry.image] The name of the image in the
   * image repository.
   * @member {object} [imageSourceRegistry.credentials] Credentials to access
   * the private docker repository.
   * @member {string} [imageSourceRegistry.credentials.username] User name to
   * login to the repository.
   * @member {string} [imageSourceRegistry.credentials.password] User password
   * to login to the docker repository. One of password or
   * passwordSecretReference must be specified.
   * @member {object} [imageSourceRegistry.credentials.passwordSecretReference]
   * KeyVault Secret storing the password. Users can store their secrets in
   * Azure KeyVault and pass it to the Batch AI service to integrate with
   * KeyVault. One of password or passwordSecretReference must be specified.
   * @member {object}
   * [imageSourceRegistry.credentials.passwordSecretReference.sourceVault]
   * Fully qualified resource indentifier of the Key Vault.
   * @member {string}
   * [imageSourceRegistry.credentials.passwordSecretReference.sourceVault.id]
   * The ID of the resource
   * @member {string}
   * [imageSourceRegistry.credentials.passwordSecretReference.secretUrl] The
   * URL referencing a secret in the Key Vault.
   * @member {string} [shmSize] /dev/shm size. Size of /dev/shm. Please refer
   * to docker documentation for supported argument formats.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ContainerSettings
   *
   * @returns {object} metadata of ContainerSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ContainerSettings',
      type: {
        name: 'Composite',
        className: 'ContainerSettings',
        modelProperties: {
          imageSourceRegistry: {
            required: true,
            serializedName: 'imageSourceRegistry',
            type: {
              name: 'Composite',
              className: 'ImageSourceRegistry'
            }
          },
          shmSize: {
            required: false,
            serializedName: 'shmSize',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ContainerSettings;
