Class: Google::Apis::ChatV1::GoogleAppsCardV1ImageComponent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1ImageComponent

Returns a new instance of GoogleAppsCardV1ImageComponent.



2146
2147
2148
# File 'lib/google/apis/chat_v1/classes.rb', line 2146

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

Instance Attribute Details

#alt_textString

The accessibility label for the image. Corresponds to the JSON property altText

Returns:

  • (String)


2124
2125
2126
# File 'lib/google/apis/chat_v1/classes.rb', line 2124

def alt_text
  @alt_text
end

#border_styleGoogle::Apis::ChatV1::GoogleAppsCardV1BorderStyle

The style options for the border of a card or widget, including the border type and color. Google Workspace Add-ons and Chat apps: Corresponds to the JSON property borderStyle



2131
2132
2133
# File 'lib/google/apis/chat_v1/classes.rb', line 2131

def border_style
  @border_style
end

#crop_styleGoogle::Apis::ChatV1::GoogleAppsCardV1ImageCropStyle

Represents the crop style applied to an image. Google Workspace Add-ons and Chat apps: For example, here' s how to apply a 16:9 aspect ratio: cropStyle ` "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 ` Corresponds to the JSON property cropStyle



2139
2140
2141
# File 'lib/google/apis/chat_v1/classes.rb', line 2139

def crop_style
  @crop_style
end

#image_uriString

The image URL. Corresponds to the JSON property imageUri

Returns:

  • (String)


2144
2145
2146
# File 'lib/google/apis/chat_v1/classes.rb', line 2144

def image_uri
  @image_uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2151
2152
2153
2154
2155
2156
# File 'lib/google/apis/chat_v1/classes.rb', line 2151

def update!(**args)
  @alt_text = args[:alt_text] if args.key?(:alt_text)
  @border_style = args[:border_style] if args.key?(:border_style)
  @crop_style = args[:crop_style] if args.key?(:crop_style)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
end