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



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

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



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

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.



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

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 include: ‘Http’, ‘Tcp’

Returns:

  • (ProbeProtocol)

    Gets or sets the protocol of the end point.



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

def protocol
  @protocol
end

#provisioning_stateString

resource Updating/Deleting/Failed

Returns:

  • (String)

    Gets or sets Provisioning state of the PublicIP



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

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



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

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:



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
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 110

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

  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 }
    warn 'Enum ProbeProtocol does not contain ' + deserialized_property.downcase + ', but was received from the server.' 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['loadBalancingRules']
  unless deserialized_property.nil?
    deserialized_array = []
    deserialized_property.each do |element1|
      unless element1.nil?
        element1 = MsRestAzure::SubResource.deserialize_object(element1)
      end
      deserialized_array.push(element1)
    end
    deserialized_property = deserialized_array
  end
  output_object.load_balancing_rules = 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
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.



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
103
# File 'lib/azure_mgmt_network/models/probe_properties_format.rb', line 67

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

  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.load_balancing_rules
  unless serialized_property.nil?
    serializedArray = []
    serialized_property.each do |element|
      unless element.nil?
        element = MsRestAzure::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.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.



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

def validate
  fail MsRest::ValidationError, 'property protocol is nil' if @protocol.nil?
  fail MsRest::ValidationError, 'property port is nil' if @port.nil?
  @load_balancing_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @load_balancing_rules.nil?
end