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

/**
 * Copy activity.
 *
 * @extends models['ExecutionActivity']
 */
class CopyActivity extends models['ExecutionActivity'] {
  /**
   * Create a CopyActivity.
   * @member {object} source Copy activity source.
   * @member {object} [source.sourceRetryCount] Source retry count. Type:
   * integer (or Expression with resultType integer).
   * @member {object} [source.sourceRetryWait] Source retry wait. Type: string
   * (or Expression with resultType string), pattern:
   * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
   * @member {string} [source.type] Polymorphic Discriminator
   * @member {object} sink Copy activity sink.
   * @member {object} [sink.writeBatchSize] Write batch size. Type: integer (or
   * Expression with resultType integer), minimum: 0.
   * @member {object} [sink.writeBatchTimeout] Write batch timeout. Type:
   * string (or Expression with resultType string), pattern:
   * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
   * @member {object} [sink.sinkRetryCount] Sink retry count. Type: integer (or
   * Expression with resultType integer).
   * @member {object} [sink.sinkRetryWait] Sink retry wait. Type: string (or
   * Expression with resultType string), pattern:
   * ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).
   * @member {string} [sink.type] Polymorphic Discriminator
   * @member {object} [translator] Copy activity translator. If not specificed,
   * tabular translator is used.
   * @member {string} [translator.type] Polymorphic Discriminator
   * @member {object} [enableStaging] Specifies whether to copy data via an
   * interim staging. Default value is false. Type: boolean (or Expression with
   * resultType boolean).
   * @member {object} [stagingSettings] Specifies interim staging settings when
   * EnableStaging is true.
   * @member {object} [stagingSettings.linkedServiceName] Staging linked
   * service reference.
   * @member {string} [stagingSettings.linkedServiceName.referenceName]
   * Reference LinkedService name.
   * @member {object} [stagingSettings.linkedServiceName.parameters] Arguments
   * for LinkedService.
   * @member {object} [stagingSettings.path] The path to storage for storing
   * the interim data. Type: string (or Expression with resultType string).
   * @member {object} [stagingSettings.enableCompression] Specifies whether to
   * use compression when copying data via an interim staging. Default value is
   * false. Type: boolean (or Expression with resultType boolean).
   * @member {object} [parallelCopies] Maximum number of concurrent sessions
   * opened on the source or sink to avoid overloading the data store. Type:
   * integer (or Expression with resultType integer), minimum: 0.
   * @member {object} [dataIntegrationUnits] Maximum number of data integration
   * units that can be used to perform this data movement. Type: integer (or
   * Expression with resultType integer), minimum: 0.
   * @member {object} [enableSkipIncompatibleRow] Whether to skip incompatible
   * row. Default value is false. Type: boolean (or Expression with resultType
   * boolean).
   * @member {object} [redirectIncompatibleRowSettings] Redirect incompatible
   * row settings when EnableSkipIncompatibleRow is true.
   * @member {object} [redirectIncompatibleRowSettings.linkedServiceName] Name
   * of the Azure Storage, Storage SAS, or Azure Data Lake Store linked service
   * used for redirecting incompatible row. Must be specified if
   * redirectIncompatibleRowSettings is specified. Type: string (or Expression
   * with resultType string).
   * @member {object} [redirectIncompatibleRowSettings.path] The path for
   * storing the redirect incompatible row data. Type: string (or Expression
   * with resultType string).
   * @member {array} [inputs] List of inputs for the activity.
   * @member {array} [outputs] List of outputs for the activity.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of CopyActivity
   *
   * @returns {object} metadata of CopyActivity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Copy',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'Activity',
        className: 'CopyActivity',
        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'
            }
          },
          source: {
            required: true,
            serializedName: 'typeProperties.source',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'CopySource',
              className: 'CopySource'
            }
          },
          sink: {
            required: true,
            serializedName: 'typeProperties.sink',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'CopySink',
              className: 'CopySink'
            }
          },
          translator: {
            required: false,
            serializedName: 'typeProperties.translator',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'CopyTranslator',
              className: 'CopyTranslator'
            }
          },
          enableStaging: {
            required: false,
            serializedName: 'typeProperties.enableStaging',
            type: {
              name: 'Object'
            }
          },
          stagingSettings: {
            required: false,
            serializedName: 'typeProperties.stagingSettings',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'StagingSettings'
            }
          },
          parallelCopies: {
            required: false,
            serializedName: 'typeProperties.parallelCopies',
            type: {
              name: 'Object'
            }
          },
          dataIntegrationUnits: {
            required: false,
            serializedName: 'typeProperties.dataIntegrationUnits',
            type: {
              name: 'Object'
            }
          },
          enableSkipIncompatibleRow: {
            required: false,
            serializedName: 'typeProperties.enableSkipIncompatibleRow',
            type: {
              name: 'Object'
            }
          },
          redirectIncompatibleRowSettings: {
            required: false,
            serializedName: 'typeProperties.redirectIncompatibleRowSettings',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'RedirectIncompatibleRowSettings'
            }
          },
          inputs: {
            required: false,
            serializedName: 'inputs',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DatasetReferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'DatasetReference'
                  }
              }
            }
          },
          outputs: {
            required: false,
            serializedName: 'outputs',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DatasetReferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'DatasetReference'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = CopyActivity;
