Class: Google::Apis::AndroidenterpriseV1::KeyedAppState

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/androidenterprise_v1/classes.rb,
generated/google/apis/androidenterprise_v1/representations.rb,
generated/google/apis/androidenterprise_v1/representations.rb

Overview

Represents a keyed app state containing a key, timestamp, severity level, optional description, and optional data.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ KeyedAppState

Returns a new instance of KeyedAppState.


1230
1231
1232
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 1230

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dataString

Additional field intended for machine-readable data. For example, a number or JSON object. To prevent XSS, we recommend removing any HTML from the data before displaying it. Corresponds to the JSON property data

Returns:

  • (String)

1203
1204
1205
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 1203

def data
  @data
end

#keyString

Key indicating what the app is providing a state for. The content of the key is set by the app's developer. To prevent XSS, we recommend removing any HTML from the key before displaying it. This field will always be present. Corresponds to the JSON property key

Returns:

  • (String)

1210
1211
1212
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 1210

def key
  @key
end

#messageString

Free-form, human-readable message describing the app state. For example, an error message. To prevent XSS, we recommend removing any HTML from the message before displaying it. Corresponds to the JSON property message

Returns:

  • (String)

1217
1218
1219
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 1217

def message
  @message
end

#severityString

Severity of the app state. This field will always be present. Corresponds to the JSON property severity

Returns:

  • (String)

1222
1223
1224
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 1222

def severity
  @severity
end

#state_timestamp_millisFixnum

Timestamp of when the app set the state in milliseconds since epoch. This field will always be present. Corresponds to the JSON property stateTimestampMillis

Returns:

  • (Fixnum)

1228
1229
1230
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 1228

def state_timestamp_millis
  @state_timestamp_millis
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1235
1236
1237
1238
1239
1240
1241
# File 'generated/google/apis/androidenterprise_v1/classes.rb', line 1235

def update!(**args)
  @data = args[:data] if args.key?(:data)
  @key = args[:key] if args.key?(:key)
  @message = args[:message] if args.key?(:message)
  @severity = args[:severity] if args.key?(:severity)
  @state_timestamp_millis = args[:state_timestamp_millis] if args.key?(:state_timestamp_millis)
end