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

/**
 * Hybrid Connection contract. This is used to configure a Hybrid Connection.
 *
 * @extends models['ProxyOnlyResource']
 */
class HybridConnection extends models['ProxyOnlyResource'] {
  /**
   * Create a HybridConnection.
   * @member {string} [serviceBusNamespace] The name of the Service Bus
   * namespace.
   * @member {string} [relayName] The name of the Service Bus relay.
   * @member {string} [relayArmUri] The ARM URI to the Service Bus relay.
   * @member {string} [hostname] The hostname of the endpoint.
   * @member {number} [port] The port of the endpoint.
   * @member {string} [sendKeyName] The name of the Service Bus key which has
   * Send permissions. This is used to authenticate to Service Bus.
   * @member {string} [sendKeyValue] The value of the Service Bus key. This is
   * used to authenticate to Service Bus. In ARM this key will not be returned
   * normally, use the POST /listKeys API instead.
   * @member {string} [serviceBusSuffix] The suffix for the service bus
   * endpoint. By default this is .servicebus.windows.net
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of HybridConnection
   *
   * @returns {object} metadata of HybridConnection
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HybridConnection',
      type: {
        name: 'Composite',
        className: 'HybridConnection',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          serviceBusNamespace: {
            required: false,
            serializedName: 'properties.serviceBusNamespace',
            type: {
              name: 'String'
            }
          },
          relayName: {
            required: false,
            serializedName: 'properties.relayName',
            type: {
              name: 'String'
            }
          },
          relayArmUri: {
            required: false,
            serializedName: 'properties.relayArmUri',
            type: {
              name: 'String'
            }
          },
          hostname: {
            required: false,
            serializedName: 'properties.hostname',
            type: {
              name: 'String'
            }
          },
          port: {
            required: false,
            serializedName: 'properties.port',
            type: {
              name: 'Number'
            }
          },
          sendKeyName: {
            required: false,
            serializedName: 'properties.sendKeyName',
            type: {
              name: 'String'
            }
          },
          sendKeyValue: {
            required: false,
            serializedName: 'properties.sendKeyValue',
            type: {
              name: 'String'
            }
          },
          serviceBusSuffix: {
            required: false,
            serializedName: 'properties.serviceBusSuffix',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = HybridConnection;
