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

Constructor Details

#initialize(**args) ⇒ AmpUrl

Returns a new instance of AmpUrl.



45
46
47
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 45

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)


32
33
34
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 32

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)


38
39
40
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 38

def cdn_amp_url
  @cdn_amp_url
end

#original_urlString

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

Returns:

  • (String)


43
44
45
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 43

def original_url
  @original_url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



50
51
52
53
54
# File 'generated/google/apis/acceleratedmobilepageurl_v1/classes.rb', line 50

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