# 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::Monitor::Mgmt::V2015_05_01
  module Models
    #
    # An Application Insights web test definition.
    #
    class WebTest < WebtestsResource

      include MsRestAzure

      # @return [WebTestKind] The kind of web test that this web test watches.
      # Choices are ping and multistep. Possible values include: 'ping',
      # 'multistep'. Default value: 'ping' .
      attr_accessor :kind

      # @return [String] Unique ID of this WebTest. This is typically the same
      # value as the Name field.
      attr_accessor :synthetic_monitor_id

      # @return [String] User defined name if this WebTest.
      attr_accessor :web_test_name

      # @return [String] Purpose/user defined descriptive test for this
      # WebTest.
      attr_accessor :description

      # @return [Boolean] Is the test actively being monitored.
      attr_accessor :enabled

      # @return [Integer] Interval in seconds between test runs for this
      # WebTest. Default value is 300. Default value: 300 .
      attr_accessor :frequency

      # @return [Integer] Seconds until this WebTest will timeout and fail.
      # Default value is 30. Default value: 30 .
      attr_accessor :timeout

      # @return [WebTestKind] The kind of web test this is, valid choices are
      # ping and multistep. Possible values include: 'ping', 'multistep'.
      # Default value: 'ping' .
      attr_accessor :web_test_kind

      # @return [Boolean] Allow for retries should this WebTest fail.
      attr_accessor :retry_enabled

      # @return [Array<WebTestGeolocation>] A list of where to physically run
      # the tests from to give global coverage for accessibility of your
      # application.
      attr_accessor :locations

      # @return [WebTestPropertiesConfiguration] An XML configuration
      # specification for a WebTest.
      attr_accessor :configuration

      # @return [String] Current state of this component, whether or not is has
      # been provisioned within the resource group it is defined. Users cannot
      # change this value but are able to read from it. Values will include
      # Succeeded, Deploying, Canceled, and Failed.
      attr_accessor :provisioning_state


      #
      # Mapper for WebTest class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'WebTest',
          type: {
            name: 'Composite',
            class_name: 'WebTest',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              location: {
                client_side_validation: true,
                required: true,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              kind: {
                client_side_validation: true,
                required: false,
                serialized_name: 'kind',
                default_value: 'ping',
                type: {
                  name: 'Enum',
                  module: 'WebTestKind'
                }
              },
              synthetic_monitor_id: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.SyntheticMonitorId',
                type: {
                  name: 'String'
                }
              },
              web_test_name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.Name',
                type: {
                  name: 'String'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.Description',
                type: {
                  name: 'String'
                }
              },
              enabled: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.Enabled',
                type: {
                  name: 'Boolean'
                }
              },
              frequency: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.Frequency',
                default_value: 300,
                type: {
                  name: 'Number'
                }
              },
              timeout: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.Timeout',
                default_value: 30,
                type: {
                  name: 'Number'
                }
              },
              web_test_kind: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.Kind',
                default_value: 'ping',
                type: {
                  name: 'Enum',
                  module: 'WebTestKind'
                }
              },
              retry_enabled: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.RetryEnabled',
                type: {
                  name: 'Boolean'
                }
              },
              locations: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.Locations',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'WebTestGeolocationElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'WebTestGeolocation'
                      }
                  }
                }
              },
              configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.Configuration',
                type: {
                  name: 'Composite',
                  class_name: 'WebTestPropertiesConfiguration'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
