Class: Azure::ARM::CDN::Models::EndpointPropertiesUpdateParameters

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#content_types_to_compressArray<String>

will be applied. The value for the elements should be Internet media type.

Returns:

  • (Array<String>)

    List of content types on which compression



26
27
28
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 26

def content_types_to_compress
  @content_types_to_compress
end

#is_compression_enabledBoolean

Default value is false. If compression is enabled, the content transferred from cdn endpoint to end user will be compressed. The requested content must be larger than 1 byte and smaller than 1 MB.

Returns:

  • (Boolean)

    Indicates whether the compression is enabled.



32
33
34
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 32

def is_compression_enabled
  @is_compression_enabled
end

#is_http_allowedBoolean

endpoint. Default value is true. At least one protocol (http or https) must be allowed.

Returns:

  • (Boolean)

    Indicates whether http traffic is allowed on the



37
38
39
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 37

def is_http_allowed
  @is_http_allowed
end

#is_https_allowedBoolean

endpoint. Default value is true. At least one protocol (http or https) must be allowed.

Returns:

  • (Boolean)

    Indicates whether https traffic is allowed on the



42
43
44
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 42

def is_https_allowed
  @is_https_allowed
end

#origin_host_headerString

content requests to origins. The default value would be the host name of the origin.

Returns:

  • (String)

    The host header CDN provider will send along with



18
19
20
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 18

def origin_host_header
  @origin_host_header
end

#origin_pathString

Returns The path used for origin requests.

Returns:

  • (String)

    The path used for origin requests



21
22
23
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 21

def origin_path
  @origin_path
end

#query_string_caching_behaviorQueryStringCachingBehavior

behavior. Possible values include: ‘IgnoreQueryString’, ‘BypassCaching’, ‘UseQueryString’, ‘NotSet’

Returns:



47
48
49
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 47

def query_string_caching_behavior
  @query_string_caching_behavior
end

Class Method Details

.deserialize_object(object) ⇒ EndpointPropertiesUpdateParameters

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 94

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

  deserialized_property = object['originHostHeader']
  output_object.origin_host_header = deserialized_property

  deserialized_property = object['originPath']
  output_object.origin_path = deserialized_property

  deserialized_property = object['contentTypesToCompress']
  output_object.content_types_to_compress = deserialized_property

  deserialized_property = object['isCompressionEnabled']
  output_object.is_compression_enabled = deserialized_property

  deserialized_property = object['isHttpAllowed']
  output_object.is_http_allowed = deserialized_property

  deserialized_property = object['isHttpsAllowed']
  output_object.is_https_allowed = deserialized_property

  deserialized_property = object['queryStringCachingBehavior']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = QueryStringCachingBehavior.constants.any? { |e| QueryStringCachingBehavior.const_get(e).to_s.downcase == deserialized_property.downcase }
    warn 'Enum QueryStringCachingBehavior does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
  end
  output_object.query_string_caching_behavior = 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.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 61

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

  serialized_property = object.origin_host_header
  output_object['originHostHeader'] = serialized_property unless serialized_property.nil?

  serialized_property = object.origin_path
  output_object['originPath'] = serialized_property unless serialized_property.nil?

  serialized_property = object.content_types_to_compress
  output_object['contentTypesToCompress'] = serialized_property unless serialized_property.nil?

  serialized_property = object.is_compression_enabled
  output_object['isCompressionEnabled'] = serialized_property unless serialized_property.nil?

  serialized_property = object.is_http_allowed
  output_object['isHttpAllowed'] = serialized_property unless serialized_property.nil?

  serialized_property = object.is_https_allowed
  output_object['isHttpsAllowed'] = serialized_property unless serialized_property.nil?

  serialized_property = object.query_string_caching_behavior
  output_object['queryStringCachingBehavior'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



52
53
54
# File 'lib/azure_mgmt_cdn/models/endpoint_properties_update_parameters.rb', line 52

def validate
  @content_types_to_compress.each{ |e| e.validate if e.respond_to?(:validate) } unless @content_types_to_compress.nil?
end