# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Signalr::Mgmt::V2020_05_01
  module Models
    #
    # Settings used to provision or configure the resource.
    #
    class SignalRCreateOrUpdateProperties

      include MsRestAzure

      # @return [String] Prefix for the hostName of the SignalR service.
      # Retained for future use.
      # The hostname will be of format:
      # &lt;hostNamePrefix&gt;.service.signalr.net.
      attr_accessor :host_name_prefix

      # @return [Array<SignalRFeature>] List of SignalR featureFlags. e.g.
      # ServiceMode.
      #
      # FeatureFlags that are not included in the parameters for the update
      # operation will not be modified.
      # And the response will only include featureFlags that are explicitly
      # set.
      # When a featureFlag is not explicitly set, SignalR service will use its
      # globally default value.
      # But keep in mind, the default value doesn't mean "false". It varies in
      # terms of different FeatureFlags.
      attr_accessor :features

      # @return [SignalRCorsSettings] Cross-Origin Resource Sharing (CORS)
      # settings.
      attr_accessor :cors

      # @return [ServerlessUpstreamSettings] Upstream settings when the Azure
      # SignalR is in server-less mode.
      attr_accessor :upstream

      # @return [SignalRNetworkACLs] Network ACLs
      attr_accessor :network_acls


      #
      # Mapper for SignalRCreateOrUpdateProperties class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'SignalRCreateOrUpdateProperties',
          type: {
            name: 'Composite',
            class_name: 'SignalRCreateOrUpdateProperties',
            model_properties: {
              host_name_prefix: {
                client_side_validation: true,
                required: false,
                serialized_name: 'hostNamePrefix',
                type: {
                  name: 'String'
                }
              },
              features: {
                client_side_validation: true,
                required: false,
                serialized_name: 'features',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'SignalRFeatureElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'SignalRFeature'
                      }
                  }
                }
              },
              cors: {
                client_side_validation: true,
                required: false,
                serialized_name: 'cors',
                type: {
                  name: 'Composite',
                  class_name: 'SignalRCorsSettings'
                }
              },
              upstream: {
                client_side_validation: true,
                required: false,
                serialized_name: 'upstream',
                type: {
                  name: 'Composite',
                  class_name: 'ServerlessUpstreamSettings'
                }
              },
              network_acls: {
                client_side_validation: true,
                required: false,
                serialized_name: 'networkACLs',
                type: {
                  name: 'Composite',
                  class_name: 'SignalRNetworkACLs'
                }
              }
            }
          }
        }
      end
    end
  end
end
