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

/**
 * Information about a service type that is defined in a service manifest of a
 * provisioned application type.
 *
 */
class ServiceTypeInfo {
  /**
   * Create a ServiceTypeInfo.
   * @property {object} [serviceTypeDescription] Describes a service type
   * defined in the service manifest of a provisioned application type. The
   * properties the ones defined in the service manifest.
   * @property {boolean} [serviceTypeDescription.isStateful] Indicates whether
   * the service type is a stateful service type or a stateless service type.
   * This property is true if the service type is a stateful service type,
   * false otherwise.
   * @property {string} [serviceTypeDescription.serviceTypeName] Name of the
   * service type as specified in the service manifest.
   * @property {string} [serviceTypeDescription.placementConstraints] The
   * placement constraint to be used when instantiating this service in a
   * Service Fabric cluster.
   * @property {array} [serviceTypeDescription.loadMetrics] The service load
   * metrics is given as an array of ServiceLoadMetricDescription objects.
   * @property {array} [serviceTypeDescription.servicePlacementPolicies] List
   * of service placement policy descriptions.
   * @property {array} [serviceTypeDescription.extensions] List of service type
   * extensions.
   * @property {string} [serviceTypeDescription.kind] Polymorphic Discriminator
   * @property {string} [serviceManifestName] The name of the service manifest
   * in which this service type is defined.
   * @property {string} [serviceManifestVersion] The version of the service
   * manifest in which this service type is defined.
   * @property {boolean} [isServiceGroup] Indicates whether the service is a
   * service group. If it is, the property value is true otherwise false.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ServiceTypeInfo
   *
   * @returns {object} metadata of ServiceTypeInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ServiceTypeInfo',
      type: {
        name: 'Composite',
        className: 'ServiceTypeInfo',
        modelProperties: {
          serviceTypeDescription: {
            required: false,
            serializedName: 'ServiceTypeDescription',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'Kind',
                clientName: 'kind'
              },
              uberParent: 'ServiceTypeDescription',
              className: 'ServiceTypeDescription'
            }
          },
          serviceManifestName: {
            required: false,
            serializedName: 'ServiceManifestName',
            type: {
              name: 'String'
            }
          },
          serviceManifestVersion: {
            required: false,
            serializedName: 'ServiceManifestVersion',
            type: {
              name: 'String'
            }
          },
          isServiceGroup: {
            required: false,
            serializedName: 'IsServiceGroup',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = ServiceTypeInfo;
