Class: MicrosoftGraph::Models::TargetResource

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/target_resource.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new targetResource and sets the default values.



52
53
54
# File 'lib/models/target_resource.rb', line 52

def initialize()
    @additional_data = Hash.new
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 target_resource

Raises:

  • (StandardError)


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

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

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



37
38
39
# File 'lib/models/target_resource.rb', line 37

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



45
46
47
# File 'lib/models/target_resource.rb', line 45

def additional_data=(value)
    @additional_data = value
end

#display_nameObject

Gets the displayName property value. Indicates the visible name defined for the resource. Typically specified when the resource is created.

Returns:

  • a string



68
69
70
# File 'lib/models/target_resource.rb', line 68

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Indicates the visible name defined for the resource. Typically specified when the resource is created.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/models/target_resource.rb', line 83

def get_field_deserializers()
    return {
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "groupType" => lambda {|n| @group_type = n.get_enum_value(MicrosoftGraph::Models::GroupType) },
        "id" => lambda {|n| @id = n.get_string_value() },
        "modifiedProperties" => lambda {|n| @modified_properties = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ModifiedProperty.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "type" => lambda {|n| @type = n.get_string_value() },
        "userPrincipalName" => lambda {|n| @user_principal_name = n.get_string_value() },
    }
end

#group_typeObject

Gets the groupType property value. When type is set to Group, this indicates the group type. Possible values are: unifiedGroups, azureAD, and unknownFutureValue

Returns:

  • a group_type



98
99
100
# File 'lib/models/target_resource.rb', line 98

def group_type
    return @group_type
end

#group_type=(value) ⇒ Object

Sets the groupType property value. When type is set to Group, this indicates the group type. Possible values are: unifiedGroups, azureAD, and unknownFutureValue

Parameters:

  • value

    Value to set for the groupType property.

Returns:

  • a void



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

def group_type=(value)
    @group_type = value
end

#idObject

Gets the id property value. Indicates the unique ID of the resource.

Returns:

  • a string



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

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. Indicates the unique ID of the resource.

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



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

def id=(value)
    @id = value
end

#modified_propertiesObject

Gets the modifiedProperties property value. Indicates name, old value and new value of each attribute that changed. Property values depend on the operation type.

Returns:

  • a modified_property



128
129
130
# File 'lib/models/target_resource.rb', line 128

def modified_properties
    return @modified_properties
end

#modified_properties=(value) ⇒ Object

Sets the modifiedProperties property value. Indicates name, old value and new value of each attribute that changed. Property values depend on the operation type.

Parameters:

  • value

    Value to set for the modifiedProperties property.

Returns:

  • a void



136
137
138
# File 'lib/models/target_resource.rb', line 136

def modified_properties=(value)
    @modified_properties = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



143
144
145
# File 'lib/models/target_resource.rb', line 143

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



151
152
153
# File 'lib/models/target_resource.rb', line 151

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


159
160
161
162
163
164
165
166
167
168
169
# File 'lib/models/target_resource.rb', line 159

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("displayName", @display_name)
    writer.write_enum_value("groupType", @group_type)
    writer.write_string_value("id", @id)
    writer.write_collection_of_object_values("modifiedProperties", @modified_properties)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_string_value("type", @type)
    writer.write_string_value("userPrincipalName", @user_principal_name)
    writer.write_additional_data(@additional_data)
end

#typeObject

Gets the type property value. Describes the resource type. Example values include Application, Group, ServicePrincipal, and User.

Returns:

  • a string



174
175
176
# File 'lib/models/target_resource.rb', line 174

def type
    return @type
end

#type=(value) ⇒ Object

Sets the type property value. Describes the resource type. Example values include Application, Group, ServicePrincipal, and User.

Parameters:

  • value

    Value to set for the type property.

Returns:

  • a void



182
183
184
# File 'lib/models/target_resource.rb', line 182

def type=(value)
    @type = value
end

#user_principal_nameObject

Gets the userPrincipalName property value. When type is set to User, this includes the user name that initiated the action; null for other types.

Returns:

  • a string



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

def user_principal_name
    return @user_principal_name
end

#user_principal_name=(value) ⇒ Object

Sets the userPrincipalName property value. When type is set to User, this includes the user name that initiated the action; null for other types.

Parameters:

  • value

    Value to set for the userPrincipalName property.

Returns:

  • a void



197
198
199
# File 'lib/models/target_resource.rb', line 197

def user_principal_name=(value)
    @user_principal_name = value
end