Class: MicrosoftGraph::Models::CustomSecurityAttributeDefinition

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

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 customSecurityAttributeDefinition and sets the default values.



70
71
72
# File 'lib/models/custom_security_attribute_definition.rb', line 70

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 custom_security_attribute_definition

Raises:

  • (StandardError)


78
79
80
81
# File 'lib/models/custom_security_attribute_definition.rb', line 78

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

Instance Method Details

#allowed_valuesObject

Gets the allowedValues property value. Values that are predefined for this custom security attribute. This navigation property is not returned by default and must be specified in an $expand query. For example, /directory/customSecurityAttributeDefinitions?$expand=allowedValues.

Returns:

  • a allowed_value



40
41
42
# File 'lib/models/custom_security_attribute_definition.rb', line 40

def allowed_values
    return @allowed_values
end

#allowed_values=(value) ⇒ Object

Sets the allowedValues property value. Values that are predefined for this custom security attribute. This navigation property is not returned by default and must be specified in an $expand query. For example, /directory/customSecurityAttributeDefinitions?$expand=allowedValues.

Parameters:

  • value

    Value to set for the allowedValues property.

Returns:

  • a void



48
49
50
# File 'lib/models/custom_security_attribute_definition.rb', line 48

def allowed_values=(value)
    @allowed_values = value
end

#attribute_setObject

Gets the attributeSet property value. Name of the attribute set. Case insensitive.

Returns:

  • a string



55
56
57
# File 'lib/models/custom_security_attribute_definition.rb', line 55

def attribute_set
    return @attribute_set
end

#attribute_set=(value) ⇒ Object

Sets the attributeSet property value. Name of the attribute set. Case insensitive.

Parameters:

  • value

    Value to set for the attributeSet property.

Returns:

  • a void



63
64
65
# File 'lib/models/custom_security_attribute_definition.rb', line 63

def attribute_set=(value)
    @attribute_set = value
end

#descriptionObject

Gets the description property value. Description of the custom security attribute. Can be up to 128 characters long and include Unicode characters. Can be changed later.

Returns:

  • a string



86
87
88
# File 'lib/models/custom_security_attribute_definition.rb', line 86

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. Description of the custom security attribute. Can be up to 128 characters long and include Unicode characters. Can be changed later.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



94
95
96
# File 'lib/models/custom_security_attribute_definition.rb', line 94

def description=(value)
    @description = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/models/custom_security_attribute_definition.rb', line 101

def get_field_deserializers()
    return super.merge({
        "allowedValues" => lambda {|n| @allowed_values = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::AllowedValue.create_from_discriminator_value(pn) }) },
        "attributeSet" => lambda {|n| @attribute_set = n.get_string_value() },
        "description" => lambda {|n| @description = n.get_string_value() },
        "isCollection" => lambda {|n| @is_collection = n.get_boolean_value() },
        "isSearchable" => lambda {|n| @is_searchable = n.get_boolean_value() },
        "name" => lambda {|n| @name = n.get_string_value() },
        "status" => lambda {|n| @status = n.get_string_value() },
        "type" => lambda {|n| @type = n.get_string_value() },
        "usePreDefinedValuesOnly" => lambda {|n| @use_pre_defined_values_only = n.get_boolean_value() },
    })
end

#is_collectionObject

Gets the isCollection property value. Indicates whether multiple values can be assigned to the custom security attribute. Cannot be changed later. If type is set to Boolean, isCollection cannot be set to true.

Returns:

  • a boolean



118
119
120
# File 'lib/models/custom_security_attribute_definition.rb', line 118

def is_collection
    return @is_collection
end

#is_collection=(value) ⇒ Object

Sets the isCollection property value. Indicates whether multiple values can be assigned to the custom security attribute. Cannot be changed later. If type is set to Boolean, isCollection cannot be set to true.

Parameters:

  • value

    Value to set for the isCollection property.

Returns:

  • a void



126
127
128
# File 'lib/models/custom_security_attribute_definition.rb', line 126

def is_collection=(value)
    @is_collection = value
end

#is_searchableObject

Gets the isSearchable property value. Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Cannot be changed later.

Returns:

  • a boolean



133
134
135
# File 'lib/models/custom_security_attribute_definition.rb', line 133

def is_searchable
    return @is_searchable
end

#is_searchable=(value) ⇒ Object

Sets the isSearchable property value. Indicates whether custom security attribute values are indexed for searching on objects that are assigned attribute values. Cannot be changed later.

Parameters:

  • value

    Value to set for the isSearchable property.

Returns:

  • a void



141
142
143
# File 'lib/models/custom_security_attribute_definition.rb', line 141

def is_searchable=(value)
    @is_searchable = value
end

#nameObject

Gets the name property value. Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Cannot contain spaces or special characters. Cannot be changed later. Case insensitive.

Returns:

  • a string



148
149
150
# File 'lib/models/custom_security_attribute_definition.rb', line 148

def name
    return @name
end

#name=(value) ⇒ Object

Sets the name property value. Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Cannot contain spaces or special characters. Cannot be changed later. Case insensitive.

Parameters:

  • value

    Value to set for the name property.

Returns:

  • a void



156
157
158
# File 'lib/models/custom_security_attribute_definition.rb', line 156

def name=(value)
    @name = 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)


164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/models/custom_security_attribute_definition.rb', line 164

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("allowedValues", @allowed_values)
    writer.write_string_value("attributeSet", @attribute_set)
    writer.write_string_value("description", @description)
    writer.write_boolean_value("isCollection", @is_collection)
    writer.write_boolean_value("isSearchable", @is_searchable)
    writer.write_string_value("name", @name)
    writer.write_string_value("status", @status)
    writer.write_string_value("type", @type)
    writer.write_boolean_value("usePreDefinedValuesOnly", @use_pre_defined_values_only)
end

#statusObject

Gets the status property value. Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later.

Returns:

  • a string



181
182
183
# File 'lib/models/custom_security_attribute_definition.rb', line 181

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. Specifies whether the custom security attribute is active or deactivated. Acceptable values are: Available and Deprecated. Can be changed later.

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



189
190
191
# File 'lib/models/custom_security_attribute_definition.rb', line 189

def status=(value)
    @status = value
end

#typeObject

Gets the type property value. Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Cannot be changed later.

Returns:

  • a string



196
197
198
# File 'lib/models/custom_security_attribute_definition.rb', line 196

def type
    return @type
end

#type=(value) ⇒ Object

Sets the type property value. Data type for the custom security attribute values. Supported types are: Boolean, Integer, and String. Cannot be changed later.

Parameters:

  • value

    Value to set for the type property.

Returns:

  • a void



204
205
206
# File 'lib/models/custom_security_attribute_definition.rb', line 204

def type=(value)
    @type = value
end

#use_pre_defined_values_onlyObject

Gets the usePreDefinedValuesOnly property value. Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but cannot be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly cannot be set to true.

Returns:

  • a boolean



211
212
213
# File 'lib/models/custom_security_attribute_definition.rb', line 211

def use_pre_defined_values_only
    return @use_pre_defined_values_only
end

#use_pre_defined_values_only=(value) ⇒ Object

Sets the usePreDefinedValuesOnly property value. Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but cannot be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly cannot be set to true.

Parameters:

  • value

    Value to set for the usePreDefinedValuesOnly property.

Returns:

  • a void



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

def use_pre_defined_values_only=(value)
    @use_pre_defined_values_only = value
end