# 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::SQL::Mgmt::V2014_04_01
  module Models
    #
    # Represents an update to a server.
    #
    class ServerUpdate < Resource

      include MsRestAzure

      # @return [Hash{String => String}] Resource tags.
      attr_accessor :tags

      # @return [String] The fully qualified domain name of the server.
      attr_accessor :fully_qualified_domain_name

      # @return [ServerVersion] The version of the server. Possible values
      # include: '2.0', '12.0'
      attr_accessor :version

      # @return [String] Administrator username for the server. Can only be
      # specified when the server is being created (and is required for
      # creation).
      attr_accessor :administrator_login

      # @return [String] The administrator login password (required for server
      # creation).
      attr_accessor :administrator_login_password

      # @return The ID of the Active Azure Directory object with admin
      # permissions on this server. Legacy parameter, always null. To check for
      # Active Directory admin, query .../servers/{serverName}/administrators.
      attr_accessor :external_administrator_sid

      # @return [String] The display name of the Azure Active Directory object
      # with admin permissions on this server. Legacy parameter, always null.
      # To check for Active Directory admin, query
      # .../servers/{serverName}/administrators
      attr_accessor :external_administrator_login

      # @return [ServerState] The state of the server. Possible values include:
      # 'Ready', 'Disabled'
      attr_accessor :state


      #
      # Mapper for ServerUpdate class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ServerUpdate',
          type: {
            name: 'Composite',
            class_name: 'ServerUpdate',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              fully_qualified_domain_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.fullyQualifiedDomainName',
                type: {
                  name: 'String'
                }
              },
              version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.version',
                type: {
                  name: 'String'
                }
              },
              administrator_login: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.administratorLogin',
                type: {
                  name: 'String'
                }
              },
              administrator_login_password: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.administratorLoginPassword',
                type: {
                  name: 'String'
                }
              },
              external_administrator_sid: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.externalAdministratorSid',
                type: {
                  name: 'String'
                }
              },
              external_administrator_login: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.externalAdministratorLogin',
                type: {
                  name: 'String'
                }
              },
              state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.state',
                type: {
                  name: 'Enum',
                  module: 'ServerState'
                }
              }
            }
          }
        }
      end
    end
  end
end
