Class: Google::Apis::ChatV1::GoogleAppsCardV1MaterialIcon

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb

Overview

A Google Material Icon, which includes over 2500+ options. For example, to display a checkbox icon with customized weight and grade, write the following: ` "name": "check_box", "fill": true, "weight": 300, "grade": - 25 ` Google Chat apps:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1MaterialIcon

Returns a new instance of GoogleAppsCardV1MaterialIcon.



2354
2355
2356
# File 'lib/google/apis/chat_v1/classes.rb', line 2354

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

Instance Attribute Details

#fillBoolean Also known as: fill?

Whether the icon renders as filled. Default value is false. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize. Corresponds to the JSON property fill

Returns:

  • (Boolean)


2326
2327
2328
# File 'lib/google/apis/chat_v1/classes.rb', line 2326

def fill
  @fill
end

#gradeFixnum

Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from -25, 0, 200. If absent, default value is 0. If any other value is specified, the default value is used. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize. Corresponds to the JSON property grade

Returns:

  • (Fixnum)


2337
2338
2339
# File 'lib/google/apis/chat_v1/classes.rb', line 2337

def grade
  @grade
end

#nameString

The icon name defined in the Google Material Icon, for example, check_box. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render. Corresponds to the JSON property name

Returns:

  • (String)


2344
2345
2346
# File 'lib/google/apis/chat_v1/classes.rb', line 2344

def name
  @name
end

#weightFixnum

The stroke weight of the icon. Choose from 100, 200, 300, 400, 500, 600, 700. If absent, default value is 400. If any other value is specified, the default value is used. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize. Corresponds to the JSON property weight

Returns:

  • (Fixnum)


2352
2353
2354
# File 'lib/google/apis/chat_v1/classes.rb', line 2352

def weight
  @weight
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2359
2360
2361
2362
2363
2364
# File 'lib/google/apis/chat_v1/classes.rb', line 2359

def update!(**args)
  @fill = args[:fill] if args.key?(:fill)
  @grade = args[:grade] if args.key?(:grade)
  @name = args[:name] if args.key?(:name)
  @weight = args[:weight] if args.key?(:weight)
end