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

/**
 * Defines description for creating a Service Fabric service from a template
 * defined in the application manifest.
 *
 */
class ServiceFromTemplateDescription {
  /**
   * Create a ServiceFromTemplateDescription.
   * @property {string} applicationName The name of the application, including
   * the 'fabric:' URI scheme.
   * @property {string} serviceName The full name of the service with 'fabric:'
   * URI scheme.
   * @property {string} serviceTypeName Name of the service type as specified
   * in the service manifest.
   * @property {array} [initializationData] The initialization data for the
   * newly created service instance.
   * @property {string} [servicePackageActivationMode] The activation mode of
   * service package to be used for a service. Possible values include:
   * 'SharedProcess', 'ExclusiveProcess'
   * @property {string} [serviceDnsName] The DNS name of the service. It
   * requires the DNS system service to be enabled in Service Fabric cluster.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ServiceFromTemplateDescription
   *
   * @returns {object} metadata of ServiceFromTemplateDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ServiceFromTemplateDescription',
      type: {
        name: 'Composite',
        className: 'ServiceFromTemplateDescription',
        modelProperties: {
          applicationName: {
            required: true,
            serializedName: 'ApplicationName',
            type: {
              name: 'String'
            }
          },
          serviceName: {
            required: true,
            serializedName: 'ServiceName',
            type: {
              name: 'String'
            }
          },
          serviceTypeName: {
            required: true,
            serializedName: 'ServiceTypeName',
            type: {
              name: 'String'
            }
          },
          initializationData: {
            required: false,
            serializedName: 'InitializationData',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'NumberElementType',
                  type: {
                    name: 'Number'
                  }
              }
            }
          },
          servicePackageActivationMode: {
            required: false,
            serializedName: 'ServicePackageActivationMode',
            type: {
              name: 'String'
            }
          },
          serviceDnsName: {
            required: false,
            serializedName: 'ServiceDnsName',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ServiceFromTemplateDescription;
