Class: Google::Apis::ChatV1::GoogleAppsCardV1MaterialIcon
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1MaterialIcon
- 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 "name":
"check_box", "fill": true, "weight": 300, "grade": -25 Available for Chat
apps and in Developer Preview for Google Workspace Add-ons.
Instance Attribute Summary collapse
-
#fill ⇒ Boolean
(also: #fill?)
Whether it renders a filled icon.
-
#grade ⇒ Fixnum
Weight and grade affect a symbol’s thickness.
-
#name ⇒ String
The icon name defined in the Google Material Icon Icon in snake_case.
-
#weight ⇒ Fixnum
The stroke weight of the icon.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1MaterialIcon
constructor
A new instance of GoogleAppsCardV1MaterialIcon.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1MaterialIcon
Returns a new instance of GoogleAppsCardV1MaterialIcon.
2277 2278 2279 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2277 def initialize(**args) update!(**args) end |
Instance Attribute Details
#fill ⇒ Boolean Also known as: fill?
Whether it renders a filled icon. Default value is false. See Customization in
Google Font Icon for details.
Corresponds to the JSON property fill
2250 2251 2252 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2250 def fill @fill end |
#grade ⇒ Fixnum
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, a broken image icon is displayed. See Customization in
Google Font Icon for details.
Corresponds to the JSON property grade
2260 2261 2262 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2260 def grade @grade end |
#name ⇒ String
The icon name defined in the Google Material Icon Icon in snake_case. e.g. "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
2267 2268 2269 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2267 def name @name end |
#weight ⇒ Fixnum
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, a broken
image icon is displayed. See Customization in Google Font Icon for details.
Corresponds to the JSON property weight
2275 2276 2277 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2275 def weight @weight end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2282 2283 2284 2285 2286 2287 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2282 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 |