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

/**
 * Self-hosted integration runtime status.
 *
 * @extends models['IntegrationRuntimeStatus']
 */
class SelfHostedIntegrationRuntimeStatus extends models['IntegrationRuntimeStatus'] {
  /**
   * Create a SelfHostedIntegrationRuntimeStatus.
   * @member {date} [createTime] The time at which the integration runtime was
   * created, in ISO8601 format.
   * @member {string} [taskQueueId] The task queue id of the integration
   * runtime.
   * @member {string} [internalChannelEncryption] It is used to set the
   * encryption mode for node-node communication channel (when more than 2
   * self-hosted integration runtime nodes exist). Possible values include:
   * 'NotSet', 'SslEncrypted', 'NotEncrypted'
   * @member {string} [version] Version of the integration runtime.
   * @member {array} [nodes] The list of nodes for this integration runtime.
   * @member {date} [scheduledUpdateDate] The date at which the integration
   * runtime will be scheduled to update, in ISO8601 format.
   * @member {string} [updateDelayOffset] The time in the date scheduled by
   * service to update the integration runtime, e.g., PT03H is 3 hours
   * @member {string} [localTimeZoneOffset] The local time zone offset in
   * hours.
   * @member {object} [capabilities] Object with additional information about
   * integration runtime capabilities.
   * @member {array} [serviceUrls] The URLs for the services used in
   * integration runtime backend service.
   * @member {string} [autoUpdate] Whether Self-hosted integration runtime auto
   * update has been turned on. Possible values include: 'On', 'Off'
   * @member {string} [versionStatus] Status of the integration runtime
   * version.
   * @member {array} [links] The list of linked integration runtimes that are
   * created to share with this integration runtime.
   * @member {string} [pushedVersion] The version that the integration runtime
   * is going to update to.
   * @member {string} [latestVersion] The latest version on download center.
   * @member {date} [autoUpdateETA] The estimated time when the self-hosted
   * integration runtime will be updated.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SelfHostedIntegrationRuntimeStatus
   *
   * @returns {object} metadata of SelfHostedIntegrationRuntimeStatus
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SelfHosted',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'IntegrationRuntimeStatus',
        className: 'SelfHostedIntegrationRuntimeStatus',
        modelProperties: {
          dataFactoryName: {
            required: false,
            readOnly: true,
            serializedName: 'dataFactoryName',
            type: {
              name: 'String'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'state',
            type: {
              name: 'String'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          createTime: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.createTime',
            type: {
              name: 'DateTime'
            }
          },
          taskQueueId: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.taskQueueId',
            type: {
              name: 'String'
            }
          },
          internalChannelEncryption: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.internalChannelEncryption',
            type: {
              name: 'String'
            }
          },
          version: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.version',
            type: {
              name: 'String'
            }
          },
          nodes: {
            required: false,
            serializedName: 'typeProperties.nodes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'SelfHostedIntegrationRuntimeNodeElementType',
                  type: {
                    name: 'Composite',
                    additionalProperties: {
                      type: {
                        name: 'Dictionary',
                        value: {
                            required: false,
                            serializedName: 'ObjectElementType',
                            type: {
                              name: 'Object'
                            }
                        }
                      }
                    },
                    className: 'SelfHostedIntegrationRuntimeNode'
                  }
              }
            }
          },
          scheduledUpdateDate: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.scheduledUpdateDate',
            type: {
              name: 'DateTime'
            }
          },
          updateDelayOffset: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.updateDelayOffset',
            type: {
              name: 'String'
            }
          },
          localTimeZoneOffset: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.localTimeZoneOffset',
            type: {
              name: 'String'
            }
          },
          capabilities: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.capabilities',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          serviceUrls: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.serviceUrls',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          autoUpdate: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.autoUpdate',
            type: {
              name: 'String'
            }
          },
          versionStatus: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.versionStatus',
            type: {
              name: 'String'
            }
          },
          links: {
            required: false,
            serializedName: 'typeProperties.links',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'LinkedIntegrationRuntimeElementType',
                  type: {
                    name: 'Composite',
                    className: 'LinkedIntegrationRuntime'
                  }
              }
            }
          },
          pushedVersion: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.pushedVersion',
            type: {
              name: 'String'
            }
          },
          latestVersion: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.latestVersion',
            type: {
              name: 'String'
            }
          },
          autoUpdateETA: {
            required: false,
            readOnly: true,
            serializedName: 'typeProperties.autoUpdateETA',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = SelfHostedIntegrationRuntimeStatus;
