Class: Google::Apis::ServicemanagementV1::Page

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

Overview

Represents a documentation page. A page can contain subpages to represent nested documentation set structure.

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

Returns a new instance of Page



1257
1258
1259
# File 'generated/google/apis/servicemanagement_v1/classes.rb', line 1257

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

Instance Attribute Details

#contentString

The Markdown content of the page. You can use (== include path ==&# 41; to include content from a Markdown file. Corresponds to the JSON property content

Returns:

  • (String)


1249
1250
1251
# File 'generated/google/apis/servicemanagement_v1/classes.rb', line 1249

def content
  @content
end

#nameString

The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with .) can be used as reference to the page in your documentation. For example:

pages:
- name: Tutorial
content: (== include tutorial.md ==)
subpages:
- name: Java
content: (== include tutorial_java.md ==)

You can reference Java page using Markdown reference link syntax: Java. Corresponds to the JSON property name

Returns:

  • (String)


1242
1243
1244
# File 'generated/google/apis/servicemanagement_v1/classes.rb', line 1242

def name
  @name
end

#subpagesArray<Google::Apis::ServicemanagementV1::Page>

Subpages of this page. The order of subpages specified here will be honored in the generated docset. Corresponds to the JSON property subpages



1255
1256
1257
# File 'generated/google/apis/servicemanagement_v1/classes.rb', line 1255

def subpages
  @subpages
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1262
1263
1264
1265
1266
# File 'generated/google/apis/servicemanagement_v1/classes.rb', line 1262

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @content = args[:content] if args.key?(:content)
  @subpages = args[:subpages] if args.key?(:subpages)
end