text: /*
   * 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');
  
  /**
   * This activity evaluates a boolean expression and executes either the
   * activities under the ifTrueActivities property or the ifFalseActivities
   * property depending on the result of the expression.
   *
   * @extends models['ControlActivity']
   */
  class IfConditionActivity extends models['ControlActivity'] {
    /**
     * Create a IfConditionActivity.
     * @member {object} expression An expression that would evaluate to Boolean.
     * This is used to determine the block of activities (ifTrueActivities or
     * ifFalseActivities) that will be executed.
     * @member {string} [expression.value] Expression value.
     * @member {array} [ifTrueActivities] List of activities to execute if
     * expression is evaluated to true. This is an optional property and if not
     * provided, the activity will exit without any action.
     * @member {array} [ifFalseActivities] List of activities to execute if
     * expression is evaluated to false. This is an optional property and if not
     * provided, the activity will exit without any action.
     */
    constructor() {
      super();
    }
  
    /**
     * Defines the metadata of IfConditionActivity
     *
     * @returns {object} metadata of IfConditionActivity
     *
     */
    mapper() {
      return {
        required: false,
        serializedName: 'IfCondition',
        type: {
          name: 'Composite',
          polymorphicDiscriminator: {
            serializedName: 'type',
            clientName: 'type'
          },
          uberParent: 'Activity',
          className: 'IfConditionActivity',
          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'
              }
            },
            expression: {
              required: true,
              serializedName: 'typeProperties.expression',
              defaultValue: {},
              type: {
                name: 'Composite',
                className: 'Expression'
              }
            },
            ifTrueActivities: {
              required: false,
              serializedName: 'typeProperties.ifTrueActivities',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'ActivityElementType',
                    type: {
                      name: 'Composite',
                      additionalProperties: {
                        type: {
                          name: 'Dictionary',
                          value: {
                              required: false,
                              serializedName: 'ObjectElementType',
                              type: {
                                name: 'Object'
                              }
                          }
                        }
                      },
                      polymorphicDiscriminator: {
                        serializedName: 'type',
                        clientName: 'type'
                      },
                      uberParent: 'Activity',
                      className: 'Activity'
                    }
                }
              }
            },
            ifFalseActivities: {
              required: false,
              serializedName: 'typeProperties.ifFalseActivities',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'ActivityElementType',
                    type: {
                      name: 'Composite',
                      additionalProperties: {
                        type: {
                          name: 'Dictionary',
                          value: {
                              required: false,
                              serializedName: 'ObjectElementType',
                              type: {
                                name: 'Object'
                              }
                          }
                        }
                      },
                      polymorphicDiscriminator: {
                        serializedName: 'type',
                        clientName: 'type'
                      },
                      uberParent: 'Activity',
                      className: 'Activity'
                    }
                }
              }
            }
          }
        }
      };
    }
  }
  
  module.exports = IfConditionActivity;
  