Class: Google::Apis::CloudsearchV1::BackgroundColoredText

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BackgroundColoredText

Returns a new instance of BackgroundColoredText.



111
112
113
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 111

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

Instance Attribute Details

#background_colorString

[Optional] Color of the background. The text color can change depending on the selected background color, and the client does not have control over this. If missing, the background will be WHITE. Corresponds to the JSON property backgroundColor

Returns:

  • (String)


104
105
106
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 104

def background_color
  @background_color
end

#textString

[Required] The text to display. Corresponds to the JSON property text

Returns:

  • (String)


109
110
111
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 109

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



116
117
118
119
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 116

def update!(**args)
  @background_color = args[:background_color] if args.key?(:background_color)
  @text = args[:text] if args.key?(:text)
end