1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="cloudsearch_v1.html">Cloud Search API</a> . <a href="cloudsearch_v1.indexing.html">indexing</a> . <a href="cloudsearch_v1.indexing.datasources.html">datasources</a> . <a href="cloudsearch_v1.indexing.datasources.items.html">items</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#delete">delete(name, connectorName=None, debugOptions_enableDebugging=None, mode=None, version=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Deletes Item resource for the specified resource name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 83<p class="toc_element"> 84 <code><a href="#deleteQueueItems">deleteQueueItems(name, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Deletes all items in a queue. This method is useful for deleting stale items. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 86<p class="toc_element"> 87 <code><a href="#get">get(name, connectorName=None, debugOptions_enableDebugging=None, x__xgafv=None)</a></code></p> 88<p class="firstline">Gets Item resource by item name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 89<p class="toc_element"> 90 <code><a href="#index">index(name, body=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Updates Item ACL, metadata, and content. It will insert the Item if it does not exist. This method does not support partial updates. Fields with no provided values are cleared out in the Cloud Search index. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 92<p class="toc_element"> 93 <code><a href="#list">list(name, brief=None, connectorName=None, debugOptions_enableDebugging=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Lists all or a subset of Item resources. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 95<p class="toc_element"> 96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 97<p class="firstline">Retrieves the next page of results.</p> 98<p class="toc_element"> 99 <code><a href="#poll">poll(name, body=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Polls for unreserved items from the indexing queue and marks a set as reserved, starting with items that have the oldest timestamp from the highest priority ItemStatus. The priority order is as follows: ERROR MODIFIED NEW_ITEM ACCEPTED Reserving items ensures that polling from other threads cannot create overlapping sets. After handling the reserved items, the client should put items back into the unreserved state, either by calling index, or by calling push with the type REQUEUE. Items automatically become available (unreserved) after 4 hours even if no update or push method is called. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 101<p class="toc_element"> 102 <code><a href="#push">push(name, body=None, x__xgafv=None)</a></code></p> 103<p class="firstline">Pushes an item onto a queue for later polling and updating. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 104<p class="toc_element"> 105 <code><a href="#unreserve">unreserve(name, body=None, x__xgafv=None)</a></code></p> 106<p class="firstline">Unreserves all items from a queue, making them all eligible to be polled. This method is useful for resetting the indexing queue after a connector has been restarted. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 107<p class="toc_element"> 108 <code><a href="#upload">upload(name, body=None, x__xgafv=None)</a></code></p> 109<p class="firstline">Creates an upload session for uploading item content. For items smaller than 100 KB, it's easier to embed the content inline within an index request. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.</p> 110<h3>Method Details</h3> 111<div class="method"> 112 <code class="details" id="close">close()</code> 113 <pre>Close httplib2 connections.</pre> 114</div> 115 116<div class="method"> 117 <code class="details" id="delete">delete(name, connectorName=None, debugOptions_enableDebugging=None, mode=None, version=None, x__xgafv=None)</code> 118 <pre>Deletes Item resource for the specified resource name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 119 120Args: 121 name: string, Required. Name of the item to delete. Format: datasources/{source_id}/items/{item_id} (required) 122 connectorName: string, Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 123 debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 124 mode: string, Required. The RequestMode for this request. 125 Allowed values 126 UNSPECIFIED - Priority is not specified in the update request. Leaving priority unspecified results in an update failure. 127 SYNCHRONOUS - For real-time updates. 128 ASYNCHRONOUS - For changes that are executed after the response is sent back to the caller. 129 version: string, Required. The incremented version of the item to delete from the index. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. See [this guide](https://developers.devsite.corp.google.com/cloud-search/docs/guides/operations) to understand how item version affects reindexing after delete item. 130 x__xgafv: string, V1 error format. 131 Allowed values 132 1 - v1 error format 133 2 - v2 error format 134 135Returns: 136 An object of the form: 137 138 { # This resource represents a long-running operation that is the result of a network API call. 139 "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. 140 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. 141 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 142 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 143 { 144 "a_key": "", # Properties of the object. Contains field @type with type URL. 145 }, 146 ], 147 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 148 }, 149 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 150 "a_key": "", # Properties of the object. Contains field @type with type URL. 151 }, 152 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. 153 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 154 "a_key": "", # Properties of the object. Contains field @type with type URL. 155 }, 156}</pre> 157</div> 158 159<div class="method"> 160 <code class="details" id="deleteQueueItems">deleteQueueItems(name, body=None, x__xgafv=None)</code> 161 <pre>Deletes all items in a queue. This method is useful for deleting stale items. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 162 163Args: 164 name: string, Name of the Data Source to delete items in a queue. Format: datasources/{source_id} (required) 165 body: object, The request body. 166 The object takes the form of: 167 168{ 169 "connectorName": "A String", # Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 170 "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options. 171 "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 172 }, 173 "queue": "A String", # Name of a queue to delete items from. 174} 175 176 x__xgafv: string, V1 error format. 177 Allowed values 178 1 - v1 error format 179 2 - v2 error format 180 181Returns: 182 An object of the form: 183 184 { # This resource represents a long-running operation that is the result of a network API call. 185 "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. 186 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. 187 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 188 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 189 { 190 "a_key": "", # Properties of the object. Contains field @type with type URL. 191 }, 192 ], 193 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 194 }, 195 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 196 "a_key": "", # Properties of the object. Contains field @type with type URL. 197 }, 198 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. 199 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 200 "a_key": "", # Properties of the object. Contains field @type with type URL. 201 }, 202}</pre> 203</div> 204 205<div class="method"> 206 <code class="details" id="get">get(name, connectorName=None, debugOptions_enableDebugging=None, x__xgafv=None)</code> 207 <pre>Gets Item resource by item name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 208 209Args: 210 name: string, Name of the item to get info. Format: datasources/{source_id}/items/{item_id} (required) 211 connectorName: string, Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 212 debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 213 x__xgafv: string, V1 error format. 214 Allowed values 215 1 - v1 error format 216 2 - v2 error format 217 218Returns: 219 An object of the form: 220 221 { # Represents a single object that is an item in the search index, such as a file, folder, or a database record. 222 "acl": { # Access control list information for the item. For more information see [Map ACLs](/cloud-search/docs/guides/acls). # Access control list for this item. 223 "aclInheritanceType": "A String", # Sets the type of access rules to apply when an item inherits its ACL from a parent. This should always be set in tandem with the inheritAclFrom field. Also, when the inheritAclFrom field is set, this field should be set to a valid AclInheritanceType. 224 "deniedReaders": [ # List of principals who are explicitly denied access to the item in search results. While principals are denied access by default, use denied readers to handle exceptions and override the list allowed readers. The maximum number of elements is 100. 225 { # Reference to a user, group, or domain. 226 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 227 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 228 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 229 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 230 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 231 }, 232 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 233 }, 234 ], 235 "inheritAclFrom": "A String", # Name of the item to inherit the Access Permission List (ACL) from. Note: ACL inheritance *only* provides access permissions to child items and does not define structural relationships, nor does it provide convenient ways to delete large groups of items. Deleting an ACL parent from the index only alters the access permissions of child items that reference the parent in the inheritAclFrom field. The item is still in the index, but may not visible in search results. By contrast, deletion of a container item also deletes all items that reference the container via the containerName field. The maximum length for this field is 1536 characters. 236 "owners": [ # Optional. List of owners for the item. This field has no bearing on document access permissions. It does, however, offer a slight ranking boosts items where the querying user is an owner. The maximum number of elements is 5. 237 { # Reference to a user, group, or domain. 238 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 239 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 240 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 241 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 242 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 243 }, 244 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 245 }, 246 ], 247 "readers": [ # List of principals who are allowed to see the item in search results. Optional if inheriting permissions from another item or if the item is not intended to be visible, such as virtual containers. The maximum number of elements is 1000. 248 { # Reference to a user, group, or domain. 249 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 250 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 251 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 252 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 253 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 254 }, 255 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 256 }, 257 ], 258 }, 259 "content": { # Content of an item to be indexed and surfaced by Cloud Search. Only UTF-8 encoded strings are allowed as inlineContent. If the content is uploaded and not binary, it must be UTF-8 encoded. # Item content to be indexed and made text searchable. 260 "contentDataRef": { # Represents an upload session reference. This reference is created via upload method. Updating of item content may refer to this uploaded content via contentDataRef. # Upload reference ID of a previously uploaded content via write method. 261 "name": "A String", # Name of the content reference. The maximum length is 2048 characters. 262 }, 263 "contentFormat": "A String", 264 "hash": "A String", # Hashing info calculated and provided by the API client for content. Can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 265 "inlineContent": "A String", # Content that is supplied inlined within the update method. The maximum length is 102400 bytes (100 KiB). 266 }, 267 "itemType": "A String", # Type for this item. 268 "metadata": { # Available metadata fields for the item. # Metadata information. 269 "containerName": "A String", # The name of the container for this item. Deletion of the container item leads to automatic deletion of this item. Note: ACLs are not inherited from a container item. To provide ACL inheritance for an item, use the inheritAclFrom field. The maximum length is 1536 characters. 270 "contentLanguage": "A String", # The BCP-47 language code for the item, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. The maximum length is 32 characters. 271 "contextAttributes": [ # A set of named attributes associated with the item. This can be used for influencing the ranking of the item based on the context in the request. The maximum number of elements is 10. 272 { # A named attribute associated with an item which can be used for influencing the ranking of the item based on the context in the request. 273 "name": "A String", # The name of the attribute. It should not be empty. The maximum length is 32 characters. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The name will be normalized (lower-cased) before being matched. 274 "values": [ # Text values of the attribute. The maximum number of elements is 10. The maximum length of an element in the array is 32 characters. The value will be normalized (lower-cased) before being matched. 275 "A String", 276 ], 277 }, 278 ], 279 "createTime": "A String", # The time when the item was created in the source repository. 280 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 281 "interactions": [ # A list of interactions for the item. Interactions are used to improve Search quality, but are not exposed to end users. The maximum number of elements is 1000. 282 { # Represents an interaction between a user and an item. 283 "interactionTime": "A String", # The time when the user acted on the item. If multiple actions of the same type exist for a single user, only the most recent action is recorded. 284 "principal": { # Reference to a user, group, or domain. # The user that acted on the item. 285 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 286 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 287 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 288 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 289 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 290 }, 291 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 292 }, 293 "type": "A String", 294 }, 295 ], 296 "keywords": [ # Additional keywords or phrases that should match the item. Used internally for user generated content. The maximum number of elements is 100. The maximum length is 8192 characters. 297 "A String", 298 ], 299 "mimeType": "A String", # The original mime-type of ItemContent.content in the source repository. The maximum length is 256 characters. 300 "objectType": "A String", # The type of the item. This should correspond to the name of an object definition in the schema registered for the data source. For example, if the schema for the data source contains an object definition with name 'document', then item indexing requests for objects of that type should set objectType to 'document'. The maximum length is 256 characters. 301 "searchQualityMetadata": { # Additional search quality metadata of the item. # Additional search quality metadata of the item 302 "quality": 3.14, # An indication of the quality of the item, used to influence search quality. Value should be between 0.0 (lowest quality) and 1.0 (highest quality). The default value is 0.0. 303 }, 304 "sourceRepositoryUrl": "A String", # Link to the source repository serving the data. Search results apply this link to the title. Whitespace or special characters may cause Cloud Search result links to trigger a redirect notice; to avoid this, encode the URL. The maximum length is 2048 characters. 305 "title": "A String", # The title of the item. If given, this will be the displayed title of the Search result. The maximum length is 2048 characters. 306 "updateTime": "A String", # The time when the item was last modified in the source repository. 307 }, 308 "name": "A String", # Name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters. 309 "payload": "A String", # Additional state connector can store for this item. The maximum length is 10000 bytes. 310 "queue": "A String", # Queue this item belongs to. The maximum length is 100 characters. 311 "status": { # This contains item's status and any errors. # Status of the item. Output only field. 312 "code": "A String", # Status code. 313 "processingErrors": [ # Error details in case the item is in ERROR state. 314 { 315 "code": "A String", # Error code indicating the nature of the error. 316 "errorMessage": "A String", # Description of the error. 317 "fieldViolations": [ # In case the item fields are invalid, this field contains the details about the validation errors. 318 { 319 "description": "A String", # Description of the error. 320 "field": "A String", # Path of field with violation. 321 }, 322 ], 323 }, 324 ], 325 "repositoryErrors": [ # Repository error reported by connector. 326 { # Errors when the connector is communicating to the source repository. 327 "errorMessage": "A String", # Message that describes the error. The maximum allowable length of the message is 8192 characters. 328 "httpStatusCode": 42, # Error codes. Matches the definition of HTTP status codes. 329 "type": "A String", # Type of error. 330 }, 331 ], 332 }, 333 "structuredData": { # Available structured data fields for the item. # The structured data for the item that should conform to a registered object definition in the schema for the data source. 334 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 335 "object": { # A structured data object consisting of named properties. # The structured data object that should conform to a registered object definition in the schema for the data source. 336 "properties": [ # The properties for the object. The maximum number of elements is 1000. 337 { # A typed name-value pair for structured data. The type of the value should be the same as the registered type for the `name` property in the object definition of `objectType`. 338 "booleanValue": True or False, 339 "dateValues": { # List of date values. 340 "values": [ 341 { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. 342 "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. 343 "month": 42, # Month of date. Must be from 1 to 12. 344 "year": 42, # Year of date. Must be from 1 to 9999. 345 }, 346 ], 347 }, 348 "doubleValues": { # List of double values. 349 "values": [ 350 3.14, 351 ], 352 }, 353 "enumValues": { # List of enum values. 354 "values": [ # The maximum allowable length for string values is 32 characters. 355 "A String", 356 ], 357 }, 358 "htmlValues": { # List of html values. 359 "values": [ # The maximum allowable length for html values is 2048 characters. 360 "A String", 361 ], 362 }, 363 "integerValues": { # List of integer values. 364 "values": [ 365 "A String", 366 ], 367 }, 368 "name": "A String", # The name of the property. This name should correspond to the name of the property that was registered for object definition in the schema. The maximum allowable length for this property is 256 characters. 369 "objectValues": { # List of object values. 370 "values": [ 371 # Object with schema name: StructuredDataObject 372 ], 373 }, 374 "textValues": { # List of text values. 375 "values": [ # The maximum allowable length for text values is 2048 characters. 376 "A String", 377 ], 378 }, 379 "timestampValues": { # List of timestamp values. 380 "values": [ 381 "A String", 382 ], 383 }, 384 }, 385 ], 386 }, 387 }, 388 "version": "A String", # Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. See [this guide](https://developers.devsite.corp.google.com/cloud-search/docs/guides/operations) to understand how item version affects reindexing after delete item. 389}</pre> 390</div> 391 392<div class="method"> 393 <code class="details" id="index">index(name, body=None, x__xgafv=None)</code> 394 <pre>Updates Item ACL, metadata, and content. It will insert the Item if it does not exist. This method does not support partial updates. Fields with no provided values are cleared out in the Cloud Search index. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 395 396Args: 397 name: string, Name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters. (required) 398 body: object, The request body. 399 The object takes the form of: 400 401{ 402 "connectorName": "A String", # Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 403 "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options. 404 "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 405 }, 406 "indexItemOptions": { 407 "allowUnknownGsuitePrincipals": True or False, # Specifies if the index request should allow gsuite principals that do not exist or are deleted in the index request. 408 }, 409 "item": { # Represents a single object that is an item in the search index, such as a file, folder, or a database record. # Name of the item. Format: datasources/{source_id}/items/{item_id} 410 "acl": { # Access control list information for the item. For more information see [Map ACLs](/cloud-search/docs/guides/acls). # Access control list for this item. 411 "aclInheritanceType": "A String", # Sets the type of access rules to apply when an item inherits its ACL from a parent. This should always be set in tandem with the inheritAclFrom field. Also, when the inheritAclFrom field is set, this field should be set to a valid AclInheritanceType. 412 "deniedReaders": [ # List of principals who are explicitly denied access to the item in search results. While principals are denied access by default, use denied readers to handle exceptions and override the list allowed readers. The maximum number of elements is 100. 413 { # Reference to a user, group, or domain. 414 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 415 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 416 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 417 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 418 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 419 }, 420 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 421 }, 422 ], 423 "inheritAclFrom": "A String", # Name of the item to inherit the Access Permission List (ACL) from. Note: ACL inheritance *only* provides access permissions to child items and does not define structural relationships, nor does it provide convenient ways to delete large groups of items. Deleting an ACL parent from the index only alters the access permissions of child items that reference the parent in the inheritAclFrom field. The item is still in the index, but may not visible in search results. By contrast, deletion of a container item also deletes all items that reference the container via the containerName field. The maximum length for this field is 1536 characters. 424 "owners": [ # Optional. List of owners for the item. This field has no bearing on document access permissions. It does, however, offer a slight ranking boosts items where the querying user is an owner. The maximum number of elements is 5. 425 { # Reference to a user, group, or domain. 426 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 427 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 428 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 429 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 430 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 431 }, 432 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 433 }, 434 ], 435 "readers": [ # List of principals who are allowed to see the item in search results. Optional if inheriting permissions from another item or if the item is not intended to be visible, such as virtual containers. The maximum number of elements is 1000. 436 { # Reference to a user, group, or domain. 437 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 438 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 439 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 440 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 441 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 442 }, 443 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 444 }, 445 ], 446 }, 447 "content": { # Content of an item to be indexed and surfaced by Cloud Search. Only UTF-8 encoded strings are allowed as inlineContent. If the content is uploaded and not binary, it must be UTF-8 encoded. # Item content to be indexed and made text searchable. 448 "contentDataRef": { # Represents an upload session reference. This reference is created via upload method. Updating of item content may refer to this uploaded content via contentDataRef. # Upload reference ID of a previously uploaded content via write method. 449 "name": "A String", # Name of the content reference. The maximum length is 2048 characters. 450 }, 451 "contentFormat": "A String", 452 "hash": "A String", # Hashing info calculated and provided by the API client for content. Can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 453 "inlineContent": "A String", # Content that is supplied inlined within the update method. The maximum length is 102400 bytes (100 KiB). 454 }, 455 "itemType": "A String", # Type for this item. 456 "metadata": { # Available metadata fields for the item. # Metadata information. 457 "containerName": "A String", # The name of the container for this item. Deletion of the container item leads to automatic deletion of this item. Note: ACLs are not inherited from a container item. To provide ACL inheritance for an item, use the inheritAclFrom field. The maximum length is 1536 characters. 458 "contentLanguage": "A String", # The BCP-47 language code for the item, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. The maximum length is 32 characters. 459 "contextAttributes": [ # A set of named attributes associated with the item. This can be used for influencing the ranking of the item based on the context in the request. The maximum number of elements is 10. 460 { # A named attribute associated with an item which can be used for influencing the ranking of the item based on the context in the request. 461 "name": "A String", # The name of the attribute. It should not be empty. The maximum length is 32 characters. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The name will be normalized (lower-cased) before being matched. 462 "values": [ # Text values of the attribute. The maximum number of elements is 10. The maximum length of an element in the array is 32 characters. The value will be normalized (lower-cased) before being matched. 463 "A String", 464 ], 465 }, 466 ], 467 "createTime": "A String", # The time when the item was created in the source repository. 468 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 469 "interactions": [ # A list of interactions for the item. Interactions are used to improve Search quality, but are not exposed to end users. The maximum number of elements is 1000. 470 { # Represents an interaction between a user and an item. 471 "interactionTime": "A String", # The time when the user acted on the item. If multiple actions of the same type exist for a single user, only the most recent action is recorded. 472 "principal": { # Reference to a user, group, or domain. # The user that acted on the item. 473 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 474 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 475 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 476 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 477 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 478 }, 479 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 480 }, 481 "type": "A String", 482 }, 483 ], 484 "keywords": [ # Additional keywords or phrases that should match the item. Used internally for user generated content. The maximum number of elements is 100. The maximum length is 8192 characters. 485 "A String", 486 ], 487 "mimeType": "A String", # The original mime-type of ItemContent.content in the source repository. The maximum length is 256 characters. 488 "objectType": "A String", # The type of the item. This should correspond to the name of an object definition in the schema registered for the data source. For example, if the schema for the data source contains an object definition with name 'document', then item indexing requests for objects of that type should set objectType to 'document'. The maximum length is 256 characters. 489 "searchQualityMetadata": { # Additional search quality metadata of the item. # Additional search quality metadata of the item 490 "quality": 3.14, # An indication of the quality of the item, used to influence search quality. Value should be between 0.0 (lowest quality) and 1.0 (highest quality). The default value is 0.0. 491 }, 492 "sourceRepositoryUrl": "A String", # Link to the source repository serving the data. Search results apply this link to the title. Whitespace or special characters may cause Cloud Search result links to trigger a redirect notice; to avoid this, encode the URL. The maximum length is 2048 characters. 493 "title": "A String", # The title of the item. If given, this will be the displayed title of the Search result. The maximum length is 2048 characters. 494 "updateTime": "A String", # The time when the item was last modified in the source repository. 495 }, 496 "name": "A String", # Name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters. 497 "payload": "A String", # Additional state connector can store for this item. The maximum length is 10000 bytes. 498 "queue": "A String", # Queue this item belongs to. The maximum length is 100 characters. 499 "status": { # This contains item's status and any errors. # Status of the item. Output only field. 500 "code": "A String", # Status code. 501 "processingErrors": [ # Error details in case the item is in ERROR state. 502 { 503 "code": "A String", # Error code indicating the nature of the error. 504 "errorMessage": "A String", # Description of the error. 505 "fieldViolations": [ # In case the item fields are invalid, this field contains the details about the validation errors. 506 { 507 "description": "A String", # Description of the error. 508 "field": "A String", # Path of field with violation. 509 }, 510 ], 511 }, 512 ], 513 "repositoryErrors": [ # Repository error reported by connector. 514 { # Errors when the connector is communicating to the source repository. 515 "errorMessage": "A String", # Message that describes the error. The maximum allowable length of the message is 8192 characters. 516 "httpStatusCode": 42, # Error codes. Matches the definition of HTTP status codes. 517 "type": "A String", # Type of error. 518 }, 519 ], 520 }, 521 "structuredData": { # Available structured data fields for the item. # The structured data for the item that should conform to a registered object definition in the schema for the data source. 522 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 523 "object": { # A structured data object consisting of named properties. # The structured data object that should conform to a registered object definition in the schema for the data source. 524 "properties": [ # The properties for the object. The maximum number of elements is 1000. 525 { # A typed name-value pair for structured data. The type of the value should be the same as the registered type for the `name` property in the object definition of `objectType`. 526 "booleanValue": True or False, 527 "dateValues": { # List of date values. 528 "values": [ 529 { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. 530 "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. 531 "month": 42, # Month of date. Must be from 1 to 12. 532 "year": 42, # Year of date. Must be from 1 to 9999. 533 }, 534 ], 535 }, 536 "doubleValues": { # List of double values. 537 "values": [ 538 3.14, 539 ], 540 }, 541 "enumValues": { # List of enum values. 542 "values": [ # The maximum allowable length for string values is 32 characters. 543 "A String", 544 ], 545 }, 546 "htmlValues": { # List of html values. 547 "values": [ # The maximum allowable length for html values is 2048 characters. 548 "A String", 549 ], 550 }, 551 "integerValues": { # List of integer values. 552 "values": [ 553 "A String", 554 ], 555 }, 556 "name": "A String", # The name of the property. This name should correspond to the name of the property that was registered for object definition in the schema. The maximum allowable length for this property is 256 characters. 557 "objectValues": { # List of object values. 558 "values": [ 559 # Object with schema name: StructuredDataObject 560 ], 561 }, 562 "textValues": { # List of text values. 563 "values": [ # The maximum allowable length for text values is 2048 characters. 564 "A String", 565 ], 566 }, 567 "timestampValues": { # List of timestamp values. 568 "values": [ 569 "A String", 570 ], 571 }, 572 }, 573 ], 574 }, 575 }, 576 "version": "A String", # Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. See [this guide](https://developers.devsite.corp.google.com/cloud-search/docs/guides/operations) to understand how item version affects reindexing after delete item. 577 }, 578 "mode": "A String", # Required. The RequestMode for this request. 579} 580 581 x__xgafv: string, V1 error format. 582 Allowed values 583 1 - v1 error format 584 2 - v2 error format 585 586Returns: 587 An object of the form: 588 589 { # This resource represents a long-running operation that is the result of a network API call. 590 "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. 591 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. 592 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 593 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 594 { 595 "a_key": "", # Properties of the object. Contains field @type with type URL. 596 }, 597 ], 598 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 599 }, 600 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 601 "a_key": "", # Properties of the object. Contains field @type with type URL. 602 }, 603 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. 604 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 605 "a_key": "", # Properties of the object. Contains field @type with type URL. 606 }, 607}</pre> 608</div> 609 610<div class="method"> 611 <code class="details" id="list">list(name, brief=None, connectorName=None, debugOptions_enableDebugging=None, pageSize=None, pageToken=None, x__xgafv=None)</code> 612 <pre>Lists all or a subset of Item resources. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 613 614Args: 615 name: string, Name of the Data Source to list Items. Format: datasources/{source_id} (required) 616 brief: boolean, When set to true, the indexing system only populates the following fields: name, version, queue. metadata.hash, metadata.title, metadata.sourceRepositoryURL, metadata.objectType, metadata.createTime, metadata.updateTime, metadata.contentLanguage, metadata.mimeType, structured_data.hash, content.hash, itemType, itemStatus.code, itemStatus.processingError.code, itemStatus.repositoryError.type, If this value is false, then all the fields are populated in Item. 617 connectorName: string, Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 618 debugOptions_enableDebugging: boolean, If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 619 pageSize: integer, Maximum number of items to fetch in a request. The max value is 1000 when brief is true. The max value is 10 if brief is false. The default value is 10 620 pageToken: string, The next_page_token value returned from a previous List request, if any. 621 x__xgafv: string, V1 error format. 622 Allowed values 623 1 - v1 error format 624 2 - v2 error format 625 626Returns: 627 An object of the form: 628 629 { 630 "items": [ 631 { # Represents a single object that is an item in the search index, such as a file, folder, or a database record. 632 "acl": { # Access control list information for the item. For more information see [Map ACLs](/cloud-search/docs/guides/acls). # Access control list for this item. 633 "aclInheritanceType": "A String", # Sets the type of access rules to apply when an item inherits its ACL from a parent. This should always be set in tandem with the inheritAclFrom field. Also, when the inheritAclFrom field is set, this field should be set to a valid AclInheritanceType. 634 "deniedReaders": [ # List of principals who are explicitly denied access to the item in search results. While principals are denied access by default, use denied readers to handle exceptions and override the list allowed readers. The maximum number of elements is 100. 635 { # Reference to a user, group, or domain. 636 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 637 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 638 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 639 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 640 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 641 }, 642 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 643 }, 644 ], 645 "inheritAclFrom": "A String", # Name of the item to inherit the Access Permission List (ACL) from. Note: ACL inheritance *only* provides access permissions to child items and does not define structural relationships, nor does it provide convenient ways to delete large groups of items. Deleting an ACL parent from the index only alters the access permissions of child items that reference the parent in the inheritAclFrom field. The item is still in the index, but may not visible in search results. By contrast, deletion of a container item also deletes all items that reference the container via the containerName field. The maximum length for this field is 1536 characters. 646 "owners": [ # Optional. List of owners for the item. This field has no bearing on document access permissions. It does, however, offer a slight ranking boosts items where the querying user is an owner. The maximum number of elements is 5. 647 { # Reference to a user, group, or domain. 648 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 649 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 650 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 651 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 652 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 653 }, 654 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 655 }, 656 ], 657 "readers": [ # List of principals who are allowed to see the item in search results. Optional if inheriting permissions from another item or if the item is not intended to be visible, such as virtual containers. The maximum number of elements is 1000. 658 { # Reference to a user, group, or domain. 659 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 660 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 661 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 662 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 663 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 664 }, 665 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 666 }, 667 ], 668 }, 669 "content": { # Content of an item to be indexed and surfaced by Cloud Search. Only UTF-8 encoded strings are allowed as inlineContent. If the content is uploaded and not binary, it must be UTF-8 encoded. # Item content to be indexed and made text searchable. 670 "contentDataRef": { # Represents an upload session reference. This reference is created via upload method. Updating of item content may refer to this uploaded content via contentDataRef. # Upload reference ID of a previously uploaded content via write method. 671 "name": "A String", # Name of the content reference. The maximum length is 2048 characters. 672 }, 673 "contentFormat": "A String", 674 "hash": "A String", # Hashing info calculated and provided by the API client for content. Can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 675 "inlineContent": "A String", # Content that is supplied inlined within the update method. The maximum length is 102400 bytes (100 KiB). 676 }, 677 "itemType": "A String", # Type for this item. 678 "metadata": { # Available metadata fields for the item. # Metadata information. 679 "containerName": "A String", # The name of the container for this item. Deletion of the container item leads to automatic deletion of this item. Note: ACLs are not inherited from a container item. To provide ACL inheritance for an item, use the inheritAclFrom field. The maximum length is 1536 characters. 680 "contentLanguage": "A String", # The BCP-47 language code for the item, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. The maximum length is 32 characters. 681 "contextAttributes": [ # A set of named attributes associated with the item. This can be used for influencing the ranking of the item based on the context in the request. The maximum number of elements is 10. 682 { # A named attribute associated with an item which can be used for influencing the ranking of the item based on the context in the request. 683 "name": "A String", # The name of the attribute. It should not be empty. The maximum length is 32 characters. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The name will be normalized (lower-cased) before being matched. 684 "values": [ # Text values of the attribute. The maximum number of elements is 10. The maximum length of an element in the array is 32 characters. The value will be normalized (lower-cased) before being matched. 685 "A String", 686 ], 687 }, 688 ], 689 "createTime": "A String", # The time when the item was created in the source repository. 690 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 691 "interactions": [ # A list of interactions for the item. Interactions are used to improve Search quality, but are not exposed to end users. The maximum number of elements is 1000. 692 { # Represents an interaction between a user and an item. 693 "interactionTime": "A String", # The time when the user acted on the item. If multiple actions of the same type exist for a single user, only the most recent action is recorded. 694 "principal": { # Reference to a user, group, or domain. # The user that acted on the item. 695 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 696 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 697 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 698 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 699 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 700 }, 701 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 702 }, 703 "type": "A String", 704 }, 705 ], 706 "keywords": [ # Additional keywords or phrases that should match the item. Used internally for user generated content. The maximum number of elements is 100. The maximum length is 8192 characters. 707 "A String", 708 ], 709 "mimeType": "A String", # The original mime-type of ItemContent.content in the source repository. The maximum length is 256 characters. 710 "objectType": "A String", # The type of the item. This should correspond to the name of an object definition in the schema registered for the data source. For example, if the schema for the data source contains an object definition with name 'document', then item indexing requests for objects of that type should set objectType to 'document'. The maximum length is 256 characters. 711 "searchQualityMetadata": { # Additional search quality metadata of the item. # Additional search quality metadata of the item 712 "quality": 3.14, # An indication of the quality of the item, used to influence search quality. Value should be between 0.0 (lowest quality) and 1.0 (highest quality). The default value is 0.0. 713 }, 714 "sourceRepositoryUrl": "A String", # Link to the source repository serving the data. Search results apply this link to the title. Whitespace or special characters may cause Cloud Search result links to trigger a redirect notice; to avoid this, encode the URL. The maximum length is 2048 characters. 715 "title": "A String", # The title of the item. If given, this will be the displayed title of the Search result. The maximum length is 2048 characters. 716 "updateTime": "A String", # The time when the item was last modified in the source repository. 717 }, 718 "name": "A String", # Name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters. 719 "payload": "A String", # Additional state connector can store for this item. The maximum length is 10000 bytes. 720 "queue": "A String", # Queue this item belongs to. The maximum length is 100 characters. 721 "status": { # This contains item's status and any errors. # Status of the item. Output only field. 722 "code": "A String", # Status code. 723 "processingErrors": [ # Error details in case the item is in ERROR state. 724 { 725 "code": "A String", # Error code indicating the nature of the error. 726 "errorMessage": "A String", # Description of the error. 727 "fieldViolations": [ # In case the item fields are invalid, this field contains the details about the validation errors. 728 { 729 "description": "A String", # Description of the error. 730 "field": "A String", # Path of field with violation. 731 }, 732 ], 733 }, 734 ], 735 "repositoryErrors": [ # Repository error reported by connector. 736 { # Errors when the connector is communicating to the source repository. 737 "errorMessage": "A String", # Message that describes the error. The maximum allowable length of the message is 8192 characters. 738 "httpStatusCode": 42, # Error codes. Matches the definition of HTTP status codes. 739 "type": "A String", # Type of error. 740 }, 741 ], 742 }, 743 "structuredData": { # Available structured data fields for the item. # The structured data for the item that should conform to a registered object definition in the schema for the data source. 744 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 745 "object": { # A structured data object consisting of named properties. # The structured data object that should conform to a registered object definition in the schema for the data source. 746 "properties": [ # The properties for the object. The maximum number of elements is 1000. 747 { # A typed name-value pair for structured data. The type of the value should be the same as the registered type for the `name` property in the object definition of `objectType`. 748 "booleanValue": True or False, 749 "dateValues": { # List of date values. 750 "values": [ 751 { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. 752 "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. 753 "month": 42, # Month of date. Must be from 1 to 12. 754 "year": 42, # Year of date. Must be from 1 to 9999. 755 }, 756 ], 757 }, 758 "doubleValues": { # List of double values. 759 "values": [ 760 3.14, 761 ], 762 }, 763 "enumValues": { # List of enum values. 764 "values": [ # The maximum allowable length for string values is 32 characters. 765 "A String", 766 ], 767 }, 768 "htmlValues": { # List of html values. 769 "values": [ # The maximum allowable length for html values is 2048 characters. 770 "A String", 771 ], 772 }, 773 "integerValues": { # List of integer values. 774 "values": [ 775 "A String", 776 ], 777 }, 778 "name": "A String", # The name of the property. This name should correspond to the name of the property that was registered for object definition in the schema. The maximum allowable length for this property is 256 characters. 779 "objectValues": { # List of object values. 780 "values": [ 781 # Object with schema name: StructuredDataObject 782 ], 783 }, 784 "textValues": { # List of text values. 785 "values": [ # The maximum allowable length for text values is 2048 characters. 786 "A String", 787 ], 788 }, 789 "timestampValues": { # List of timestamp values. 790 "values": [ 791 "A String", 792 ], 793 }, 794 }, 795 ], 796 }, 797 }, 798 "version": "A String", # Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. See [this guide](https://developers.devsite.corp.google.com/cloud-search/docs/guides/operations) to understand how item version affects reindexing after delete item. 799 }, 800 ], 801 "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list. 802}</pre> 803</div> 804 805<div class="method"> 806 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 807 <pre>Retrieves the next page of results. 808 809Args: 810 previous_request: The request for the previous page. (required) 811 previous_response: The response from the request for the previous page. (required) 812 813Returns: 814 A request object that you can call 'execute()' on to request the next 815 page. Returns None if there are no more items in the collection. 816 </pre> 817</div> 818 819<div class="method"> 820 <code class="details" id="poll">poll(name, body=None, x__xgafv=None)</code> 821 <pre>Polls for unreserved items from the indexing queue and marks a set as reserved, starting with items that have the oldest timestamp from the highest priority ItemStatus. The priority order is as follows: ERROR MODIFIED NEW_ITEM ACCEPTED Reserving items ensures that polling from other threads cannot create overlapping sets. After handling the reserved items, the client should put items back into the unreserved state, either by calling index, or by calling push with the type REQUEUE. Items automatically become available (unreserved) after 4 hours even if no update or push method is called. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 822 823Args: 824 name: string, Name of the Data Source to poll items. Format: datasources/{source_id} (required) 825 body: object, The request body. 826 The object takes the form of: 827 828{ 829 "connectorName": "A String", # Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 830 "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options. 831 "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 832 }, 833 "limit": 42, # Maximum number of items to return. The maximum value is 100 and the default value is 20. 834 "queue": "A String", # Queue name to fetch items from. If unspecified, PollItems will fetch from 'default' queue. The maximum length is 100 characters. 835 "statusCodes": [ # Limit the items polled to the ones with these statuses. 836 "A String", 837 ], 838} 839 840 x__xgafv: string, V1 error format. 841 Allowed values 842 1 - v1 error format 843 2 - v2 error format 844 845Returns: 846 An object of the form: 847 848 { 849 "items": [ # Set of items from the queue available for connector to process. These items have the following subset of fields populated: version metadata.hash structured_data.hash content.hash payload status queue 850 { # Represents a single object that is an item in the search index, such as a file, folder, or a database record. 851 "acl": { # Access control list information for the item. For more information see [Map ACLs](/cloud-search/docs/guides/acls). # Access control list for this item. 852 "aclInheritanceType": "A String", # Sets the type of access rules to apply when an item inherits its ACL from a parent. This should always be set in tandem with the inheritAclFrom field. Also, when the inheritAclFrom field is set, this field should be set to a valid AclInheritanceType. 853 "deniedReaders": [ # List of principals who are explicitly denied access to the item in search results. While principals are denied access by default, use denied readers to handle exceptions and override the list allowed readers. The maximum number of elements is 100. 854 { # Reference to a user, group, or domain. 855 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 856 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 857 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 858 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 859 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 860 }, 861 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 862 }, 863 ], 864 "inheritAclFrom": "A String", # Name of the item to inherit the Access Permission List (ACL) from. Note: ACL inheritance *only* provides access permissions to child items and does not define structural relationships, nor does it provide convenient ways to delete large groups of items. Deleting an ACL parent from the index only alters the access permissions of child items that reference the parent in the inheritAclFrom field. The item is still in the index, but may not visible in search results. By contrast, deletion of a container item also deletes all items that reference the container via the containerName field. The maximum length for this field is 1536 characters. 865 "owners": [ # Optional. List of owners for the item. This field has no bearing on document access permissions. It does, however, offer a slight ranking boosts items where the querying user is an owner. The maximum number of elements is 5. 866 { # Reference to a user, group, or domain. 867 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 868 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 869 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 870 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 871 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 872 }, 873 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 874 }, 875 ], 876 "readers": [ # List of principals who are allowed to see the item in search results. Optional if inheriting permissions from another item or if the item is not intended to be visible, such as virtual containers. The maximum number of elements is 1000. 877 { # Reference to a user, group, or domain. 878 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 879 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 880 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 881 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 882 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 883 }, 884 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 885 }, 886 ], 887 }, 888 "content": { # Content of an item to be indexed and surfaced by Cloud Search. Only UTF-8 encoded strings are allowed as inlineContent. If the content is uploaded and not binary, it must be UTF-8 encoded. # Item content to be indexed and made text searchable. 889 "contentDataRef": { # Represents an upload session reference. This reference is created via upload method. Updating of item content may refer to this uploaded content via contentDataRef. # Upload reference ID of a previously uploaded content via write method. 890 "name": "A String", # Name of the content reference. The maximum length is 2048 characters. 891 }, 892 "contentFormat": "A String", 893 "hash": "A String", # Hashing info calculated and provided by the API client for content. Can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 894 "inlineContent": "A String", # Content that is supplied inlined within the update method. The maximum length is 102400 bytes (100 KiB). 895 }, 896 "itemType": "A String", # Type for this item. 897 "metadata": { # Available metadata fields for the item. # Metadata information. 898 "containerName": "A String", # The name of the container for this item. Deletion of the container item leads to automatic deletion of this item. Note: ACLs are not inherited from a container item. To provide ACL inheritance for an item, use the inheritAclFrom field. The maximum length is 1536 characters. 899 "contentLanguage": "A String", # The BCP-47 language code for the item, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. The maximum length is 32 characters. 900 "contextAttributes": [ # A set of named attributes associated with the item. This can be used for influencing the ranking of the item based on the context in the request. The maximum number of elements is 10. 901 { # A named attribute associated with an item which can be used for influencing the ranking of the item based on the context in the request. 902 "name": "A String", # The name of the attribute. It should not be empty. The maximum length is 32 characters. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The name will be normalized (lower-cased) before being matched. 903 "values": [ # Text values of the attribute. The maximum number of elements is 10. The maximum length of an element in the array is 32 characters. The value will be normalized (lower-cased) before being matched. 904 "A String", 905 ], 906 }, 907 ], 908 "createTime": "A String", # The time when the item was created in the source repository. 909 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 910 "interactions": [ # A list of interactions for the item. Interactions are used to improve Search quality, but are not exposed to end users. The maximum number of elements is 1000. 911 { # Represents an interaction between a user and an item. 912 "interactionTime": "A String", # The time when the user acted on the item. If multiple actions of the same type exist for a single user, only the most recent action is recorded. 913 "principal": { # Reference to a user, group, or domain. # The user that acted on the item. 914 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 915 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 916 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 917 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 918 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 919 }, 920 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 921 }, 922 "type": "A String", 923 }, 924 ], 925 "keywords": [ # Additional keywords or phrases that should match the item. Used internally for user generated content. The maximum number of elements is 100. The maximum length is 8192 characters. 926 "A String", 927 ], 928 "mimeType": "A String", # The original mime-type of ItemContent.content in the source repository. The maximum length is 256 characters. 929 "objectType": "A String", # The type of the item. This should correspond to the name of an object definition in the schema registered for the data source. For example, if the schema for the data source contains an object definition with name 'document', then item indexing requests for objects of that type should set objectType to 'document'. The maximum length is 256 characters. 930 "searchQualityMetadata": { # Additional search quality metadata of the item. # Additional search quality metadata of the item 931 "quality": 3.14, # An indication of the quality of the item, used to influence search quality. Value should be between 0.0 (lowest quality) and 1.0 (highest quality). The default value is 0.0. 932 }, 933 "sourceRepositoryUrl": "A String", # Link to the source repository serving the data. Search results apply this link to the title. Whitespace or special characters may cause Cloud Search result links to trigger a redirect notice; to avoid this, encode the URL. The maximum length is 2048 characters. 934 "title": "A String", # The title of the item. If given, this will be the displayed title of the Search result. The maximum length is 2048 characters. 935 "updateTime": "A String", # The time when the item was last modified in the source repository. 936 }, 937 "name": "A String", # Name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters. 938 "payload": "A String", # Additional state connector can store for this item. The maximum length is 10000 bytes. 939 "queue": "A String", # Queue this item belongs to. The maximum length is 100 characters. 940 "status": { # This contains item's status and any errors. # Status of the item. Output only field. 941 "code": "A String", # Status code. 942 "processingErrors": [ # Error details in case the item is in ERROR state. 943 { 944 "code": "A String", # Error code indicating the nature of the error. 945 "errorMessage": "A String", # Description of the error. 946 "fieldViolations": [ # In case the item fields are invalid, this field contains the details about the validation errors. 947 { 948 "description": "A String", # Description of the error. 949 "field": "A String", # Path of field with violation. 950 }, 951 ], 952 }, 953 ], 954 "repositoryErrors": [ # Repository error reported by connector. 955 { # Errors when the connector is communicating to the source repository. 956 "errorMessage": "A String", # Message that describes the error. The maximum allowable length of the message is 8192 characters. 957 "httpStatusCode": 42, # Error codes. Matches the definition of HTTP status codes. 958 "type": "A String", # Type of error. 959 }, 960 ], 961 }, 962 "structuredData": { # Available structured data fields for the item. # The structured data for the item that should conform to a registered object definition in the schema for the data source. 963 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 964 "object": { # A structured data object consisting of named properties. # The structured data object that should conform to a registered object definition in the schema for the data source. 965 "properties": [ # The properties for the object. The maximum number of elements is 1000. 966 { # A typed name-value pair for structured data. The type of the value should be the same as the registered type for the `name` property in the object definition of `objectType`. 967 "booleanValue": True or False, 968 "dateValues": { # List of date values. 969 "values": [ 970 { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. 971 "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. 972 "month": 42, # Month of date. Must be from 1 to 12. 973 "year": 42, # Year of date. Must be from 1 to 9999. 974 }, 975 ], 976 }, 977 "doubleValues": { # List of double values. 978 "values": [ 979 3.14, 980 ], 981 }, 982 "enumValues": { # List of enum values. 983 "values": [ # The maximum allowable length for string values is 32 characters. 984 "A String", 985 ], 986 }, 987 "htmlValues": { # List of html values. 988 "values": [ # The maximum allowable length for html values is 2048 characters. 989 "A String", 990 ], 991 }, 992 "integerValues": { # List of integer values. 993 "values": [ 994 "A String", 995 ], 996 }, 997 "name": "A String", # The name of the property. This name should correspond to the name of the property that was registered for object definition in the schema. The maximum allowable length for this property is 256 characters. 998 "objectValues": { # List of object values. 999 "values": [ 1000 # Object with schema name: StructuredDataObject 1001 ], 1002 }, 1003 "textValues": { # List of text values. 1004 "values": [ # The maximum allowable length for text values is 2048 characters. 1005 "A String", 1006 ], 1007 }, 1008 "timestampValues": { # List of timestamp values. 1009 "values": [ 1010 "A String", 1011 ], 1012 }, 1013 }, 1014 ], 1015 }, 1016 }, 1017 "version": "A String", # Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. See [this guide](https://developers.devsite.corp.google.com/cloud-search/docs/guides/operations) to understand how item version affects reindexing after delete item. 1018 }, 1019 ], 1020}</pre> 1021</div> 1022 1023<div class="method"> 1024 <code class="details" id="push">push(name, body=None, x__xgafv=None)</code> 1025 <pre>Pushes an item onto a queue for later polling and updating. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 1026 1027Args: 1028 name: string, Name of the item to push into the indexing queue. Format: datasources/{source_id}/items/{ID} This is a required field. The maximum length is 1536 characters. (required) 1029 body: object, The request body. 1030 The object takes the form of: 1031 1032{ 1033 "connectorName": "A String", # Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 1034 "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options. 1035 "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 1036 }, 1037 "item": { # Represents an item to be pushed to the indexing queue. # Item to push onto the queue. 1038 "contentHash": "A String", # Content hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the type field results in argument error. The maximum length is 2048 characters. 1039 "metadataHash": "A String", # Metadata hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the type field results in argument error. The maximum length is 2048 characters. 1040 "payload": "A String", # Provides additional document state information for the connector, such as an alternate repository ID and other metadata. The maximum length is 8192 bytes. 1041 "queue": "A String", # Queue to which this item belongs to. The default queue is chosen if this field is not specified. The maximum length is 512 characters. 1042 "repositoryError": { # Errors when the connector is communicating to the source repository. # Populate this field to store Connector or repository error details. This information is displayed in the Admin Console. This field may only be populated when the Type is REPOSITORY_ERROR. 1043 "errorMessage": "A String", # Message that describes the error. The maximum allowable length of the message is 8192 characters. 1044 "httpStatusCode": 42, # Error codes. Matches the definition of HTTP status codes. 1045 "type": "A String", # Type of error. 1046 }, 1047 "structuredDataHash": "A String", # Structured data hash of the item according to the repository. If specified, this is used to determine how to modify this item's status. Setting this field and the type field results in argument error. The maximum length is 2048 characters. 1048 "type": "A String", # The type of the push operation that defines the push behavior. 1049 }, 1050} 1051 1052 x__xgafv: string, V1 error format. 1053 Allowed values 1054 1 - v1 error format 1055 2 - v2 error format 1056 1057Returns: 1058 An object of the form: 1059 1060 { # Represents a single object that is an item in the search index, such as a file, folder, or a database record. 1061 "acl": { # Access control list information for the item. For more information see [Map ACLs](/cloud-search/docs/guides/acls). # Access control list for this item. 1062 "aclInheritanceType": "A String", # Sets the type of access rules to apply when an item inherits its ACL from a parent. This should always be set in tandem with the inheritAclFrom field. Also, when the inheritAclFrom field is set, this field should be set to a valid AclInheritanceType. 1063 "deniedReaders": [ # List of principals who are explicitly denied access to the item in search results. While principals are denied access by default, use denied readers to handle exceptions and override the list allowed readers. The maximum number of elements is 100. 1064 { # Reference to a user, group, or domain. 1065 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 1066 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 1067 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 1068 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 1069 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 1070 }, 1071 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 1072 }, 1073 ], 1074 "inheritAclFrom": "A String", # Name of the item to inherit the Access Permission List (ACL) from. Note: ACL inheritance *only* provides access permissions to child items and does not define structural relationships, nor does it provide convenient ways to delete large groups of items. Deleting an ACL parent from the index only alters the access permissions of child items that reference the parent in the inheritAclFrom field. The item is still in the index, but may not visible in search results. By contrast, deletion of a container item also deletes all items that reference the container via the containerName field. The maximum length for this field is 1536 characters. 1075 "owners": [ # Optional. List of owners for the item. This field has no bearing on document access permissions. It does, however, offer a slight ranking boosts items where the querying user is an owner. The maximum number of elements is 5. 1076 { # Reference to a user, group, or domain. 1077 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 1078 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 1079 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 1080 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 1081 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 1082 }, 1083 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 1084 }, 1085 ], 1086 "readers": [ # List of principals who are allowed to see the item in search results. Optional if inheriting permissions from another item or if the item is not intended to be visible, such as virtual containers. The maximum number of elements is 1000. 1087 { # Reference to a user, group, or domain. 1088 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 1089 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 1090 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 1091 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 1092 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 1093 }, 1094 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 1095 }, 1096 ], 1097 }, 1098 "content": { # Content of an item to be indexed and surfaced by Cloud Search. Only UTF-8 encoded strings are allowed as inlineContent. If the content is uploaded and not binary, it must be UTF-8 encoded. # Item content to be indexed and made text searchable. 1099 "contentDataRef": { # Represents an upload session reference. This reference is created via upload method. Updating of item content may refer to this uploaded content via contentDataRef. # Upload reference ID of a previously uploaded content via write method. 1100 "name": "A String", # Name of the content reference. The maximum length is 2048 characters. 1101 }, 1102 "contentFormat": "A String", 1103 "hash": "A String", # Hashing info calculated and provided by the API client for content. Can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 1104 "inlineContent": "A String", # Content that is supplied inlined within the update method. The maximum length is 102400 bytes (100 KiB). 1105 }, 1106 "itemType": "A String", # Type for this item. 1107 "metadata": { # Available metadata fields for the item. # Metadata information. 1108 "containerName": "A String", # The name of the container for this item. Deletion of the container item leads to automatic deletion of this item. Note: ACLs are not inherited from a container item. To provide ACL inheritance for an item, use the inheritAclFrom field. The maximum length is 1536 characters. 1109 "contentLanguage": "A String", # The BCP-47 language code for the item, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. The maximum length is 32 characters. 1110 "contextAttributes": [ # A set of named attributes associated with the item. This can be used for influencing the ranking of the item based on the context in the request. The maximum number of elements is 10. 1111 { # A named attribute associated with an item which can be used for influencing the ranking of the item based on the context in the request. 1112 "name": "A String", # The name of the attribute. It should not be empty. The maximum length is 32 characters. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The name will be normalized (lower-cased) before being matched. 1113 "values": [ # Text values of the attribute. The maximum number of elements is 10. The maximum length of an element in the array is 32 characters. The value will be normalized (lower-cased) before being matched. 1114 "A String", 1115 ], 1116 }, 1117 ], 1118 "createTime": "A String", # The time when the item was created in the source repository. 1119 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 1120 "interactions": [ # A list of interactions for the item. Interactions are used to improve Search quality, but are not exposed to end users. The maximum number of elements is 1000. 1121 { # Represents an interaction between a user and an item. 1122 "interactionTime": "A String", # The time when the user acted on the item. If multiple actions of the same type exist for a single user, only the most recent action is recorded. 1123 "principal": { # Reference to a user, group, or domain. # The user that acted on the item. 1124 "groupResourceName": "A String", # This principal is a group identified using an external identity. The name field must specify the group resource name with this format: identitysources/{source_id}/groups/{ID} 1125 "gsuitePrincipal": { # This principal is a GSuite user, group or domain. 1126 "gsuiteDomain": True or False, # This principal represents all users of the G Suite domain of the customer. 1127 "gsuiteGroupEmail": "A String", # This principal references a G Suite group account 1128 "gsuiteUserEmail": "A String", # This principal references a G Suite user account 1129 }, 1130 "userResourceName": "A String", # This principal is a user identified using an external identity. The name field must specify the user resource name with this format: identitysources/{source_id}/users/{ID} 1131 }, 1132 "type": "A String", 1133 }, 1134 ], 1135 "keywords": [ # Additional keywords or phrases that should match the item. Used internally for user generated content. The maximum number of elements is 100. The maximum length is 8192 characters. 1136 "A String", 1137 ], 1138 "mimeType": "A String", # The original mime-type of ItemContent.content in the source repository. The maximum length is 256 characters. 1139 "objectType": "A String", # The type of the item. This should correspond to the name of an object definition in the schema registered for the data source. For example, if the schema for the data source contains an object definition with name 'document', then item indexing requests for objects of that type should set objectType to 'document'. The maximum length is 256 characters. 1140 "searchQualityMetadata": { # Additional search quality metadata of the item. # Additional search quality metadata of the item 1141 "quality": 3.14, # An indication of the quality of the item, used to influence search quality. Value should be between 0.0 (lowest quality) and 1.0 (highest quality). The default value is 0.0. 1142 }, 1143 "sourceRepositoryUrl": "A String", # Link to the source repository serving the data. Search results apply this link to the title. Whitespace or special characters may cause Cloud Search result links to trigger a redirect notice; to avoid this, encode the URL. The maximum length is 2048 characters. 1144 "title": "A String", # The title of the item. If given, this will be the displayed title of the Search result. The maximum length is 2048 characters. 1145 "updateTime": "A String", # The time when the item was last modified in the source repository. 1146 }, 1147 "name": "A String", # Name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters. 1148 "payload": "A String", # Additional state connector can store for this item. The maximum length is 10000 bytes. 1149 "queue": "A String", # Queue this item belongs to. The maximum length is 100 characters. 1150 "status": { # This contains item's status and any errors. # Status of the item. Output only field. 1151 "code": "A String", # Status code. 1152 "processingErrors": [ # Error details in case the item is in ERROR state. 1153 { 1154 "code": "A String", # Error code indicating the nature of the error. 1155 "errorMessage": "A String", # Description of the error. 1156 "fieldViolations": [ # In case the item fields are invalid, this field contains the details about the validation errors. 1157 { 1158 "description": "A String", # Description of the error. 1159 "field": "A String", # Path of field with violation. 1160 }, 1161 ], 1162 }, 1163 ], 1164 "repositoryErrors": [ # Repository error reported by connector. 1165 { # Errors when the connector is communicating to the source repository. 1166 "errorMessage": "A String", # Message that describes the error. The maximum allowable length of the message is 8192 characters. 1167 "httpStatusCode": 42, # Error codes. Matches the definition of HTTP status codes. 1168 "type": "A String", # Type of error. 1169 }, 1170 ], 1171 }, 1172 "structuredData": { # Available structured data fields for the item. # The structured data for the item that should conform to a registered object definition in the schema for the data source. 1173 "hash": "A String", # Hashing value provided by the API caller. This can be used with the items.push method to calculate modified state. The maximum length is 2048 characters. 1174 "object": { # A structured data object consisting of named properties. # The structured data object that should conform to a registered object definition in the schema for the data source. 1175 "properties": [ # The properties for the object. The maximum number of elements is 1000. 1176 { # A typed name-value pair for structured data. The type of the value should be the same as the registered type for the `name` property in the object definition of `objectType`. 1177 "booleanValue": True or False, 1178 "dateValues": { # List of date values. 1179 "values": [ 1180 { # Represents a whole calendar date, for example a date of birth. The time of day and time zone are either specified elsewhere or are not significant. The date is relative to the [Proleptic Gregorian Calendar](https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar). The date must be a valid calendar date between the year 1 and 9999. 1181 "day": 42, # Day of month. Must be from 1 to 31 and valid for the year and month. 1182 "month": 42, # Month of date. Must be from 1 to 12. 1183 "year": 42, # Year of date. Must be from 1 to 9999. 1184 }, 1185 ], 1186 }, 1187 "doubleValues": { # List of double values. 1188 "values": [ 1189 3.14, 1190 ], 1191 }, 1192 "enumValues": { # List of enum values. 1193 "values": [ # The maximum allowable length for string values is 32 characters. 1194 "A String", 1195 ], 1196 }, 1197 "htmlValues": { # List of html values. 1198 "values": [ # The maximum allowable length for html values is 2048 characters. 1199 "A String", 1200 ], 1201 }, 1202 "integerValues": { # List of integer values. 1203 "values": [ 1204 "A String", 1205 ], 1206 }, 1207 "name": "A String", # The name of the property. This name should correspond to the name of the property that was registered for object definition in the schema. The maximum allowable length for this property is 256 characters. 1208 "objectValues": { # List of object values. 1209 "values": [ 1210 # Object with schema name: StructuredDataObject 1211 ], 1212 }, 1213 "textValues": { # List of text values. 1214 "values": [ # The maximum allowable length for text values is 2048 characters. 1215 "A String", 1216 ], 1217 }, 1218 "timestampValues": { # List of timestamp values. 1219 "values": [ 1220 "A String", 1221 ], 1222 }, 1223 }, 1224 ], 1225 }, 1226 }, 1227 "version": "A String", # Required. The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. See [this guide](https://developers.devsite.corp.google.com/cloud-search/docs/guides/operations) to understand how item version affects reindexing after delete item. 1228}</pre> 1229</div> 1230 1231<div class="method"> 1232 <code class="details" id="unreserve">unreserve(name, body=None, x__xgafv=None)</code> 1233 <pre>Unreserves all items from a queue, making them all eligible to be polled. This method is useful for resetting the indexing queue after a connector has been restarted. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 1234 1235Args: 1236 name: string, Name of the Data Source to unreserve all items. Format: datasources/{source_id} (required) 1237 body: object, The request body. 1238 The object takes the form of: 1239 1240{ 1241 "connectorName": "A String", # Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 1242 "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options. 1243 "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 1244 }, 1245 "queue": "A String", # Name of a queue to unreserve items from. 1246} 1247 1248 x__xgafv: string, V1 error format. 1249 Allowed values 1250 1 - v1 error format 1251 2 - v2 error format 1252 1253Returns: 1254 An object of the form: 1255 1256 { # This resource represents a long-running operation that is the result of a network API call. 1257 "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. 1258 "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. 1259 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 1260 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 1261 { 1262 "a_key": "", # Properties of the object. Contains field @type with type URL. 1263 }, 1264 ], 1265 "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. 1266 }, 1267 "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. 1268 "a_key": "", # Properties of the object. Contains field @type with type URL. 1269 }, 1270 "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. 1271 "response": { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 1272 "a_key": "", # Properties of the object. Contains field @type with type URL. 1273 }, 1274}</pre> 1275</div> 1276 1277<div class="method"> 1278 <code class="details" id="upload">upload(name, body=None, x__xgafv=None)</code> 1279 <pre>Creates an upload session for uploading item content. For items smaller than 100 KB, it's easier to embed the content inline within an index request. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source. 1280 1281Args: 1282 name: string, Name of the Item to start a resumable upload. Format: datasources/{source_id}/items/{item_id}. The maximum length is 1536 bytes. (required) 1283 body: object, The request body. 1284 The object takes the form of: 1285 1286{ # Start upload file request. 1287 "connectorName": "A String", # Name of connector making this call. Format: datasources/{source_id}/connectors/{ID} 1288 "debugOptions": { # Shared request debug options for all cloudsearch RPC methods. # Common debug options. 1289 "enableDebugging": True or False, # If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field. 1290 }, 1291} 1292 1293 x__xgafv: string, V1 error format. 1294 Allowed values 1295 1 - v1 error format 1296 2 - v2 error format 1297 1298Returns: 1299 An object of the form: 1300 1301 { # Represents an upload session reference. This reference is created via upload method. Updating of item content may refer to this uploaded content via contentDataRef. 1302 "name": "A String", # Name of the content reference. The maximum length is 2048 characters. 1303}</pre> 1304</div> 1305 1306</body></html>