Class: Google::Apis::GmailV1::Filter

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

Overview

Resource definition for Gmail filters. Filters apply to specific messages instead of an entire email thread.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Filter

Returns a new instance of Filter.



122
123
124
# File 'generated/google/apis/gmail_v1/classes.rb', line 122

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

Instance Attribute Details

#actionGoogle::Apis::GmailV1::FilterAction

A set of actions to perform on a message. Corresponds to the JSON property action



110
111
112
# File 'generated/google/apis/gmail_v1/classes.rb', line 110

def action
  @action
end

#criteriaGoogle::Apis::GmailV1::FilterCriteria

Message matching criteria. Corresponds to the JSON property criteria



115
116
117
# File 'generated/google/apis/gmail_v1/classes.rb', line 115

def criteria
  @criteria
end

#idString

The server assigned ID of the filter. Corresponds to the JSON property id

Returns:

  • (String)


120
121
122
# File 'generated/google/apis/gmail_v1/classes.rb', line 120

def id
  @id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



127
128
129
130
131
# File 'generated/google/apis/gmail_v1/classes.rb', line 127

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