Class: MicrosoftGraph::Models::ServiceHealth

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



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

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 service_health

Raises:

  • (StandardError)


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

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

Instance Method Details

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



38
39
40
41
42
43
44
# File 'lib/models/service_health.rb', line 38

def get_field_deserializers()
    return super.merge({
        "issues" => lambda {|n| @issues = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::ServiceHealthIssue.create_from_discriminator_value(pn) }) },
        "service" => lambda {|n| @service = n.get_string_value() },
        "status" => lambda {|n| @status = n.get_enum_value(MicrosoftGraph::Models::ServiceHealthStatus) },
    })
end

#issuesObject

Gets the issues property value. A collection of issues that happened on the service, with detailed information for each issue.

Returns:

  • a service_health_issue



49
50
51
# File 'lib/models/service_health.rb', line 49

def issues
    return @issues
end

#issues=(value) ⇒ Object

Sets the issues property value. A collection of issues that happened on the service, with detailed information for each issue.

Parameters:

  • value

    Value to set for the issues property.

Returns:

  • a void



57
58
59
# File 'lib/models/service_health.rb', line 57

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


65
66
67
68
69
70
71
# File 'lib/models/service_health.rb', line 65

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_collection_of_object_values("issues", @issues)
    writer.write_string_value("service", @service)
    writer.write_enum_value("status", @status)
end

#serviceObject

Gets the service property value. The service name. Use the list healthOverviews operation to get exact string names for services subscribed by the tenant.

Returns:

  • a string



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

def service
    return @service
end

#service=(value) ⇒ Object

Sets the service property value. The service name. Use the list healthOverviews operation to get exact string names for services subscribed by the tenant.

Parameters:

  • value

    Value to set for the service property.

Returns:

  • a void



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

def service=(value)
    @service = value
end

#statusObject

Gets the status property value. The status property

Returns:

  • a service_health_status



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

def status
    return @status
end

#status=(value) ⇒ Object

Sets the status property value. The status property

Parameters:

  • value

    Value to set for the status property.

Returns:

  • a void



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

def status=(value)
    @status = value
end