Class: Google::Apis::CloudsearchV1::AppsDynamiteStorageCard

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

Overview

A card is a UI element that can contain UI widgets such as text and images. For more information, see Cards . For example, the following JSON creates a card that has a header with the name, position, icons, and link for a contact, followed by a section with contact information like email and phone number. ` "header": ` "title": "Heba Salam", "subtitle": "Software Engineer", " imageStyle": "ImageStyle.AVATAR", "imageUrl": "https://example.com/heba_salam. png", "imageAltText": "Avatar for Heba Salam" `, "sections" : [ ` "header": " Contact Info", "widgets": [ ` "decorated_text": ` "icon": ` "knownIcon": " EMAIL" `, "content": "heba.salam@example.com" ` `, ` "decoratedText": ` "icon": ` "knownIcon": "PERSON" `, "content": "Online" ` `, ` "decoratedText": ` " icon": ` "knownIcon": "PHONE" `, "content": "+1 (555) 555-1234" ` `, ` " buttons": [ ` "textButton": ` "text": "Share", `, "onClick": ` "openLink": ` " url": "https://example.com/share" ` ` `, ` "textButton": ` "text": "Edit", `, " onClick": ` "action": ` "function": "goToView", "parameters": [ ` "key": " viewType", "value": "EDIT" ` ], "loadIndicator": "LoadIndicator.SPINNER" ` ` ` ] ` ], "collapsible": true, "uncollapsibleWidgetsCount": 3 ` ], "cardActions": [ ` "actionLabel": "Send Feedback", "onClick": ` "openLink": ` "url": "https:// example.com/feedback" ` ` ` ], "name": "contact-card-K3wB6arF2H9L" `

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AppsDynamiteStorageCard

Returns a new instance of AppsDynamiteStorageCard.



3006
3007
3008
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3006

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

Instance Attribute Details

#card_actionsArray<Google::Apis::CloudsearchV1::AppsDynamiteStorageCardCardAction>

The actions of this card. They are added to a card's generated toolbar menu. For example, the following JSON constructs a card action menu with Settings and Send Feedback options: "card_actions": [ ` "actionLabel": "Setting", " onClick": ` "action": ` "functionName": "goToView", "parameters": [ ` "key": " viewType", "value": "SETTING" ` ], "loadIndicator": "LoadIndicator.SPINNER" ` ` `, ` "actionLabel": "Send Feedback", "onClick": ` "openLink": ` "url": "https: //example.com/feedback" ` ` ` ] Corresponds to the JSON property cardActions



2988
2989
2990
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2988

def card_actions
  @card_actions
end

#headerGoogle::Apis::CloudsearchV1::AppsDynamiteStorageCardCardHeader

The header of the card. A header usually contains a title and an image. Corresponds to the JSON property header



2993
2994
2995
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2993

def header
  @header
end

#nameString

Name of the card, which is used as a identifier for the card in card navigation. Corresponds to the JSON property name

Returns:

  • (String)


2999
3000
3001
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2999

def name
  @name
end

#sectionsArray<Google::Apis::CloudsearchV1::AppsDynamiteStorageCardSection>

Sections are separated by a line divider. Corresponds to the JSON property sections



3004
3005
3006
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3004

def sections
  @sections
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3011
3012
3013
3014
3015
3016
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 3011

def update!(**args)
  @card_actions = args[:card_actions] if args.key?(:card_actions)
  @header = args[:header] if args.key?(:header)
  @name = args[:name] if args.key?(:name)
  @sections = args[:sections] if args.key?(:sections)
end