Class: MicrosoftGraph::Models::TermsAndConditions

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/terms_and_conditions.rb

Overview

A termsAndConditions entity represents the metadata and contents of a given Terms and Conditions (T&C) policy. T&C policies’ contents are presented to users upon their first attempt to enroll into Intune and subsequently upon edits where an administrator has required re-acceptance. They enable administrators to communicate the provisions to which a user must agree in order to have devices enrolled into Intune.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new termsAndConditions and sets the default values.



106
107
108
# File 'lib/models/terms_and_conditions.rb', line 106

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a terms_and_conditions

Raises:

  • (StandardError)


129
130
131
132
# File 'lib/models/terms_and_conditions.rb', line 129

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return TermsAndConditions.new
end

Instance Method Details

#acceptance_statementObject

Gets the acceptanceStatement property value. Administrator-supplied explanation of the terms and conditions, typically describing what it means to accept the terms and conditions set out in the T&C policy. This is shown to the user on prompts to accept the T&C policy.

Returns:

  • a string



46
47
48
# File 'lib/models/terms_and_conditions.rb', line 46

def acceptance_statement
    return @acceptance_statement
end

#acceptance_statement=(value) ⇒ Object

Sets the acceptanceStatement property value. Administrator-supplied explanation of the terms and conditions, typically describing what it means to accept the terms and conditions set out in the T&C policy. This is shown to the user on prompts to accept the T&C policy.

Parameters:

  • value

    Value to set for the acceptanceStatement property.

Returns:

  • a void



54
55
56
# File 'lib/models/terms_and_conditions.rb', line 54

def acceptance_statement=(value)
    @acceptance_statement = value
end

#acceptance_statusesObject

Gets the acceptanceStatuses property value. The list of acceptance statuses for this T&C policy.

Returns:

  • a terms_and_conditions_acceptance_status



61
62
63
# File 'lib/models/terms_and_conditions.rb', line 61

def acceptance_statuses
    return @acceptance_statuses
end

#acceptance_statuses=(value) ⇒ Object

Sets the acceptanceStatuses property value. The list of acceptance statuses for this T&C policy.

Parameters:

  • value

    Value to set for the acceptanceStatuses property.

Returns:

  • a void



69
70
71
# File 'lib/models/terms_and_conditions.rb', line 69

def acceptance_statuses=(value)
    @acceptance_statuses = value
end

#assignmentsObject

Gets the assignments property value. The list of assignments for this T&C policy.

Returns:

  • a terms_and_conditions_assignment



76
77
78
# File 'lib/models/terms_and_conditions.rb', line 76

def assignments
    return @assignments
end

#assignments=(value) ⇒ Object

Sets the assignments property value. The list of assignments for this T&C policy.

Parameters:

  • value

    Value to set for the assignments property.

Returns:

  • a void



84
85
86
# File 'lib/models/terms_and_conditions.rb', line 84

def assignments=(value)
    @assignments = value
end

#body_textObject

Gets the bodyText property value. Administrator-supplied body text of the terms and conditions, typically the terms themselves. This is shown to the user on prompts to accept the T&C policy.

Returns:

  • a string



91
92
93
# File 'lib/models/terms_and_conditions.rb', line 91

def body_text
    return @body_text
end

#body_text=(value) ⇒ Object

Sets the bodyText property value. Administrator-supplied body text of the terms and conditions, typically the terms themselves. This is shown to the user on prompts to accept the T&C policy.

Parameters:

  • value

    Value to set for the bodyText property.

Returns:

  • a void



99
100
101
# File 'lib/models/terms_and_conditions.rb', line 99

def body_text=(value)
    @body_text = value
end

#created_date_timeObject

Gets the createdDateTime property value. DateTime the object was created.

Returns:

  • a date_time



113
114
115
# File 'lib/models/terms_and_conditions.rb', line 113

def created_date_time
    return @created_date_time
end

#created_date_time=(value) ⇒ Object

Sets the createdDateTime property value. DateTime the object was created.

Parameters:

  • value

    Value to set for the createdDateTime property.

Returns:

  • a void



121
122
123
# File 'lib/models/terms_and_conditions.rb', line 121

def created_date_time=(value)
    @created_date_time = value
end

#descriptionObject

Gets the description property value. Administrator-supplied description of the T&C policy.

Returns:

  • a string



137
138
139
# File 'lib/models/terms_and_conditions.rb', line 137

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Administrator-supplied description of the T&C policy.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



145
146
147
# File 'lib/models/terms_and_conditions.rb', line 145

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. Administrator-supplied name for the T&C policy.

Returns:

  • a string



152
153
154
# File 'lib/models/terms_and_conditions.rb', line 152

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Administrator-supplied name for the T&C policy.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



160
161
162
# File 'lib/models/terms_and_conditions.rb', line 160

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/models/terms_and_conditions.rb', line 167

def get_field_deserializers()
    return super.merge({
        "acceptanceStatement" => lambda {|n| @acceptance_statement = n.get_string_value() },
        "acceptanceStatuses" => lambda {|n| @acceptance_statuses = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAcceptanceStatus.create_from_discriminator_value(pn) }) },
        "assignments" => lambda {|n| @assignments = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::TermsAndConditionsAssignment.create_from_discriminator_value(pn) }) },
        "bodyText" => lambda {|n| @body_text = n.get_string_value() },
        "createdDateTime" => lambda {|n| @created_date_time = n.get_date_time_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() },
        "title" => lambda {|n| @title = n.get_string_value() },
        "version" => lambda {|n| @version = n.get_number_value() },
    })
end

#last_modified_date_timeObject

Gets the lastModifiedDateTime property value. DateTime the object was last modified.

Returns:

  • a date_time



185
186
187
# File 'lib/models/terms_and_conditions.rb', line 185

def last_modified_date_time
    return @last_modified_date_time
end

#last_modified_date_time=(value) ⇒ Object

Sets the lastModifiedDateTime property value. DateTime the object was last modified.

Parameters:

  • value

    Value to set for the lastModifiedDateTime property.

Returns:

  • a void



193
194
195
# File 'lib/models/terms_and_conditions.rb', line 193

def last_modified_date_time=(value)
    @last_modified_date_time = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/models/terms_and_conditions.rb', line 201

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("acceptanceStatement", @acceptance_statement)
    writer.write_collection_of_object_values("acceptanceStatuses", @acceptance_statuses)
    writer.write_collection_of_object_values("assignments", @assignments)
    writer.write_string_value("bodyText", @body_text)
    writer.write_date_time_value("createdDateTime", @created_date_time)
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time)
    writer.write_string_value("title", @title)
    writer.write_number_value("version", @version)
end

#titleObject

Gets the title property value. Administrator-supplied title of the terms and conditions. This is shown to the user on prompts to accept the T&C policy.

Returns:

  • a string



219
220
221
# File 'lib/models/terms_and_conditions.rb', line 219

def title
    return @title
end

#title=(value) ⇒ Object

Sets the title property value. Administrator-supplied title of the terms and conditions. This is shown to the user on prompts to accept the T&C policy.

Parameters:

  • value

    Value to set for the title property.

Returns:

  • a void



227
228
229
# File 'lib/models/terms_and_conditions.rb', line 227

def title=(value)
    @title = value
end

#versionObject

Gets the version property value. Integer indicating the current version of the terms. Incremented when an administrator makes a change to the terms and wishes to require users to re-accept the modified T&C policy.

Returns:

  • a integer



234
235
236
# File 'lib/models/terms_and_conditions.rb', line 234

def version
    return @version
end

#version=(value) ⇒ Object

Sets the version property value. Integer indicating the current version of the terms. Incremented when an administrator makes a change to the terms and wishes to require users to re-accept the modified T&C policy.

Parameters:

  • value

    Value to set for the version property.

Returns:

  • a void



242
243
244
# File 'lib/models/terms_and_conditions.rb', line 242

def version=(value)
    @version = value
end