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

/**
 * A class represent a SignalR service resource.
 *
 * @extends models['TrackedResource']
 */
class SignalRResource extends models['TrackedResource'] {
  /**
   * Create a SignalRResource.
   * @member {object} [sku] SKU of the service.
   * @member {string} [sku.name] The name of the SKU. This is typically a
   * letter + number code, such as A0 or P3.  Required (if sku is specified)
   * @member {string} [sku.tier] Optional tier of this particular SKU. `Basic`
   * is deprecated, use `Standard` instead for Basic tier. Possible values
   * include: 'Free', 'Basic', 'Standard', 'Premium'
   * @member {string} [sku.size] Optional, string. When the name field is the
   * combination of tier and some other value, this would be the standalone
   * code.
   * @member {string} [sku.family] Optional, string. If the service has
   * different generations of hardware, for the same SKU, then that can be
   * captured here.
   * @member {number} [sku.capacity] Optional, integer. If the SKU supports
   * scale out/in then the capacity integer should be included. If scale out/in
   * is not
   * possible for the resource this may be omitted.
   * @member {string} [hostNamePrefix] Prefix for the hostName of the SignalR
   * service. Retained for future use.
   * The hostname will be of format:
   * &lt;hostNamePrefix&gt;.service.signalr.net.
   * @member {string} [provisioningState] Provisioning state of the resource.
   * Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled',
   * 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'
   * @member {string} [externalIP] The publicly accessible IP of the SignalR
   * service.
   * @member {string} [hostName] FQDN of the SignalR service instance. Format:
   * xxx.service.signalr.net
   * @member {number} [publicPort] The publicly accessibly port of the SignalR
   * service which is designed for browser/client side usage.
   * @member {number} [serverPort] The publicly accessibly port of the SignalR
   * service which is designed for customer server side usage.
   * @member {string} [version] Version of the SignalR resource. Probably you
   * need the same or higher version of client SDKs.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SignalRResource
   *
   * @returns {object} metadata of SignalRResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SignalRResource',
      type: {
        name: 'Composite',
        className: 'SignalRResource',
        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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'ResourceSku'
            }
          },
          hostNamePrefix: {
            required: false,
            serializedName: 'properties.hostNamePrefix',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          externalIP: {
            required: false,
            readOnly: true,
            serializedName: 'properties.externalIP',
            type: {
              name: 'String'
            }
          },
          hostName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.hostName',
            type: {
              name: 'String'
            }
          },
          publicPort: {
            required: false,
            readOnly: true,
            serializedName: 'properties.publicPort',
            type: {
              name: 'Number'
            }
          },
          serverPort: {
            required: false,
            readOnly: true,
            serializedName: 'properties.serverPort',
            type: {
              name: 'Number'
            }
          },
          version: {
            required: false,
            serializedName: 'properties.version',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = SignalRResource;
