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

/**
 * Information about workspace.
 *
 * @extends models['TrackedResource']
 */
class Workspace extends models['TrackedResource'] {
  /**
   * Create a Workspace.
   * @member {string} managedResourceGroupId The managed resource group Id.
   * @member {object} [parameters] Name and value pairs that define the
   * workspace parameters.
   * @member {string} [provisioningState] The workspace provisioning state.
   * Possible values include: 'Accepted', 'Running', 'Ready', 'Creating',
   * 'Created', 'Deleting', 'Deleted', 'Canceled', 'Failed', 'Succeeded',
   * 'Updating'
   * @member {string} [uiDefinitionUri] The blob URI where the UI definition
   * file is located.
   * @member {array} [authorizations] The workspace provider authorizations.
   * @member {object} [sku] The SKU of the resource.
   * @member {string} [sku.name] The SKU name.
   * @member {string} [sku.tier] The SKU tier.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Workspace
   *
   * @returns {object} metadata of Workspace
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Workspace',
      type: {
        name: 'Composite',
        className: 'Workspace',
        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: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          managedResourceGroupId: {
            required: true,
            serializedName: 'properties.managedResourceGroupId',
            type: {
              name: 'String'
            }
          },
          parameters: {
            required: false,
            serializedName: 'properties.parameters',
            type: {
              name: 'Object'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uiDefinitionUri: {
            required: false,
            serializedName: 'properties.uiDefinitionUri',
            type: {
              name: 'String'
            }
          },
          authorizations: {
            required: false,
            serializedName: 'properties.authorizations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'WorkspaceProviderAuthorizationElementType',
                  type: {
                    name: 'Composite',
                    className: 'WorkspaceProviderAuthorization'
                  }
              }
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          }
        }
      }
    };
  }
}

module.exports = Workspace;
