Class: Google::Apis::AcceleratedmobilepageurlV1::AmpUrl

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

Overview

AMP URL response for a requested URL.

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) ⇒ AmpUrl

Returns a new instance of AmpUrl



131
132
133
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 131

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

Instance Attribute Details

#amp_urlString

The AMP URL pointing to the publisher's web server. Corresponds to the JSON property ampUrl

Returns:

  • (String)


129
130
131
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 129

def amp_url
  @amp_url
end

#cdn_amp_urlString

The AMP Cache URL pointing to the cached document in the Google AMP Cache. Corresponds to the JSON property cdnAmpUrl

Returns:

  • (String)


119
120
121
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 119

def cdn_amp_url
  @cdn_amp_url
end

#original_urlString

The original non-AMP URL. Corresponds to the JSON property originalUrl

Returns:

  • (String)


124
125
126
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 124

def original_url
  @original_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



136
137
138
139
140
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 136

def update!(**args)
  @cdn_amp_url = args[:cdn_amp_url] if args.key?(:cdn_amp_url)
  @original_url = args[:original_url] if args.key?(:original_url)
  @amp_url = args[:amp_url] if args.key?(:amp_url)
end