Class: Google::Apis::DeveloperknowledgeV1alpha::Document

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

Overview

A Document represents a piece of content from the Developer Knowledge corpus.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Document

Returns a new instance of Document.



236
237
238
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 236

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

Instance Attribute Details

#contentString

Output only. Contains the full content of the document in Markdown format. Corresponds to the JSON property content

Returns:

  • (String)


194
195
196
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 194

def content
  @content
end

#data_sourceString

Output only. Specifies the data source of the document. Example data source: firebase.google.com Corresponds to the JSON property dataSource

Returns:

  • (String)


200
201
202
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 200

def data_source
  @data_source
end

#descriptionString

Output only. Provides a description of the document. Corresponds to the JSON property description

Returns:

  • (String)


205
206
207
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 205

def description
  @description
end

#nameString

Identifier. Contains the resource name of the document. Format: documents/ uri_without_scheme`Example:documents/docs.cloud.google.com/storage/docs/ creating-buckets Corresponds to the JSON propertyname`

Returns:

  • (String)


212
213
214
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 212

def name
  @name
end

#titleString

Output only. Provides the title of the document. Corresponds to the JSON property title

Returns:

  • (String)


217
218
219
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 217

def title
  @title
end

#update_timeString

Output only. Represents the timestamp when the content or metadata of the document was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


223
224
225
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 223

def update_time
  @update_time
end

#uriString

Output only. Provides the URI of the content, such as docs.cloud.google.com/ storage/docs/creating-buckets. Corresponds to the JSON property uri

Returns:

  • (String)


229
230
231
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 229

def uri
  @uri
end

#viewString

Output only. Specifies the DocumentView of the document. Corresponds to the JSON property view

Returns:

  • (String)


234
235
236
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 234

def view
  @view
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



241
242
243
244
245
246
247
248
249
250
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 241

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @data_source = args[:data_source] if args.key?(:data_source)
  @description = args[:description] if args.key?(:description)
  @name = args[:name] if args.key?(:name)
  @title = args[:title] if args.key?(:title)
  @update_time = args[:update_time] if args.key?(:update_time)
  @uri = args[:uri] if args.key?(:uri)
  @view = args[:view] if args.key?(:view)
end