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

/**
 * Properties of the Service Fabric Type Backend.
 *
 */
class BackendServiceFabricClusterProperties {
  /**
   * Create a BackendServiceFabricClusterProperties.
   * @property {string} clientCertificatethumbprint The client certificate
   * thumbprint for the management endpoint.
   * @property {number} [maxPartitionResolutionRetries] Maximum number of
   * retries while attempting resolve the partition.
   * @property {array} managementEndpoints The cluster management endpoint.
   * @property {array} [serverCertificateThumbprints] Thumbprints of
   * certificates cluster management service uses for tls communication
   * @property {array} [serverX509Names] Server X509 Certificate Names
   * Collection
   */
  constructor() {
  }

  /**
   * Defines the metadata of BackendServiceFabricClusterProperties
   *
   * @returns {object} metadata of BackendServiceFabricClusterProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BackendServiceFabricClusterProperties',
      type: {
        name: 'Composite',
        className: 'BackendServiceFabricClusterProperties',
        modelProperties: {
          clientCertificatethumbprint: {
            required: true,
            serializedName: 'clientCertificatethumbprint',
            type: {
              name: 'String'
            }
          },
          maxPartitionResolutionRetries: {
            required: false,
            serializedName: 'maxPartitionResolutionRetries',
            type: {
              name: 'Number'
            }
          },
          managementEndpoints: {
            required: true,
            serializedName: 'managementEndpoints',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          serverCertificateThumbprints: {
            required: false,
            serializedName: 'serverCertificateThumbprints',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          serverX509Names: {
            required: false,
            serializedName: 'serverX509Names',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'X509CertificateNameElementType',
                  type: {
                    name: 'Composite',
                    className: 'X509CertificateName'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = BackendServiceFabricClusterProperties;
