Class: Google::Apis::CloudsearchV1::AppsDynamiteStorageCard
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::AppsDynamiteStorageCard
- 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
-
#card_actions ⇒ Array<Google::Apis::CloudsearchV1::AppsDynamiteStorageCardCardAction>
The actions of this card.
-
#header ⇒ Google::Apis::CloudsearchV1::AppsDynamiteStorageCardCardHeader
The header of the card.
-
#name ⇒ String
Name of the card, which is used as a identifier for the card in card navigation.
-
#sections ⇒ Array<Google::Apis::CloudsearchV1::AppsDynamiteStorageCardSection>
Sections are separated by a line divider.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AppsDynamiteStorageCard
constructor
A new instance of AppsDynamiteStorageCard.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AppsDynamiteStorageCard
Returns a new instance of AppsDynamiteStorageCard.
2948 2949 2950 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2948 def initialize(**args) update!(**args) end |
Instance Attribute Details
#card_actions ⇒ Array<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
2930 2931 2932 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2930 def card_actions @card_actions end |
#header ⇒ Google::Apis::CloudsearchV1::AppsDynamiteStorageCardCardHeader
The header of the card. A header usually contains a title and an image.
Corresponds to the JSON property header
2935 2936 2937 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2935 def header @header end |
#name ⇒ String
Name of the card, which is used as a identifier for the card in card
navigation.
Corresponds to the JSON property name
2941 2942 2943 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2941 def name @name end |
#sections ⇒ Array<Google::Apis::CloudsearchV1::AppsDynamiteStorageCardSection>
Sections are separated by a line divider.
Corresponds to the JSON property sections
2946 2947 2948 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2946 def sections @sections end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2953 2954 2955 2956 2957 2958 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 2953 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 |