/*
 * 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 an update to a Kusto cluster.
 *
 * @extends models['Resource']
 */
class ClusterUpdate extends models['Resource'] {
  /**
   * Create a ClusterUpdate.
   * @property {object} [tags] Resource tags.
   * @property {string} [location] Resource location.
   * @property {object} [sku] The SKU of the cluster.
   * @property {string} [sku.name] SKU name. Possible values include: 'D13_v2',
   * 'D14_v2', 'L8', 'L16', 'D11_v2', 'D12_v2', 'L4'
   * @property {number} [sku.capacity] SKU capacity.
   * @property {string} [state] The state of the resource. Possible values
   * include: 'Creating', 'Unavailable', 'Running', 'Deleting', 'Deleted',
   * 'Stopping', 'Stopped', 'Starting', 'Updating'
   * @property {string} [provisioningState] The provisioned state of the
   * resource. Possible values include: 'Running', 'Creating', 'Deleting',
   * 'Succeeded', 'Failed'
   * @property {string} [uri] The cluster URI.
   * @property {string} [dataIngestionUri] The cluster data ingestion URI.
   * @property {array} [trustedExternalTenants] The cluster's external tenants.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ClusterUpdate
   *
   * @returns {object} metadata of ClusterUpdate
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ClusterUpdate',
      type: {
        name: 'Composite',
        className: 'ClusterUpdate',
        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'
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'AzureSku'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uri: {
            required: false,
            readOnly: true,
            serializedName: 'properties.uri',
            type: {
              name: 'String'
            }
          },
          dataIngestionUri: {
            required: false,
            readOnly: true,
            serializedName: 'properties.dataIngestionUri',
            type: {
              name: 'String'
            }
          },
          trustedExternalTenants: {
            required: false,
            serializedName: 'properties.trustedExternalTenants',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TrustedExternalTenantElementType',
                  type: {
                    name: 'Composite',
                    className: 'TrustedExternalTenant'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ClusterUpdate;
