Class: Azure::MobileEngagement::Mgmt::V2014_12_01::Models::PollQuestionChoice

Inherits:
PollQuestionChoiceLocalization show all
Includes:
MsRestAzure
Defined in:
lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb

Overview

Model object.

Instance Attribute Summary collapse

Attributes inherited from PollQuestionChoiceLocalization

#title

Class Method Summary collapse

Instance Attribute Details

#idInteger

Returns Unique identifier of the choice.

Returns:

  • (Integer)

    Unique identifier of the choice.



17
18
19
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb', line 17

def id
  @id
end

#is_defaultBoolean

choice for the associated question. Only one choice in the array can have this value set to true. Default value: false .

Returns:

  • (Boolean)

    A flag indicating if this choice is the default



30
31
32
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb', line 30

def is_default
  @is_default
end

#localizationHash{String => PollQuestionChoiceLocalization}

can be localized using an optional JSON object. The JSON key is a two-character language code as specified by the ISO 639-1 standard. The corresponding value is an object containing the localizable property title.

Returns:



25
26
27
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb', line 25

def localization
  @localization
end

Class Method Details

.mapperObject

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



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
82
83
84
85
86
87
88
# File 'lib/2014-12-01/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb', line 37

def self.mapper()
  {
    required: false,
    serialized_name: 'PollQuestionChoice',
    type: {
      name: 'Composite',
      class_name: 'PollQuestionChoice',
      model_properties: {
        title: {
          required: false,
          serialized_name: 'title',
          constraints: {
            MaxLength: 256
          },
          type: {
            name: 'String'
          }
        },
        id: {
          required: false,
          serialized_name: 'id',
          type: {
            name: 'Number'
          }
        },
        localization: {
          required: false,
          serialized_name: 'localization',
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serialized_name: 'PollQuestionChoiceLocalizationElementType',
                type: {
                  name: 'Composite',
                  class_name: 'PollQuestionChoiceLocalization'
                }
            }
          }
        },
        is_default: {
          required: false,
          serialized_name: 'isDefault',
          default_value: false,
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  }
end