Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1SearchLinkPromotion

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

Overview

Promotion proto includes uri and other helping information to display the promotion.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1SearchLinkPromotion

Returns a new instance of GoogleCloudDiscoveryengineV1SearchLinkPromotion.



2748
2749
2750
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2748

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

Instance Attribute Details

#descriptionString

Optional. The Promotion description. Maximum length: 200 characters. Corresponds to the JSON property description

Returns:

  • (String)


2723
2724
2725
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2723

def description
  @description
end

#enabledBoolean Also known as: enabled?

Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


2730
2731
2732
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2730

def enabled
  @enabled
end

#image_uriString

Optional. The promotion thumbnail image url. Corresponds to the JSON property imageUri

Returns:

  • (String)


2736
2737
2738
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2736

def image_uri
  @image_uri
end

#titleString

Required. The title of the promotion. Maximum length: 160 characters. Corresponds to the JSON property title

Returns:

  • (String)


2741
2742
2743
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2741

def title
  @title
end

#uriString

Required. The URL for the page the user wants to promote. Corresponds to the JSON property uri

Returns:

  • (String)


2746
2747
2748
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2746

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2753
2754
2755
2756
2757
2758
2759
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 2753

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @enabled = args[:enabled] if args.key?(:enabled)
  @image_uri = args[:image_uri] if args.key?(:image_uri)
  @title = args[:title] if args.key?(:title)
  @uri = args[:uri] if args.key?(:uri)
end