Class: MicrosoftGraph::Models::AccessPackageResourceScope

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/access_package_resource_scope.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 accessPackageResourceScope and sets the default values.



31
32
33
# File 'lib/models/access_package_resource_scope.rb', line 31

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 access_package_resource_scope

Raises:

  • (StandardError)


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

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

Instance Method Details

#descriptionObject

Gets the description property value. The description of the scope.

Returns:

  • a string



47
48
49
# File 'lib/models/access_package_resource_scope.rb', line 47

def description
    return @description
end

#description=(value) ⇒ Object

Sets the description property value. The description of the scope.

Parameters:

  • value

    Value to set for the description property.

Returns:

  • a void



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

def description=(value)
    @description = value
end

#display_nameObject

Gets the displayName property value. The display name of the scope.

Returns:

  • a string



62
63
64
# File 'lib/models/access_package_resource_scope.rb', line 62

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The display name of the scope.

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



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

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



77
78
79
80
81
82
83
84
85
86
# File 'lib/models/access_package_resource_scope.rb', line 77

def get_field_deserializers()
    return super.merge({
        "description" => lambda {|n| @description = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "isRootScope" => lambda {|n| @is_root_scope = n.get_boolean_value() },
        "originId" => lambda {|n| @origin_id = n.get_string_value() },
        "originSystem" => lambda {|n| @origin_system = n.get_string_value() },
        "resource" => lambda {|n| @resource = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::AccessPackageResource.create_from_discriminator_value(pn) }) },
    })
end

#is_root_scopeObject

Gets the isRootScope property value. True if the scopes are arranged in a hierarchy and this is the top or root scope of the resource.

Returns:

  • a boolean



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

def is_root_scope
    return @is_root_scope
end

#is_root_scope=(value) ⇒ Object

Sets the isRootScope property value. True if the scopes are arranged in a hierarchy and this is the top or root scope of the resource.

Parameters:

  • value

    Value to set for the isRootScope property.

Returns:

  • a void



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

def is_root_scope=(value)
    @is_root_scope = value
end

#origin_idObject

Gets the originId property value. The unique identifier for the scope in the resource as defined in the origin system.

Returns:

  • a string



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

def origin_id
    return @origin_id
end

#origin_id=(value) ⇒ Object

Sets the originId property value. The unique identifier for the scope in the resource as defined in the origin system.

Parameters:

  • value

    Value to set for the originId property.

Returns:

  • a void



114
115
116
# File 'lib/models/access_package_resource_scope.rb', line 114

def origin_id=(value)
    @origin_id = value
end

#origin_systemObject

Gets the originSystem property value. The origin system for the scope.

Returns:

  • a string



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

def origin_system
    return @origin_system
end

#origin_system=(value) ⇒ Object

Sets the originSystem property value. The origin system for the scope.

Parameters:

  • value

    Value to set for the originSystem property.

Returns:

  • a void



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

def origin_system=(value)
    @origin_system = value
end

#resourceObject

Gets the resource property value. The resource property

Returns:

  • a access_package_resource



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

def resource
    return @resource
end

#resource=(value) ⇒ Object

Sets the resource property value. The resource property

Parameters:

  • value

    Value to set for the resource property.

Returns:

  • a void



144
145
146
# File 'lib/models/access_package_resource_scope.rb', line 144

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


152
153
154
155
156
157
158
159
160
161
# File 'lib/models/access_package_resource_scope.rb', line 152

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("description", @description)
    writer.write_string_value("displayName", @display_name)
    writer.write_boolean_value("isRootScope", @is_root_scope)
    writer.write_string_value("originId", @origin_id)
    writer.write_string_value("originSystem", @origin_system)
    writer.write_object_value("resource", @resource)
end