# 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::ServiceFabric::V7_0_0_42
  module Models
    #
    # Probes have a number of fields that you can use to control their
    # behavior.
    #
    class Probe

      include MsRestAzure

      # @return [Integer] The initial delay in seconds to start executing probe
      # once code package has started.
      attr_accessor :initial_delay_seconds

      # @return [Integer] Periodic seconds to execute probe.
      attr_accessor :period_seconds

      # @return [Integer] Period after which probe is considered as failed if
      # it hasn't completed successfully.
      attr_accessor :timeout_seconds

      # @return [Integer] The count of successful probe executions after which
      # probe is considered success.
      attr_accessor :success_threshold

      # @return [Integer] The count of failures after which probe is considered
      # failed.
      attr_accessor :failure_threshold

      # @return [ProbeExec] Exec command to run inside the container.
      attr_accessor :exec

      # @return [ProbeHttpGet] Http probe for the container.
      attr_accessor :http_get

      # @return [ProbeTcpSocket] Tcp port to probe inside the container.
      attr_accessor :tcp_socket


      #
      # Mapper for Probe class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Probe',
          type: {
            name: 'Composite',
            class_name: 'Probe',
            model_properties: {
              initial_delay_seconds: {
                client_side_validation: true,
                required: false,
                serialized_name: 'initialDelaySeconds',
                type: {
                  name: 'Number'
                }
              },
              period_seconds: {
                client_side_validation: true,
                required: false,
                serialized_name: 'periodSeconds',
                type: {
                  name: 'Number'
                }
              },
              timeout_seconds: {
                client_side_validation: true,
                required: false,
                serialized_name: 'timeoutSeconds',
                type: {
                  name: 'Number'
                }
              },
              success_threshold: {
                client_side_validation: true,
                required: false,
                serialized_name: 'successThreshold',
                type: {
                  name: 'Number'
                }
              },
              failure_threshold: {
                client_side_validation: true,
                required: false,
                serialized_name: 'failureThreshold',
                type: {
                  name: 'Number'
                }
              },
              exec: {
                client_side_validation: true,
                required: false,
                serialized_name: 'exec',
                type: {
                  name: 'Composite',
                  class_name: 'ProbeExec'
                }
              },
              http_get: {
                client_side_validation: true,
                required: false,
                serialized_name: 'httpGet',
                type: {
                  name: 'Composite',
                  class_name: 'ProbeHttpGet'
                }
              },
              tcp_socket: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tcpSocket',
                type: {
                  name: 'Composite',
                  class_name: 'ProbeTcpSocket'
                }
              }
            }
          }
        }
      end
    end
  end
end
