Class: Google::Apis::CalendarV3::EventLabel

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EventLabel

Returns a new instance of EventLabel.



2003
2004
2005
# File 'lib/google/apis/calendar_v3/classes.rb', line 2003

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

Instance Attribute Details

#background_colorString

Background color of the label in hexadecimal format, such as "#039be5". Events with this label are displayed in this color. Required. Corresponds to the JSON property backgroundColor

Returns:

  • (String)


1988
1989
1990
# File 'lib/google/apis/calendar_v3/classes.rb', line 1988

def background_color
  @background_color
end

#idString

The ID of the label. Optional when inserting a new label. If not provided, a unique ID will be generated. Required when updating a label. If provided, the ID must be unique within the calendar and follow UUID format. Corresponds to the JSON property id

Returns:

  • (String)


1995
1996
1997
# File 'lib/google/apis/calendar_v3/classes.rb', line 1995

def id
  @id
end

#nameString

Name of the label. Optional. If provided this must have at most 50 characters. Corresponds to the JSON property name

Returns:

  • (String)


2001
2002
2003
# File 'lib/google/apis/calendar_v3/classes.rb', line 2001

def name
  @name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2008
2009
2010
2011
2012
# File 'lib/google/apis/calendar_v3/classes.rb', line 2008

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