/*
 * 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 downloading packages associated with a service
 * manifest to image cache on a Service Fabric node.
 *
 */
class DeployServicePackageToNodeDescription {
  /**
   * Create a DeployServicePackageToNodeDescription.
   * @property {string} serviceManifestName The name of service manifest whose
   * packages need to be downloaded.
   * @property {string} applicationTypeName The application type name as
   * defined in the application manifest.
   * @property {string} applicationTypeVersion The version of the application
   * type as defined in the application manifest.
   * @property {string} nodeName The name of a Service Fabric node.
   * @property {array} [packageSharingPolicy] List of package sharing policy
   * information.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DeployServicePackageToNodeDescription
   *
   * @returns {object} metadata of DeployServicePackageToNodeDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DeployServicePackageToNodeDescription',
      type: {
        name: 'Composite',
        className: 'DeployServicePackageToNodeDescription',
        modelProperties: {
          serviceManifestName: {
            required: true,
            serializedName: 'ServiceManifestName',
            type: {
              name: 'String'
            }
          },
          applicationTypeName: {
            required: true,
            serializedName: 'ApplicationTypeName',
            type: {
              name: 'String'
            }
          },
          applicationTypeVersion: {
            required: true,
            serializedName: 'ApplicationTypeVersion',
            type: {
              name: 'String'
            }
          },
          nodeName: {
            required: true,
            serializedName: 'NodeName',
            type: {
              name: 'String'
            }
          },
          packageSharingPolicy: {
            required: false,
            serializedName: 'PackageSharingPolicy',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'PackageSharingPolicyInfoElementType',
                  type: {
                    name: 'Composite',
                    className: 'PackageSharingPolicyInfo'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = DeployServicePackageToNodeDescription;
