Class: Azure::ARM::Web::Models::HandlerMapping

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_web/models/handler_mapping.rb

Overview

The IIS handler mappings used to define which handler processes HTTP requests with certain extension. For example it is used to configure php-cgi.exe process to handle all HTTP requests with *.php extension.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsString

processor.

Returns:

  • (String)

    Command-line arguments to be passed to the script



27
28
29
# File 'lib/azure_mgmt_web/models/handler_mapping.rb', line 27

def arguments
  @arguments
end

#extensionString

the specified FastCGI application.

Returns:

  • (String)

    Requests with this extension will be handled using



20
21
22
# File 'lib/azure_mgmt_web/models/handler_mapping.rb', line 20

def extension
  @extension
end

#script_processorString

Returns The absolute path to the FastCGI application.

Returns:

  • (String)

    The absolute path to the FastCGI application.



23
24
25
# File 'lib/azure_mgmt_web/models/handler_mapping.rb', line 23

def script_processor
  @script_processor
end

Class Method Details

.deserialize_object(object) ⇒ HandlerMapping

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/azure_mgmt_web/models/handler_mapping.rb', line 62

def self.deserialize_object(object)
  return if object.nil?
  output_object = HandlerMapping.new

  deserialized_property = object['extension']
  output_object.extension = deserialized_property

  deserialized_property = object['scriptProcessor']
  output_object.script_processor = deserialized_property

  deserialized_property = object['arguments']
  output_object.arguments = deserialized_property

  output_object
end

.serialize_object(object) ⇒ Hash

Serializes given Model object into Ruby Hash.

Parameters:

  • object

    Model object to serialize.

Returns:

  • (Hash)

    Serialized object in form of Ruby Hash.



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/azure_mgmt_web/models/handler_mapping.rb', line 41

def self.serialize_object(object)
  object.validate
  output_object = {}

  serialized_property = object.extension
  output_object['extension'] = serialized_property unless serialized_property.nil?

  serialized_property = object.script_processor
  output_object['scriptProcessor'] = serialized_property unless serialized_property.nil?

  serialized_property = object.arguments
  output_object['arguments'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



32
33
34
# File 'lib/azure_mgmt_web/models/handler_mapping.rb', line 32

def validate
  # Nothing to validate
end