Class: Google::Apis::IndexingV3::UrlNotification

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

Overview

UrlNotification is the resource used in all Indexing API calls. It describes one event in the life cycle of a Web Document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UrlNotification

Returns a new instance of UrlNotification.



68
69
70
# File 'generated/google/apis/indexing_v3/classes.rb', line 68

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

Instance Attribute Details

#notify_timeString

Creation timestamp for this notification. Users should not specify it, the field is ignored at the request time. Corresponds to the JSON property notifyTime

Returns:

  • (String)


54
55
56
# File 'generated/google/apis/indexing_v3/classes.rb', line 54

def notify_time
  @notify_time
end

#typeString

The URL life cycle event that Google is being notified about. Corresponds to the JSON property type

Returns:

  • (String)


59
60
61
# File 'generated/google/apis/indexing_v3/classes.rb', line 59

def type
  @type
end

#urlString

The object of this notification. The URL must be owned by the publisher of this notification and, in case of URL_UPDATED notifications, it must be crawlable by Google. Corresponds to the JSON property url

Returns:

  • (String)


66
67
68
# File 'generated/google/apis/indexing_v3/classes.rb', line 66

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



73
74
75
76
77
# File 'generated/google/apis/indexing_v3/classes.rb', line 73

def update!(**args)
  @notify_time = args[:notify_time] if args.key?(:notify_time)
  @type = args[:type] if args.key?(:type)
  @url = args[:url] if args.key?(:url)
end