Class: Google::Apis::GmailV1::FilterCriteria

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

Overview

Message matching criteria.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FilterCriteria

Returns a new instance of FilterCriteria.



522
523
524
# File 'lib/google/apis/gmail_v1/classes.rb', line 522

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

Instance Attribute Details

#exclude_chatsBoolean Also known as: exclude_chats?

Whether the response should exclude chats. Corresponds to the JSON property excludeChats

Returns:

  • (Boolean)


469
470
471
# File 'lib/google/apis/gmail_v1/classes.rb', line 469

def exclude_chats
  @exclude_chats
end

#fromString

The sender's display name or email address. Corresponds to the JSON property from

Returns:

  • (String)


475
476
477
# File 'lib/google/apis/gmail_v1/classes.rb', line 475

def from
  @from
end

#has_attachmentBoolean Also known as: has_attachment?

Whether the message has any attachment. Corresponds to the JSON property hasAttachment

Returns:

  • (Boolean)


480
481
482
# File 'lib/google/apis/gmail_v1/classes.rb', line 480

def has_attachment
  @has_attachment
end

#negated_queryString

Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread". Corresponds to the JSON property negatedQuery

Returns:

  • (String)


488
489
490
# File 'lib/google/apis/gmail_v1/classes.rb', line 488

def negated_query
  @negated_query
end

#queryString

Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread". Corresponds to the JSON property query

Returns:

  • (String)


495
496
497
# File 'lib/google/apis/gmail_v1/classes.rb', line 495

def query
  @query
end

#sizeFixnum

The size of the entire RFC822 message in bytes, including all headers and attachments. Corresponds to the JSON property size

Returns:

  • (Fixnum)


501
502
503
# File 'lib/google/apis/gmail_v1/classes.rb', line 501

def size
  @size
end

#size_comparisonString

How the message size in bytes should be in relation to the size field. Corresponds to the JSON property sizeComparison

Returns:

  • (String)


506
507
508
# File 'lib/google/apis/gmail_v1/classes.rb', line 506

def size_comparison
  @size_comparison
end

#subjectString

Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. Corresponds to the JSON property subject

Returns:

  • (String)


512
513
514
# File 'lib/google/apis/gmail_v1/classes.rb', line 512

def subject
  @subject
end

#toString

The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example@" both match "[email protected]". This field is case-insensitive. Corresponds to the JSON property to

Returns:

  • (String)


520
521
522
# File 'lib/google/apis/gmail_v1/classes.rb', line 520

def to
  @to
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



527
528
529
530
531
532
533
534
535
536
537
# File 'lib/google/apis/gmail_v1/classes.rb', line 527

def update!(**args)
  @exclude_chats = args[:exclude_chats] if args.key?(:exclude_chats)
  @from = args[:from] if args.key?(:from)
  @has_attachment = args[:has_attachment] if args.key?(:has_attachment)
  @negated_query = args[:negated_query] if args.key?(:negated_query)
  @query = args[:query] if args.key?(:query)
  @size = args[:size] if args.key?(:size)
  @size_comparison = args[:size_comparison] if args.key?(:size_comparison)
  @subject = args[:subject] if args.key?(:subject)
  @to = args[:to] if args.key?(:to)
end