# encoding: utf-8
# 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 1.0.0.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module azure.iiot.opc.registry
  module Models
    #
    # Endpoint model
    #
    class EndpointApiModel
      # @return [String] Endpoint url to use to connect with
      attr_accessor :url

      # @return [Array<String>] Alternative endpoint urls that can be used for
      # accessing and validating the server
      attr_accessor :alternative_urls

      # @return [SecurityMode] Possible values include: 'Best', 'Sign',
      # 'SignAndEncrypt', 'None'
      attr_accessor :security_mode

      # @return [String] Security policy uri to use for communication
      # default to best.
      attr_accessor :security_policy

      # @return [Array<Integer>] Endpoint certificate that was registered.
      attr_accessor :certificate


      #
      # Mapper for EndpointApiModel class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'EndpointApiModel',
          type: {
            name: 'Composite',
            class_name: 'EndpointApiModel',
            model_properties: {
              url: {
                client_side_validation: true,
                required: true,
                serialized_name: 'url',
                type: {
                  name: 'String'
                }
              },
              alternative_urls: {
                client_side_validation: true,
                required: false,
                serialized_name: 'alternativeUrls',
                constraints: {
                  UniqueItems: true
                },
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              security_mode: {
                client_side_validation: true,
                required: false,
                serialized_name: 'securityMode',
                type: {
                  name: 'Enum',
                  module: 'SecurityMode'
                }
              },
              security_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'securityPolicy',
                type: {
                  name: 'String'
                }
              },
              certificate: {
                client_side_validation: true,
                required: false,
                serialized_name: 'certificate',
                type: {
                  name: 'ByteArray'
                }
              }
            }
          }
        }
      end
    end
  end
end
