Class: Azure::ARM::Network::Models::ProbePropertiesFormat

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/azure_mgmt_network/models/probe_properties_format.rb

Overview

Model object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#interval_in_secondsInteger

frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5

Returns:

  • (Integer)

    Gets or sets the interval, in seconds, for how



36
37
38
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 36

def interval_in_seconds
  @interval_in_seconds
end

#load_balancing_rulesArray<SubResource>

probe

Returns:

  • (Array<SubResource>)

    Gets Load balancer rules that use this



17
18
19
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 17

def load_balancing_rules
  @load_balancing_rules
end

#number_of_probesInteger

response, will result in stopping further traffic from being delivered to the endpoint. This values allows endponints to be taken out of rotation faster or slower than the typical times used in Azure.

Returns:

  • (Integer)

    Gets or sets the number of probes where if no



43
44
45
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 43

def number_of_probes
  @number_of_probes
end

#portInteger

Possible values range from 1 to 65535, inclusive.

Returns:

  • (Integer)

    Gets or sets Port for communicating the probe.



29
30
31
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 29

def port
  @port
end

#protocolProbeProtocol

Possible values are http pr Tcp. If Tcp is specified, a received ACK is required for the probe to be successful. If http is specified,a 200 OK response from the specifies URI is required for the probe to be successful. Possible values for this property include: ‘Http’, ‘Tcp’.

Returns:

  • (ProbeProtocol)

    Gets or sets the protocol of the end point.



25
26
27
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 25

def protocol
  @protocol
end

#provisioning_stateString

resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the PublicIP



52
53
54
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 52

def provisioning_state
  @provisioning_state
end

#request_pathString

status from the VM. Path is required if a protocol is set to http. Otherwise, it is not allowed. There is no default value

Returns:

  • (String)

    Gets or sets the URI used for requesting health



48
49
50
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 48

def request_path
  @request_path
end

Class Method Details

.deserialize_object(object) ⇒ ProbePropertiesFormat

Deserializes given Ruby Hash into Model object.

Parameters:

  • object (Hash)

    Ruby Hash object to deserialize.

Returns:



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 109

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

  deserialized_property = object['loadBalancingRules']
  unless deserialized_property.nil?
    deserializedArray = [];
    deserialized_property.each do |element1|
      unless element1.nil?
        element1 = SubResource.deserialize_object(element1)
      end
      deserializedArray.push(element1);
    end
    deserialized_property = deserializedArray;
  end
  output_object.load_balancing_rules = deserialized_property

  deserialized_property = object['protocol']
  if (!deserialized_property.nil? && !deserialized_property.empty?)
    enum_is_valid = ProbeProtocol.constants.any? { |e| ProbeProtocol.const_get(e).to_s.downcase == deserialized_property.downcase }
    fail MsRest::DeserializationError.new('Error occured while deserializing the enum', nil, nil, nil) unless enum_is_valid
  end
  output_object.protocol = deserialized_property

  deserialized_property = object['port']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.port = deserialized_property

  deserialized_property = object['intervalInSeconds']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.interval_in_seconds = deserialized_property

  deserialized_property = object['numberOfProbes']
  deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
  output_object.number_of_probes = deserialized_property

  deserialized_property = object['requestPath']
  output_object.request_path = deserialized_property

  deserialized_property = object['provisioningState']
  output_object.provisioning_state = deserialized_property

  output_object.validate

  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.



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 66

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

  serialized_property = object.load_balancing_rules
  unless serialized_property.nil?
    serializedArray = []
    serialized_property.each do |element|
      unless element.nil?
        element = SubResource.serialize_object(element)
      end
      serializedArray.push(element)
    end
    serialized_property = serializedArray
  end
  output_object['loadBalancingRules'] = serialized_property unless serialized_property.nil?

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

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

  serialized_property = object.interval_in_seconds
  output_object['intervalInSeconds'] = serialized_property unless serialized_property.nil?

  serialized_property = object.number_of_probes
  output_object['numberOfProbes'] = serialized_property unless serialized_property.nil?

  serialized_property = object.request_path
  output_object['requestPath'] = serialized_property unless serialized_property.nil?

  serialized_property = object.provisioning_state
  output_object['provisioningState'] = serialized_property unless serialized_property.nil?

  output_object
end

Instance Method Details

#validateObject

Validate the object. Throws ValidationError if validation fails.



57
58
59
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 57

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