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

/**
 * Class representing a Controller.
 * @extends models['TrackedResource']
 */
class Controller extends models['TrackedResource'] {
  /**
   * Create a Controller.
   * @member {string} [provisioningState] Provisioning state of the Azure Dev
   * Spaces Controller. Possible values include: 'Succeeded', 'Failed',
   * 'Canceled', 'Updating', 'Creating', 'Deleting'
   * @member {string} hostSuffix DNS suffix for public endpoints running in the
   * Azure Dev Spaces Controller.
   * @member {string} [dataPlaneFqdn] DNS name for accessing DataPlane services
   * @member {string} targetContainerHostResourceId Resource ID of the target
   * container host
   * @member {string} targetContainerHostCredentialsBase64 Credentials of the
   * target container host (base64).
   * @member {object} sku
   * @member {string} [sku.tier] The tier of the SKU for Azure Dev Spaces
   * Controller. Possible values include: 'Standard'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Controller
   *
   * @returns {object} metadata of Controller
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Controller',
      type: {
        name: 'Composite',
        className: 'Controller',
        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'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          hostSuffix: {
            required: true,
            serializedName: 'properties.hostSuffix',
            type: {
              name: 'String'
            }
          },
          dataPlaneFqdn: {
            required: false,
            readOnly: true,
            serializedName: 'properties.dataPlaneFqdn',
            type: {
              name: 'String'
            }
          },
          targetContainerHostResourceId: {
            required: true,
            serializedName: 'properties.targetContainerHostResourceId',
            type: {
              name: 'String'
            }
          },
          targetContainerHostCredentialsBase64: {
            required: true,
            serializedName: 'properties.targetContainerHostCredentialsBase64',
            type: {
              name: 'String'
            }
          },
          sku: {
            required: true,
            serializedName: 'sku',
            defaultValue: {},
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          }
        }
      }
    };
  }
}

module.exports = Controller;
