Class: Azure::CognitiveServices::ImageSearch::V1_0::Models::Rating

Inherits:
PropertiesItem
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/1.0/generated/azure_cognitiveservices_imagesearch/models/rating.rb

Overview

Defines a rating.

Direct Known Subclasses

AggregateRating

Instance Attribute Summary collapse

Attributes inherited from PropertiesItem

#text

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRating

Returns a new instance of Rating.



16
17
18
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/rating.rb', line 16

def initialize
  @_type = "Rating"
end

Instance Attribute Details

#_typeObject

Returns the value of attribute _type.



20
21
22
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/rating.rb', line 20

def _type
  @_type
end

#best_ratingFloat

through 5.0.

Returns:

  • (Float)

    The highest rated review. The possible values are 1.0



28
29
30
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/rating.rb', line 28

def best_rating
  @best_rating
end

#rating_valueFloat

through 5.0.

Returns:

  • (Float)

    The mean (average) rating. The possible values are 1.0



24
25
26
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/rating.rb', line 24

def rating_value
  @rating_value
end

Class Method Details

.mapperObject

Mapper for Rating class as Ruby Hash. This will be used for serialization/deserialization.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/1.0/generated/azure_cognitiveservices_imagesearch/models/rating.rb', line 35

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'Rating',
    type: {
      name: 'Composite',
      class_name: 'Rating',
      model_properties: {
        text: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'text',
          type: {
            name: 'String'
          }
        },
        _type: {
          client_side_validation: true,
          required: true,
          serialized_name: '_type',
          type: {
            name: 'String'
          }
        },
        rating_value: {
          client_side_validation: true,
          required: true,
          serialized_name: 'ratingValue',
          type: {
            name: 'Double'
          }
        },
        best_rating: {
          client_side_validation: true,
          required: false,
          read_only: true,
          serialized_name: 'bestRating',
          type: {
            name: 'Double'
          }
        }
      }
    }
  }
end