Class: Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb

Overview

Defined Under Namespace

Modules: ImageDisplayOptions Classes: BrowseCarouselCardItem

Instance Attribute Summary collapse

Instance Attribute Details

#image_display_optionsGoogle::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::ImageDisplayOptions

Returns Optional. Settings for displaying the image. Applies to every image in items.

Returns:



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 515

class BrowseCarouselCard
  # Browsing carousel tile
  # @!attribute [rw] open_uri_action
  #   @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem::OpenUrlAction]
  #     Required. Action to present to the user.
  # @!attribute [rw] title
  #   @return [String]
  #     Required. Title of the carousel item. Maximum of two lines of text.
  # @!attribute [rw] description
  #   @return [String]
  #     Optional. Description of the carousel item. Maximum of four lines of
  #     text.
  # @!attribute [rw] image
  #   @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
  #     Optional. Hero image for the carousel item.
  # @!attribute [rw] footer
  #   @return [String]
  #     Optional. Text that appears at the bottom of the Browse Carousel
  #     Card. Maximum of one line of text.
  class BrowseCarouselCardItem
    # Actions on Google action to open a given url.
    # @!attribute [rw] url
    #   @return [String]
    #     Required. URL
    # @!attribute [rw] url_type_hint
    #   @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem::OpenUrlAction::UrlTypeHint]
    #     Optional. Specifies the type of viewer that is used when opening
    #     the URL. Defaults to opening via web browser.
    class OpenUrlAction
      # Type of the URI.
      module UrlTypeHint
        # Unspecified
        URL_TYPE_HINT_UNSPECIFIED = 0

        # Url would be an amp action
        AMP_ACTION = 1

        # URL that points directly to AMP content, or to a canonical URL
        # which refers to AMP content via <link rel="amphtml">.
        AMP_CONTENT = 2
      end
    end
  end

  # Image display options for Actions on Google. This should be used for
  # when the image's aspect ratio does not match the image container's
  # aspect ratio.
  module ImageDisplayOptions
    # Fill the gaps between the image and the image container with gray
    # bars.
    IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0

    # Fill the gaps between the image and the image container with gray
    # bars.
    GRAY = 1

    # Fill the gaps between the image and the image container with white
    # bars.
    WHITE = 2

    # Image is scaled such that the image width and height match or exceed
    # the container dimensions. This may crop the top and bottom of the
    # image if the scaled image height is greater than the container
    # height, or crop the left and right of the image if the scaled image
    # width is greater than the container width. This is similar to "Zoom
    # Mode" on a widescreen TV when playing a 4:3 video.
    CROPPED = 3

    # Pad the gaps between image and image frame with a blurred copy of the
    # same image.
    BLURRED_BACKGROUND = 4
  end
end

#itemsArray<Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem>

Returns Required. List of items in the Browse Carousel Card. Minimum of two items, maximum of ten.

Returns:



515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/google/cloud/dialogflow/v2/doc/google/cloud/dialogflow/v2/intent.rb', line 515

class BrowseCarouselCard
  # Browsing carousel tile
  # @!attribute [rw] open_uri_action
  #   @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem::OpenUrlAction]
  #     Required. Action to present to the user.
  # @!attribute [rw] title
  #   @return [String]
  #     Required. Title of the carousel item. Maximum of two lines of text.
  # @!attribute [rw] description
  #   @return [String]
  #     Optional. Description of the carousel item. Maximum of four lines of
  #     text.
  # @!attribute [rw] image
  #   @return [Google::Cloud::Dialogflow::V2::Intent::Message::Image]
  #     Optional. Hero image for the carousel item.
  # @!attribute [rw] footer
  #   @return [String]
  #     Optional. Text that appears at the bottom of the Browse Carousel
  #     Card. Maximum of one line of text.
  class BrowseCarouselCardItem
    # Actions on Google action to open a given url.
    # @!attribute [rw] url
    #   @return [String]
    #     Required. URL
    # @!attribute [rw] url_type_hint
    #   @return [Google::Cloud::Dialogflow::V2::Intent::Message::BrowseCarouselCard::BrowseCarouselCardItem::OpenUrlAction::UrlTypeHint]
    #     Optional. Specifies the type of viewer that is used when opening
    #     the URL. Defaults to opening via web browser.
    class OpenUrlAction
      # Type of the URI.
      module UrlTypeHint
        # Unspecified
        URL_TYPE_HINT_UNSPECIFIED = 0

        # Url would be an amp action
        AMP_ACTION = 1

        # URL that points directly to AMP content, or to a canonical URL
        # which refers to AMP content via <link rel="amphtml">.
        AMP_CONTENT = 2
      end
    end
  end

  # Image display options for Actions on Google. This should be used for
  # when the image's aspect ratio does not match the image container's
  # aspect ratio.
  module ImageDisplayOptions
    # Fill the gaps between the image and the image container with gray
    # bars.
    IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0

    # Fill the gaps between the image and the image container with gray
    # bars.
    GRAY = 1

    # Fill the gaps between the image and the image container with white
    # bars.
    WHITE = 2

    # Image is scaled such that the image width and height match or exceed
    # the container dimensions. This may crop the top and bottom of the
    # image if the scaled image height is greater than the container
    # height, or crop the left and right of the image if the scaled image
    # width is greater than the container width. This is similar to "Zoom
    # Mode" on a widescreen TV when playing a 4:3 video.
    CROPPED = 3

    # Pad the gaps between image and image frame with a blurred copy of the
    # same image.
    BLURRED_BACKGROUND = 4
  end
end