text: /*
   * 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 event request message sent to the service URI.
   *
   */
  class EventRequestMessage {
    /**
     * Create a EventRequestMessage.
     * @property {object} [content] The content of the event request message.
     * @property {string} [content.id] The event ID.
     * @property {date} [content.timestamp] The time at which the event occurred.
     * @property {string} [content.action] The action that encompasses the
     * provided event.
     * @property {object} [content.target] The target of the event.
     * @property {string} [content.target.mediaType] The MIME type of the
     * referenced object.
     * @property {number} [content.target.size] The number of bytes of the
     * content. Same as Length field.
     * @property {string} [content.target.digest] The digest of the content, as
     * defined by the Registry V2 HTTP API Specification.
     * @property {number} [content.target.length] The number of bytes of the
     * content. Same as Size field.
     * @property {string} [content.target.repository] The repository name.
     * @property {string} [content.target.url] The direct URL to the content.
     * @property {string} [content.target.tag] The tag name.
     * @property {string} [content.target.name] The name of the artifact.
     * @property {string} [content.target.version] The version of the artifact.
     * @property {object} [content.request] The request that generated the event.
     * @property {string} [content.request.id] The ID of the request that
     * initiated the event.
     * @property {string} [content.request.addr] The IP or hostname and possibly
     * port of the client connection that initiated the event. This is the
     * RemoteAddr from the standard http request.
     * @property {string} [content.request.host] The externally accessible
     * hostname of the registry instance, as specified by the http host header on
     * incoming requests.
     * @property {string} [content.request.method] The request method that
     * generated the event.
     * @property {string} [content.request.useragent] The user agent header of
     * the request.
     * @property {object} [content.actor] The agent that initiated the event. For
     * most situations, this could be from the authorization context of the
     * request.
     * @property {string} [content.actor.name] The subject or username associated
     * with the request context that generated the event.
     * @property {object} [content.source] The registry node that generated the
     * event. Put differently, while the actor initiates the event, the source
     * generates it.
     * @property {string} [content.source.addr] The IP or hostname and the port
     * of the registry node that generated the event. Generally, this will be
     * resolved by os.Hostname() along with the running port.
     * @property {string} [content.source.instanceID] The running instance of an
     * application. Changes after each restart.
     * @property {object} [headers] The headers of the event request message.
     * @property {string} [method] The HTTP method used to send the event request
     * message.
     * @property {string} [requestUri] The URI used to send the event request
     * message.
     * @property {string} [version] The HTTP message version.
     */
    constructor() {
    }
  
    /**
     * Defines the metadata of EventRequestMessage
     *
     * @returns {object} metadata of EventRequestMessage
     *
     */
    mapper() {
      return {
        required: false,
        serializedName: 'EventRequestMessage',
        type: {
          name: 'Composite',
          className: 'EventRequestMessage',
          modelProperties: {
            content: {
              required: false,
              serializedName: 'content',
              type: {
                name: 'Composite',
                className: 'EventContent'
              }
            },
            headers: {
              required: false,
              serializedName: 'headers',
              type: {
                name: 'Dictionary',
                value: {
                    required: false,
                    serializedName: 'StringElementType',
                    type: {
                      name: 'String'
                    }
                }
              }
            },
            method: {
              required: false,
              serializedName: 'method',
              type: {
                name: 'String'
              }
            },
            requestUri: {
              required: false,
              serializedName: 'requestUri',
              type: {
                name: 'String'
              }
            },
            version: {
              required: false,
              serializedName: 'version',
              type: {
                name: 'String'
              }
            }
          }
        }
      };
    }
  }
  
  module.exports = EventRequestMessage;
  