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

/**
 * The connector resource format.
 *
 * @extends models['ProxyResource']
 */
class ConnectorResourceFormat extends models['ProxyResource'] {
  /**
   * Create a ConnectorResourceFormat.
   * @member {number} [connectorId] ID of the connector.
   * @member {string} [connectorName] Name of the connector.
   * @member {string} connectorType Type of connector. Possible values include:
   * 'None', 'CRM', 'AzureBlob', 'Salesforce', 'ExchangeOnline', 'Outbound'
   * @member {string} [displayName] Display name of the connector.
   * @member {string} [description] Description of the connector.
   * @member {object} connectorProperties The connector properties.
   * @member {date} [created] The created time.
   * @member {date} [lastModified] The last monified time.
   * @member {string} [state] State of connector. Possible values include:
   * 'Creating', 'Created', 'Ready', 'Expiring', 'Deleting', 'Failed'
   * @member {string} [tenantId] The hub name.
   * @member {boolean} [isInternal] If this is an internal connector.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ConnectorResourceFormat
   *
   * @returns {object} metadata of ConnectorResourceFormat
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ConnectorResourceFormat',
      type: {
        name: 'Composite',
        className: 'ConnectorResourceFormat',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          connectorId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.connectorId',
            type: {
              name: 'Number'
            }
          },
          connectorName: {
            required: false,
            serializedName: 'properties.connectorName',
            type: {
              name: 'String'
            }
          },
          connectorType: {
            required: true,
            serializedName: 'properties.connectorType',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          connectorProperties: {
            required: true,
            serializedName: 'properties.connectorProperties',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ObjectElementType',
                  type: {
                    name: 'Object'
                  }
              }
            }
          },
          created: {
            required: false,
            readOnly: true,
            serializedName: 'properties.created',
            type: {
              name: 'DateTime'
            }
          },
          lastModified: {
            required: false,
            readOnly: true,
            serializedName: 'properties.lastModified',
            type: {
              name: 'DateTime'
            }
          },
          state: {
            required: false,
            readOnly: true,
            serializedName: 'properties.state',
            type: {
              name: 'Enum',
              allowedValues: [ 'Creating', 'Created', 'Ready', 'Expiring', 'Deleting', 'Failed' ]
            }
          },
          tenantId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.tenantId',
            type: {
              name: 'String'
            }
          },
          isInternal: {
            required: false,
            serializedName: 'properties.isInternal',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = ConnectorResourceFormat;
