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

/**
 * Execute SSIS package activity.
 *
 * @extends models['ExecutionActivity']
 */
class ExecuteSSISPackageActivity extends models['ExecutionActivity'] {
  /**
   * Create a ExecuteSSISPackageActivity.
   * @member {object} packageLocation SSIS package location.
   * @member {string} [packageLocation.packagePath] The SSIS package path.
   * @member {string} [runtime] Specifies the runtime to execute SSIS package.
   * Possible values include: 'x64', 'x86'
   * @member {string} [loggingLevel] The logging level of SSIS package
   * execution.
   * @member {string} [environmentPath] The environment path to execute the
   * SSIS package.
   * @member {object} connectVia The integration runtime reference.
   * @member {string} [connectVia.referenceName] Reference integration runtime
   * name.
   * @member {object} [connectVia.parameters] Arguments for integration
   * runtime.
   * @member {object} [projectParameters] The project level parameters to
   * execute the SSIS package.
   * @member {object} [packageParameters] The package level parameters to
   * execute the SSIS package.
   * @member {object} [projectConnectionManagers] The project level connection
   * managers to execute the SSIS package.
   * @member {object} [packageConnectionManagers] The package level connection
   * managers to execute the SSIS package.
   * @member {object} [propertyOverrides] The property overrides to execute the
   * SSIS package.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ExecuteSSISPackageActivity
   *
   * @returns {object} metadata of ExecuteSSISPackageActivity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ExecuteSSISPackage',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'Activity',
        className: 'ExecuteSSISPackageActivity',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          dependsOn: {
            required: false,
            serializedName: 'dependsOn',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ActivityDependencyElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'ActivityDependency'
                  }
              }
            }
          },
          userProperties: {
            required: false,
            serializedName: 'userProperties',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'UserPropertyElementType',
                  type: {
                    name: 'Composite',
                    className: 'UserProperty'
                  }
              }
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          linkedServiceName: {
            required: false,
            serializedName: 'linkedServiceName',
            type: {
              name: 'Composite',
              className: 'LinkedServiceReference'
            }
          },
          policy: {
            required: false,
            serializedName: 'policy',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'ActivityPolicy'
            }
          },
          packageLocation: {
            required: true,
            serializedName: 'typeProperties.packageLocation',
            type: {
              name: 'Composite',
              className: 'SSISPackageLocation'
            }
          },
          runtime: {
            required: false,
            serializedName: 'typeProperties.runtime',
            type: {
              name: 'String'
            }
          },
          loggingLevel: {
            required: false,
            serializedName: 'typeProperties.loggingLevel',
            type: {
              name: 'String'
            }
          },
          environmentPath: {
            required: false,
            serializedName: 'typeProperties.environmentPath',
            type: {
              name: 'String'
            }
          },
          connectVia: {
            required: true,
            serializedName: 'typeProperties.connectVia',
            defaultValue: {},
            type: {
              name: 'Composite',
              className: 'IntegrationRuntimeReference'
            }
          },
          projectParameters: {
            required: false,
            serializedName: 'typeProperties.projectParameters',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'SSISExecutionParameterElementType',
                  type: {
                    name: 'Composite',
                    className: 'SSISExecutionParameter'
                  }
              }
            }
          },
          packageParameters: {
            required: false,
            serializedName: 'typeProperties.packageParameters',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'SSISExecutionParameterElementType',
                  type: {
                    name: 'Composite',
                    className: 'SSISExecutionParameter'
                  }
              }
            }
          },
          projectConnectionManagers: {
            required: false,
            serializedName: 'typeProperties.projectConnectionManagers',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ObjectElementType',
                  type: {
                    name: 'Dictionary',
                    value: {
                        required: false,
                        serializedName: 'SSISExecutionParameterElementType',
                        type: {
                          name: 'Composite',
                          className: 'SSISExecutionParameter'
                        }
                    }
                  }
              }
            }
          },
          packageConnectionManagers: {
            required: false,
            serializedName: 'typeProperties.packageConnectionManagers',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ObjectElementType',
                  type: {
                    name: 'Dictionary',
                    value: {
                        required: false,
                        serializedName: 'SSISExecutionParameterElementType',
                        type: {
                          name: 'Composite',
                          className: 'SSISExecutionParameter'
                        }
                    }
                  }
              }
            }
          },
          propertyOverrides: {
            required: false,
            serializedName: 'typeProperties.propertyOverrides',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'SSISPropertyOverrideElementType',
                  type: {
                    name: 'Composite',
                    className: 'SSISPropertyOverride'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ExecuteSSISPackageActivity;
