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

/**
 * Details of the Credentials used to connect to Backend.
 *
 */
class BackendCredentialsContract {
  /**
   * Create a BackendCredentialsContract.
   * @property {array} [certificate] List of Client Certificate Thumbprint.
   * @property {object} [query] Query Parameter description.
   * @property {object} [header] Header Parameter description.
   * @property {object} [authorization] Authorization header authentication
   * @property {string} [authorization.scheme] Authentication Scheme name.
   * @property {string} [authorization.parameter] Authentication Parameter
   * value.
   */
  constructor() {
  }

  /**
   * Defines the metadata of BackendCredentialsContract
   *
   * @returns {object} metadata of BackendCredentialsContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BackendCredentialsContract',
      type: {
        name: 'Composite',
        className: 'BackendCredentialsContract',
        modelProperties: {
          certificate: {
            required: false,
            serializedName: 'certificate',
            constraints: {
              MaxItems: 32
            },
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          query: {
            required: false,
            serializedName: 'query',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ArrayElementType',
                  type: {
                    name: 'Sequence',
                    element: {
                        required: false,
                        serializedName: 'StringElementType',
                        type: {
                          name: 'String'
                        }
                    }
                  }
              }
            }
          },
          header: {
            required: false,
            serializedName: 'header',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ArrayElementType',
                  type: {
                    name: 'Sequence',
                    element: {
                        required: false,
                        serializedName: 'StringElementType',
                        type: {
                          name: 'String'
                        }
                    }
                  }
              }
            }
          },
          authorization: {
            required: false,
            serializedName: 'authorization',
            type: {
              name: 'Composite',
              className: 'BackendAuthorizationHeaderCredentials'
            }
          }
        }
      }
    };
  }
}

module.exports = BackendCredentialsContract;
