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

/**
 * The metadata associated with a property, including the property's name.
 *
 */
class PropertyMetadata {
  /**
   * Create a PropertyMetadata.
   * @property {string} [typeId] The kind of property, determined by the type
   * of data. Following are the possible values. Possible values include:
   * 'Invalid', 'Binary', 'Int64', 'Double', 'String', 'Guid'
   * @property {string} [customTypeId] The property's custom type ID.
   * @property {string} [parent] The name of the parent Service Fabric Name for
   * the property. It could be thought of as the name-space/table under which
   * the property exists.
   * @property {number} [sizeInBytes] The length of the serialized property
   * value.
   * @property {date} [lastModifiedUtcTimestamp] Represents when the Property
   * was last modified. Only write operations will cause this field to be
   * updated.
   * @property {string} [sequenceNumber] The version of the property. Every
   * time a property is modified, its sequence number is increased.
   */
  constructor() {
  }

  /**
   * Defines the metadata of PropertyMetadata
   *
   * @returns {object} metadata of PropertyMetadata
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'PropertyMetadata',
      type: {
        name: 'Composite',
        className: 'PropertyMetadata',
        modelProperties: {
          typeId: {
            required: false,
            serializedName: 'TypeId',
            type: {
              name: 'String'
            }
          },
          customTypeId: {
            required: false,
            serializedName: 'CustomTypeId',
            type: {
              name: 'String'
            }
          },
          parent: {
            required: false,
            serializedName: 'Parent',
            type: {
              name: 'String'
            }
          },
          sizeInBytes: {
            required: false,
            serializedName: 'SizeInBytes',
            type: {
              name: 'Number'
            }
          },
          lastModifiedUtcTimestamp: {
            required: false,
            serializedName: 'LastModifiedUtcTimestamp',
            type: {
              name: 'DateTime'
            }
          },
          sequenceNumber: {
            required: false,
            serializedName: 'SequenceNumber',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = PropertyMetadata;
