Class: Google::Apis::ChatV1::SlashCommandMetadata

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

Overview

Annotation metadata for slash commands (/).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SlashCommandMetadata

Returns a new instance of SlashCommandMetadata.



3792
3793
3794
# File 'lib/google/apis/chat_v1/classes.rb', line 3792

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

Instance Attribute Details

#botGoogle::Apis::ChatV1::User

A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user, the output for a User resource only populates the user's name and type. Corresponds to the JSON property bot



3769
3770
3771
# File 'lib/google/apis/chat_v1/classes.rb', line 3769

def bot
  @bot
end

#command_idFixnum

The command ID of the invoked slash command. Corresponds to the JSON property commandId

Returns:

  • (Fixnum)


3774
3775
3776
# File 'lib/google/apis/chat_v1/classes.rb', line 3774

def command_id
  @command_id
end

#command_nameString

The name of the invoked slash command. Corresponds to the JSON property commandName

Returns:

  • (String)


3779
3780
3781
# File 'lib/google/apis/chat_v1/classes.rb', line 3779

def command_name
  @command_name
end

#triggers_dialogBoolean Also known as: triggers_dialog?

Indicates whether the slash command is for a dialog. Corresponds to the JSON property triggersDialog

Returns:

  • (Boolean)


3784
3785
3786
# File 'lib/google/apis/chat_v1/classes.rb', line 3784

def triggers_dialog
  @triggers_dialog
end

#typeString

The type of slash command. Corresponds to the JSON property type

Returns:

  • (String)


3790
3791
3792
# File 'lib/google/apis/chat_v1/classes.rb', line 3790

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3797
3798
3799
3800
3801
3802
3803
# File 'lib/google/apis/chat_v1/classes.rb', line 3797

def update!(**args)
  @bot = args[:bot] if args.key?(:bot)
  @command_id = args[:command_id] if args.key?(:command_id)
  @command_name = args[:command_name] if args.key?(:command_name)
  @triggers_dialog = args[:triggers_dialog] if args.key?(:triggers_dialog)
  @type = args[:type] if args.key?(:type)
end