Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Document

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

Overview

Defines the structure for content warehouse document proto.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContentwarehouseV1Document

Returns a new instance of GoogleCloudContentwarehouseV1Document.



1165
1166
1167
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1165

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

Instance Attribute Details

#cloud_ai_documentGoogle::Apis::ContentwarehouseV1::GoogleCloudDocumentaiV1Document

Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality. Corresponds to the JSON property cloudAiDocument



1048
1049
1050
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1048

def cloud_ai_document
  @cloud_ai_document
end

#content_categoryString

Indicates the category (image, audio, video etc.) of the original content. Corresponds to the JSON property contentCategory

Returns:

  • (String)


1053
1054
1055
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1053

def 
  @content_category
end

#create_timeString

Output only. The time when the document is created. Corresponds to the JSON property createTime

Returns:

  • (String)


1058
1059
1060
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1058

def create_time
  @create_time
end

#creatorString

The user who creates the document. Corresponds to the JSON property creator

Returns:

  • (String)


1063
1064
1065
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1063

def creator
  @creator
end

#display_nameString

Required. Display name of the document given by the user. This name will be displayed in the UI. Customer can populate this field with the name of the document. This differs from the 'title' field as 'title' is optional and stores the top heading in the document. Corresponds to the JSON property displayName

Returns:

  • (String)


1071
1072
1073
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1071

def display_name
  @display_name
end

#display_uriString

Uri to display the document, for example, in the UI. Corresponds to the JSON property displayUri

Returns:

  • (String)


1076
1077
1078
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1076

def display_uri
  @display_uri
end

#disposition_timeString

Output only. If linked to a Collection with RetentionPolicy, the date when the document becomes mutable. Corresponds to the JSON property dispositionTime

Returns:

  • (String)


1082
1083
1084
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1082

def disposition_time
  @disposition_time
end

#document_schema_nameString

The Document schema name. Format: projects/project_number/locations/ location/documentSchemas/document_schema_id. Corresponds to the JSON property documentSchemaName

Returns:

  • (String)


1088
1089
1090
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1088

def document_schema_name
  @document_schema_name
end

#inline_raw_documentString

Raw document content. Corresponds to the JSON property inlineRawDocument NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1094
1095
1096
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1094

def inline_raw_document
  @inline_raw_document
end

Output only. Indicates if the document has a legal hold on it. Corresponds to the JSON property legalHold

Returns:

  • (Boolean)


1099
1100
1101
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1099

def legal_hold
  @legal_hold
end

#nameString

The resource name of the document. Format: projects/project_number/locations/ location/documents/document_id. The name is ignored when creating a document. Corresponds to the JSON property name

Returns:

  • (String)


1107
1108
1109
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1107

def name
  @name
end

#plain_textString

Other document format, such as PPTX, XLXS Corresponds to the JSON property plainText

Returns:

  • (String)


1112
1113
1114
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1112

def plain_text
  @plain_text
end

#propertiesArray<Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1Property>

List of values that are user supplied metadata. Corresponds to the JSON property properties



1117
1118
1119
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1117

def properties
  @properties
end

#raw_document_file_typeString

This is used when DocAI was not used to load the document and parsing/ extracting is needed for the inline_raw_document. For example, if inline_raw_document is the byte representation of a PDF file, then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF. Corresponds to the JSON property rawDocumentFileType

Returns:

  • (String)


1125
1126
1127
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1125

def raw_document_file_type
  @raw_document_file_type
end

#raw_document_pathString

Raw document file in Cloud Storage path. Corresponds to the JSON property rawDocumentPath

Returns:

  • (String)


1130
1131
1132
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1130

def raw_document_path
  @raw_document_path
end

#reference_idString

The reference ID set by customers. Must be unique per project and location. Corresponds to the JSON property referenceId

Returns:

  • (String)


1135
1136
1137
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1135

def reference_id
  @reference_id
end

#text_extraction_disabledBoolean Also known as: text_extraction_disabled?

If true, text extraction will not be performed. Corresponds to the JSON property textExtractionDisabled

Returns:

  • (Boolean)


1140
1141
1142
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1140

def text_extraction_disabled
  @text_extraction_disabled
end

#text_extraction_enabledBoolean Also known as: text_extraction_enabled?

If true, text extraction will be performed. Corresponds to the JSON property textExtractionEnabled

Returns:

  • (Boolean)


1146
1147
1148
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1146

def text_extraction_enabled
  @text_extraction_enabled
end

#titleString

Title that describes the document. This can be the top heading or text that describes the document. Corresponds to the JSON property title

Returns:

  • (String)


1153
1154
1155
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1153

def title
  @title
end

#update_timeString

Output only. The time when the document is last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


1158
1159
1160
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1158

def update_time
  @update_time
end

#updaterString

The user who lastly updates the document. Corresponds to the JSON property updater

Returns:

  • (String)


1163
1164
1165
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1163

def updater
  @updater
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 1170

def update!(**args)
  @cloud_ai_document = args[:cloud_ai_document] if args.key?(:cloud_ai_document)
  @content_category = args[:content_category] if args.key?(:content_category)
  @create_time = args[:create_time] if args.key?(:create_time)
  @creator = args[:creator] if args.key?(:creator)
  @display_name = args[:display_name] if args.key?(:display_name)
  @display_uri = args[:display_uri] if args.key?(:display_uri)
  @disposition_time = args[:disposition_time] if args.key?(:disposition_time)
  @document_schema_name = args[:document_schema_name] if args.key?(:document_schema_name)
  @inline_raw_document = args[:inline_raw_document] if args.key?(:inline_raw_document)
  @legal_hold = args[:legal_hold] if args.key?(:legal_hold)
  @name = args[:name] if args.key?(:name)
  @plain_text = args[:plain_text] if args.key?(:plain_text)
  @properties = args[:properties] if args.key?(:properties)
  @raw_document_file_type = args[:raw_document_file_type] if args.key?(:raw_document_file_type)
  @raw_document_path = args[:raw_document_path] if args.key?(:raw_document_path)
  @reference_id = args[:reference_id] if args.key?(:reference_id)
  @text_extraction_disabled = args[:text_extraction_disabled] if args.key?(:text_extraction_disabled)
  @text_extraction_enabled = args[:text_extraction_enabled] if args.key?(:text_extraction_enabled)
  @title = args[:title] if args.key?(:title)
  @update_time = args[:update_time] if args.key?(:update_time)
  @updater = args[:updater] if args.key?(:updater)
end