Class: MicrosoftGraph::Models::AccessReviewQueryScope

Inherits:
AccessReviewScope show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/access_review_query_scope.rb

Direct Known Subclasses

AccessReviewInactiveUsersQueryScope

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AccessReviewScope

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

Constructor Details

#initializeObject

Instantiates a new accessReviewQueryScope and sets the default values.



22
23
24
25
# File 'lib/models/access_review_query_scope.rb', line 22

def initialize()
    super
    @odata_type = "#microsoft.graph.accessReviewQueryScope"
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_review_query_scope

Raises:

  • (StandardError)


31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/models/access_review_query_scope.rb', line 31

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    mapping_value_node = parse_node.get_child_node("@odata.type")
    unless mapping_value_node.nil? then
        mapping_value = mapping_value_node.get_string_value
        case mapping_value
            when "#microsoft.graph.accessReviewInactiveUsersQueryScope"
                return AccessReviewInactiveUsersQueryScope.new
        end
    end
    return AccessReviewQueryScope.new
end

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



47
48
49
50
51
52
53
# File 'lib/models/access_review_query_scope.rb', line 47

def get_field_deserializers()
    return super.merge({
        "query" => lambda {|n| @query = n.get_string_value() },
        "queryRoot" => lambda {|n| @query_root = n.get_string_value() },
        "queryType" => lambda {|n| @query_type = n.get_string_value() },
    })
end

#queryObject

Gets the query property value. The query representing what will be reviewed in an access review.

Returns:

  • a string



58
59
60
# File 'lib/models/access_review_query_scope.rb', line 58

def query
    return @query
end

#query=(value) ⇒ Object

Sets the query property value. The query representing what will be reviewed in an access review.

Parameters:

  • value

    Value to set for the query property.

Returns:

  • a void



66
67
68
# File 'lib/models/access_review_query_scope.rb', line 66

def query=(value)
    @query = value
end

#query_rootObject

Gets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query is specified. For example, ./manager.

Returns:

  • a string



73
74
75
# File 'lib/models/access_review_query_scope.rb', line 73

def query_root
    return @query_root
end

#query_root=(value) ⇒ Object

Sets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query is specified. For example, ./manager.

Parameters:

  • value

    Value to set for the queryRoot property.

Returns:

  • a void



81
82
83
# File 'lib/models/access_review_query_scope.rb', line 81

def query_root=(value)
    @query_root = value
end

#query_typeObject

Gets the queryType property value. Indicates the type of query. Types include MicrosoftGraph and ARM.

Returns:

  • a string



88
89
90
# File 'lib/models/access_review_query_scope.rb', line 88

def query_type
    return @query_type
end

#query_type=(value) ⇒ Object

Sets the queryType property value. Indicates the type of query. Types include MicrosoftGraph and ARM.

Parameters:

  • value

    Value to set for the queryType property.

Returns:

  • a void



96
97
98
# File 'lib/models/access_review_query_scope.rb', line 96

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


104
105
106
107
108
109
110
# File 'lib/models/access_review_query_scope.rb', line 104

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("query", @query)
    writer.write_string_value("queryRoot", @query_root)
    writer.write_string_value("queryType", @query_type)
end