1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package contentwarehouse provides access to the Document AI Warehouse API. 8 // 9 // For product documentation, see: https://cloud.google.com/document-warehouse 10 // 11 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/contentwarehouse/v1" 27 // ... 28 // ctx := context.Background() 29 // contentwarehouseService, err := contentwarehouse.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // To use an API key for authentication (note: some APIs do not support API 38 // keys), use [google.golang.org/api/option.WithAPIKey]: 39 // 40 // contentwarehouseService, err := contentwarehouse.NewService(ctx, option.WithAPIKey("AIza...")) 41 // 42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 43 // flow, use [google.golang.org/api/option.WithTokenSource]: 44 // 45 // config := &oauth2.Config{...} 46 // // ... 47 // token, err := config.Exchange(ctx, ...) 48 // contentwarehouseService, err := contentwarehouse.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package contentwarehouse // import "google.golang.org/api/contentwarehouse/v1" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "contentwarehouse:v1" 90 const apiName = "contentwarehouse" 91 const apiVersion = "v1" 92 const basePath = "https://contentwarehouse.googleapis.com/" 93 const basePathTemplate = "https://contentwarehouse.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://contentwarehouse.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Projects = NewProjectsService(s) 139 return s, nil 140 } 141 142 type Service struct { 143 client *http.Client 144 BasePath string // API endpoint base URL 145 UserAgent string // optional additional User-Agent fragment 146 147 Projects *ProjectsService 148 } 149 150 func (s *Service) userAgent() string { 151 if s.UserAgent == "" { 152 return googleapi.UserAgent 153 } 154 return googleapi.UserAgent + " " + s.UserAgent 155 } 156 157 func NewProjectsService(s *Service) *ProjectsService { 158 rs := &ProjectsService{s: s} 159 rs.Locations = NewProjectsLocationsService(s) 160 return rs 161 } 162 163 type ProjectsService struct { 164 s *Service 165 166 Locations *ProjectsLocationsService 167 } 168 169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 170 rs := &ProjectsLocationsService{s: s} 171 rs.DocumentSchemas = NewProjectsLocationsDocumentSchemasService(s) 172 rs.Documents = NewProjectsLocationsDocumentsService(s) 173 rs.Operations = NewProjectsLocationsOperationsService(s) 174 rs.RuleSets = NewProjectsLocationsRuleSetsService(s) 175 rs.SynonymSets = NewProjectsLocationsSynonymSetsService(s) 176 return rs 177 } 178 179 type ProjectsLocationsService struct { 180 s *Service 181 182 DocumentSchemas *ProjectsLocationsDocumentSchemasService 183 184 Documents *ProjectsLocationsDocumentsService 185 186 Operations *ProjectsLocationsOperationsService 187 188 RuleSets *ProjectsLocationsRuleSetsService 189 190 SynonymSets *ProjectsLocationsSynonymSetsService 191 } 192 193 func NewProjectsLocationsDocumentSchemasService(s *Service) *ProjectsLocationsDocumentSchemasService { 194 rs := &ProjectsLocationsDocumentSchemasService{s: s} 195 return rs 196 } 197 198 type ProjectsLocationsDocumentSchemasService struct { 199 s *Service 200 } 201 202 func NewProjectsLocationsDocumentsService(s *Service) *ProjectsLocationsDocumentsService { 203 rs := &ProjectsLocationsDocumentsService{s: s} 204 rs.DocumentLinks = NewProjectsLocationsDocumentsDocumentLinksService(s) 205 rs.ReferenceId = NewProjectsLocationsDocumentsReferenceIdService(s) 206 return rs 207 } 208 209 type ProjectsLocationsDocumentsService struct { 210 s *Service 211 212 DocumentLinks *ProjectsLocationsDocumentsDocumentLinksService 213 214 ReferenceId *ProjectsLocationsDocumentsReferenceIdService 215 } 216 217 func NewProjectsLocationsDocumentsDocumentLinksService(s *Service) *ProjectsLocationsDocumentsDocumentLinksService { 218 rs := &ProjectsLocationsDocumentsDocumentLinksService{s: s} 219 return rs 220 } 221 222 type ProjectsLocationsDocumentsDocumentLinksService struct { 223 s *Service 224 } 225 226 func NewProjectsLocationsDocumentsReferenceIdService(s *Service) *ProjectsLocationsDocumentsReferenceIdService { 227 rs := &ProjectsLocationsDocumentsReferenceIdService{s: s} 228 return rs 229 } 230 231 type ProjectsLocationsDocumentsReferenceIdService struct { 232 s *Service 233 } 234 235 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 236 rs := &ProjectsLocationsOperationsService{s: s} 237 return rs 238 } 239 240 type ProjectsLocationsOperationsService struct { 241 s *Service 242 } 243 244 func NewProjectsLocationsRuleSetsService(s *Service) *ProjectsLocationsRuleSetsService { 245 rs := &ProjectsLocationsRuleSetsService{s: s} 246 return rs 247 } 248 249 type ProjectsLocationsRuleSetsService struct { 250 s *Service 251 } 252 253 func NewProjectsLocationsSynonymSetsService(s *Service) *ProjectsLocationsSynonymSetsService { 254 rs := &ProjectsLocationsSynonymSetsService{s: s} 255 return rs 256 } 257 258 type ProjectsLocationsSynonymSetsService struct { 259 s *Service 260 } 261 262 // CloudAiPlatformTenantresourceCloudSqlInstanceConfig: The identity to 263 // configure a CloudSQL instance provisioned via SLM Terraform. 264 type CloudAiPlatformTenantresourceCloudSqlInstanceConfig struct { 265 // CloudSqlInstanceConnectionName: Output only. The CloudSQL instance 266 // connection name. 267 CloudSqlInstanceConnectionName string `json:"cloudSqlInstanceConnectionName,omitempty"` 268 // CloudSqlInstanceName: Input/Output [Optional]. The CloudSQL instance name 269 // within SLM instance. If not set, a random UUIC will be generated as instance 270 // name. 271 CloudSqlInstanceName string `json:"cloudSqlInstanceName,omitempty"` 272 // KmsKeyReference: Input [Optional]. The KMS key name or the KMS grant name 273 // used for CMEK encryption. Only set this field when provisioning new CloudSQL 274 // instances. For existing CloudSQL instances, this field will be ignored 275 // because CMEK re-encryption is not supported. 276 KmsKeyReference string `json:"kmsKeyReference,omitempty"` 277 // MdbRolesForCorpAccess: Input [Optional]. MDB roles for corp access to 278 // CloudSQL instance. 279 MdbRolesForCorpAccess []string `json:"mdbRolesForCorpAccess,omitempty"` 280 // SlmInstanceName: Output only. The SLM instance's full resource name. 281 SlmInstanceName string `json:"slmInstanceName,omitempty"` 282 // SlmInstanceTemplate: Input [Required]. The SLM instance template to 283 // provision CloudSQL. 284 SlmInstanceTemplate string `json:"slmInstanceTemplate,omitempty"` 285 // SlmInstanceType: Input [Required]. The SLM instance type to provision 286 // CloudSQL. 287 SlmInstanceType string `json:"slmInstanceType,omitempty"` 288 // ForceSendFields is a list of field names (e.g. 289 // "CloudSqlInstanceConnectionName") to unconditionally include in API 290 // requests. By default, fields with empty or default values are omitted from 291 // API requests. See 292 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 293 // details. 294 ForceSendFields []string `json:"-"` 295 // NullFields is a list of field names (e.g. "CloudSqlInstanceConnectionName") 296 // to include in API requests with the JSON null value. By default, fields with 297 // empty values are omitted from API requests. See 298 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 299 NullFields []string `json:"-"` 300 } 301 302 func (s *CloudAiPlatformTenantresourceCloudSqlInstanceConfig) MarshalJSON() ([]byte, error) { 303 type NoMethod CloudAiPlatformTenantresourceCloudSqlInstanceConfig 304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 305 } 306 307 // CloudAiPlatformTenantresourceGcsBucketConfig: The identity to configure a 308 // GCS bucket. 309 type CloudAiPlatformTenantresourceGcsBucketConfig struct { 310 Admins []string `json:"admins,omitempty"` 311 // BucketName: Input/Output [Optional]. The name of a GCS bucket with max 312 // length of 63 chars. If not set, a random UUID will be generated as bucket 313 // name. 314 BucketName string `json:"bucketName,omitempty"` 315 // EntityName: Input/Output [Optional]. Only needed for per-entity tenant GCP 316 // resources. During Deprovision API, the on-demand deletion will only cover 317 // the tenant GCP resources with the specified entity name. 318 EntityName string `json:"entityName,omitempty"` 319 // KmsKeyReference: Input/Output [Optional]. The KMS key name or the KMS grant 320 // name used for CMEK encryption. Only set this field when provisioning new GCS 321 // bucket. For existing GCS bucket, this field will be ignored because CMEK 322 // re-encryption is not supported. 323 KmsKeyReference string `json:"kmsKeyReference,omitempty"` 324 // TtlDays: Input/Output [Optional]. Only needed when the content in bucket 325 // need to be garbage collected within some amount of days. 326 TtlDays int64 `json:"ttlDays,omitempty"` 327 // Viewers: Input/Output [Required]. IAM roles (viewer/admin) put on the 328 // bucket. 329 Viewers []string `json:"viewers,omitempty"` 330 // ForceSendFields is a list of field names (e.g. "Admins") to unconditionally 331 // include in API requests. By default, fields with empty or default values are 332 // omitted from API requests. See 333 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 334 // details. 335 ForceSendFields []string `json:"-"` 336 // NullFields is a list of field names (e.g. "Admins") to include in API 337 // requests with the JSON null value. By default, fields with empty values are 338 // omitted from API requests. See 339 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 340 NullFields []string `json:"-"` 341 } 342 343 func (s *CloudAiPlatformTenantresourceGcsBucketConfig) MarshalJSON() ([]byte, error) { 344 type NoMethod CloudAiPlatformTenantresourceGcsBucketConfig 345 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 346 } 347 348 // CloudAiPlatformTenantresourceIamPolicyBinding: The dynamic IAM bindings to 349 // be granted after tenant projects are created. 350 type CloudAiPlatformTenantresourceIamPolicyBinding struct { 351 // Members: Input/Output [Required]. The member service accounts with the roles 352 // above. Note: placeholders are same as the resource above. 353 Members []string `json:"members,omitempty"` 354 // Resource: Input/Output [Required]. The resource name that will be accessed 355 // by members, which also depends on resource_type. Note: placeholders are 356 // supported in resource names. For example, ${tpn} will be used when the 357 // tenant project number is not ready. 358 Resource string `json:"resource,omitempty"` 359 // ResourceType: Input/Output [Required]. Specifies the type of resource that 360 // will be accessed by members. 361 // 362 // Possible values: 363 // "RESOURCE_TYPE_UNSPECIFIED" 364 // "PROJECT" - The value of resource field is the ID or number of a project. 365 // Format is 366 // "SERVICE_ACCOUNT" - The value of resource field is the resource name of a 367 // service account. Format is projects//serviceAccounts/ 368 // "GCS_BUCKET" - The value of resource field is the name of a GCS bucket 369 // (not its resource name). Format is . 370 // "SERVICE_CONSUMER" - The value of resource field is the resource name of a 371 // service consumer. Format is services//consumers/ 372 // "AR_REPO" - The value of the resource field is the AR Image Uri which 373 // identifies an AR REPO. Allowed formats are: /// ///: ///@ 374 ResourceType string `json:"resourceType,omitempty"` 375 // Role: Input/Output [Required]. The role for members below. 376 Role string `json:"role,omitempty"` 377 // ForceSendFields is a list of field names (e.g. "Members") to unconditionally 378 // include in API requests. By default, fields with empty or default values are 379 // omitted from API requests. See 380 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 381 // details. 382 ForceSendFields []string `json:"-"` 383 // NullFields is a list of field names (e.g. "Members") to include in API 384 // requests with the JSON null value. By default, fields with empty values are 385 // omitted from API requests. See 386 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 387 NullFields []string `json:"-"` 388 } 389 390 func (s *CloudAiPlatformTenantresourceIamPolicyBinding) MarshalJSON() ([]byte, error) { 391 type NoMethod CloudAiPlatformTenantresourceIamPolicyBinding 392 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 393 } 394 395 // CloudAiPlatformTenantresourceInfraSpannerConfig: The configuration for a 396 // spanner database provisioning. Next ID: 8 397 type CloudAiPlatformTenantresourceInfraSpannerConfig struct { 398 // CreateDatabaseOptions: Input [Optional]. The options to create a spanner 399 // database. Note: give the right options to ensure the right KMS key access 400 // audit logging and AxT logging in expected logging category. 401 CreateDatabaseOptions *CloudAiPlatformTenantresourceInfraSpannerConfigCreateDatabaseOptions `json:"createDatabaseOptions,omitempty"` 402 // KmsKeyReference: Input [Optional]. The KMS key name or the KMS grant name 403 // used for CMEK encryption. Only set this field when provisioning new Infra 404 // Spanner databases. For existing Infra Spanner databases, this field will be 405 // ignored because CMEK re-encryption is not supported. For example, 406 // projects//locations//keyRings//cryptoKeys/ 407 KmsKeyReference string `json:"kmsKeyReference,omitempty"` 408 // SdlBundlePath: Input [Required]. The file path to the spanner SDL bundle. 409 SdlBundlePath string `json:"sdlBundlePath,omitempty"` 410 // SpannerBorgServiceAccount: Input [Optional]. The spanner borg service 411 // account for delegating the kms key to. For example, 412 // spanner-infra-cmek-nonprod@system.gserviceaccount.com, for the nonprod 413 // universe. 414 SpannerBorgServiceAccount string `json:"spannerBorgServiceAccount,omitempty"` 415 SpannerLocalNamePrefix string `json:"spannerLocalNamePrefix,omitempty"` 416 SpannerNamespace string `json:"spannerNamespace,omitempty"` 417 // SpannerUniverse: Input [Required]. Every database in Spanner can be 418 // identified by the following path name: /span//: 419 SpannerUniverse string `json:"spannerUniverse,omitempty"` 420 // ForceSendFields is a list of field names (e.g. "CreateDatabaseOptions") to 421 // unconditionally include in API requests. By default, fields with empty or 422 // default values are omitted from API requests. See 423 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 424 // details. 425 ForceSendFields []string `json:"-"` 426 // NullFields is a list of field names (e.g. "CreateDatabaseOptions") to 427 // include in API requests with the JSON null value. By default, fields with 428 // empty values are omitted from API requests. See 429 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 430 NullFields []string `json:"-"` 431 } 432 433 func (s *CloudAiPlatformTenantresourceInfraSpannerConfig) MarshalJSON() ([]byte, error) { 434 type NoMethod CloudAiPlatformTenantresourceInfraSpannerConfig 435 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 436 } 437 438 // CloudAiPlatformTenantresourceInfraSpannerConfigCreateDatabaseOptions: The 439 // options to create a spanner database. KMS key access audit logging and AxT 440 // logging will be associated with the given resource name, resource type and 441 // service name. Please ensure to give right options to enable correct audit 442 // logging and AxT logging. 443 type CloudAiPlatformTenantresourceInfraSpannerConfigCreateDatabaseOptions struct { 444 // CmekCloudResourceName: The cloud resource name for the CMEK encryption. For 445 // example, projects//locations/ 446 CmekCloudResourceName string `json:"cmekCloudResourceName,omitempty"` 447 // CmekCloudResourceType: The cloud resource type for the CMEK encryption. For 448 // example, contentwarehouse.googleapis.com/Location 449 CmekCloudResourceType string `json:"cmekCloudResourceType,omitempty"` 450 // CmekServiceName: The service name for the CMEK encryption. For example, 451 // contentwarehouse.googleapis.com 452 CmekServiceName string `json:"cmekServiceName,omitempty"` 453 // ForceSendFields is a list of field names (e.g. "CmekCloudResourceName") to 454 // unconditionally include in API requests. By default, fields with empty or 455 // default values are omitted from API requests. See 456 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 457 // details. 458 ForceSendFields []string `json:"-"` 459 // NullFields is a list of field names (e.g. "CmekCloudResourceName") to 460 // include in API requests with the JSON null value. By default, fields with 461 // empty values are omitted from API requests. See 462 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 463 NullFields []string `json:"-"` 464 } 465 466 func (s *CloudAiPlatformTenantresourceInfraSpannerConfigCreateDatabaseOptions) MarshalJSON() ([]byte, error) { 467 type NoMethod CloudAiPlatformTenantresourceInfraSpannerConfigCreateDatabaseOptions 468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 469 } 470 471 // CloudAiPlatformTenantresourceServiceAccountIdentity: The identity to 472 // configure a service account. 473 type CloudAiPlatformTenantresourceServiceAccountIdentity struct { 474 // ServiceAccountEmail: Output only. The service account email that has been 475 // created. 476 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 477 // Tag: Input/Output [Optional]. The tag that configures the service account, 478 // as defined in 479 // google3/configs/production/cdpush/acl-zanzibar-cloud-prod/activation_grants/a 480 // ctivation_grants.gcl. Note: The default P4 service account has the empty 481 // tag. 482 Tag string `json:"tag,omitempty"` 483 // ForceSendFields is a list of field names (e.g. "ServiceAccountEmail") to 484 // unconditionally include in API requests. By default, fields with empty or 485 // default values are omitted from API requests. See 486 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 487 // details. 488 ForceSendFields []string `json:"-"` 489 // NullFields is a list of field names (e.g. "ServiceAccountEmail") to include 490 // in API requests with the JSON null value. By default, fields with empty 491 // values are omitted from API requests. See 492 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 493 NullFields []string `json:"-"` 494 } 495 496 func (s *CloudAiPlatformTenantresourceServiceAccountIdentity) MarshalJSON() ([]byte, error) { 497 type NoMethod CloudAiPlatformTenantresourceServiceAccountIdentity 498 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 499 } 500 501 // CloudAiPlatformTenantresourceTenantProjectConfig: The identity to configure 502 // a tenant project. 503 type CloudAiPlatformTenantresourceTenantProjectConfig struct { 504 // BillingConfig: Input/Output [Required]. The billing account properties to 505 // create the tenant project. 506 BillingConfig *GoogleApiServiceconsumermanagementV1BillingConfig `json:"billingConfig,omitempty"` 507 // Folder: Input/Output [Required]. The folder that holds tenant projects and 508 // folder-level permissions will be automatically granted to all tenant 509 // projects under the folder. Note: the valid folder format is 510 // `folders/{folder_number}`. 511 Folder string `json:"folder,omitempty"` 512 // PolicyBindings: Input/Output [Required]. The policy bindings that are 513 // applied to the tenant project during creation. At least one binding must 514 // have the role `roles/owner` with either `user` or `group` type. 515 PolicyBindings []*GoogleApiServiceconsumermanagementV1PolicyBinding `json:"policyBindings,omitempty"` 516 // Services: Input/Output [Required]. The API services that are enabled on the 517 // tenant project during creation. 518 Services []string `json:"services,omitempty"` 519 // ForceSendFields is a list of field names (e.g. "BillingConfig") to 520 // unconditionally include in API requests. By default, fields with empty or 521 // default values are omitted from API requests. See 522 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 523 // details. 524 ForceSendFields []string `json:"-"` 525 // NullFields is a list of field names (e.g. "BillingConfig") to include in API 526 // requests with the JSON null value. By default, fields with empty values are 527 // omitted from API requests. See 528 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 529 NullFields []string `json:"-"` 530 } 531 532 func (s *CloudAiPlatformTenantresourceTenantProjectConfig) MarshalJSON() ([]byte, error) { 533 type NoMethod CloudAiPlatformTenantresourceTenantProjectConfig 534 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 535 } 536 537 // CloudAiPlatformTenantresourceTenantProjectResource: The tenant project and 538 // tenant resources. Next ID: 10 539 type CloudAiPlatformTenantresourceTenantProjectResource struct { 540 // CloudSqlInstances: The CloudSQL instances that are provisioned under the 541 // tenant project. 542 CloudSqlInstances []*CloudAiPlatformTenantresourceCloudSqlInstanceConfig `json:"cloudSqlInstances,omitempty"` 543 // GcsBuckets: The GCS buckets that are provisioned under the tenant project. 544 GcsBuckets []*CloudAiPlatformTenantresourceGcsBucketConfig `json:"gcsBuckets,omitempty"` 545 // IamPolicyBindings: The dynamic IAM bindings that are granted under the 546 // tenant project. Note: this should only add new bindings to the project if 547 // they don't exist and the existing bindings won't be affected. 548 IamPolicyBindings []*CloudAiPlatformTenantresourceIamPolicyBinding `json:"iamPolicyBindings,omitempty"` 549 // InfraSpannerConfigs: The Infra Spanner databases that are provisioned under 550 // the tenant project. Note: this is an experimental feature. 551 InfraSpannerConfigs []*CloudAiPlatformTenantresourceInfraSpannerConfig `json:"infraSpannerConfigs,omitempty"` 552 // Tag: Input/Output [Required]. The tag that uniquely identifies a tenant 553 // project within a tenancy unit. Note: for the same tenant project tag, all 554 // tenant manager operations should be idempotent. 555 Tag string `json:"tag,omitempty"` 556 // TenantProjectConfig: The configurations of a tenant project. 557 TenantProjectConfig *CloudAiPlatformTenantresourceTenantProjectConfig `json:"tenantProjectConfig,omitempty"` 558 // TenantProjectId: Output only. The tenant project ID that has been created. 559 TenantProjectId string `json:"tenantProjectId,omitempty"` 560 // TenantProjectNumber: Output only. The tenant project number that has been 561 // created. 562 TenantProjectNumber int64 `json:"tenantProjectNumber,omitempty,string"` 563 // TenantServiceAccounts: The service account identities (or enabled API 564 // service's P4SA) that are expclicitly created under the tenant project 565 // (before JIT provisioning during enabled API services). 566 TenantServiceAccounts []*CloudAiPlatformTenantresourceTenantServiceAccountIdentity `json:"tenantServiceAccounts,omitempty"` 567 // ForceSendFields is a list of field names (e.g. "CloudSqlInstances") to 568 // unconditionally include in API requests. By default, fields with empty or 569 // default values are omitted from API requests. See 570 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 571 // details. 572 ForceSendFields []string `json:"-"` 573 // NullFields is a list of field names (e.g. "CloudSqlInstances") to include in 574 // API requests with the JSON null value. By default, fields with empty values 575 // are omitted from API requests. See 576 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 577 NullFields []string `json:"-"` 578 } 579 580 func (s *CloudAiPlatformTenantresourceTenantProjectResource) MarshalJSON() ([]byte, error) { 581 type NoMethod CloudAiPlatformTenantresourceTenantProjectResource 582 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 583 } 584 585 // CloudAiPlatformTenantresourceTenantResource: A collection of tenant 586 // resources. 587 type CloudAiPlatformTenantresourceTenantResource struct { 588 // P4ServiceAccounts: A list of P4 service accounts (go/p4sa) to provision or 589 // deprovision. 590 P4ServiceAccounts []*CloudAiPlatformTenantresourceServiceAccountIdentity `json:"p4ServiceAccounts,omitempty"` 591 // TenantProjectResources: A list of tenant projects and tenant resources to 592 // provision or deprovision. 593 TenantProjectResources []*CloudAiPlatformTenantresourceTenantProjectResource `json:"tenantProjectResources,omitempty"` 594 // ForceSendFields is a list of field names (e.g. "P4ServiceAccounts") to 595 // unconditionally include in API requests. By default, fields with empty or 596 // default values are omitted from API requests. See 597 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 598 // details. 599 ForceSendFields []string `json:"-"` 600 // NullFields is a list of field names (e.g. "P4ServiceAccounts") to include in 601 // API requests with the JSON null value. By default, fields with empty values 602 // are omitted from API requests. See 603 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 604 NullFields []string `json:"-"` 605 } 606 607 func (s *CloudAiPlatformTenantresourceTenantResource) MarshalJSON() ([]byte, error) { 608 type NoMethod CloudAiPlatformTenantresourceTenantResource 609 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 610 } 611 612 // CloudAiPlatformTenantresourceTenantServiceAccountIdentity: The identity of 613 // service accounts that have been explicitly created under tenant projects. 614 type CloudAiPlatformTenantresourceTenantServiceAccountIdentity struct { 615 // ServiceAccountEmail: Output only. The email address of the generated service 616 // account. 617 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 618 // ServiceName: Input/Output [Required]. The service that the service account 619 // belongs to. (e.g. cloudbuild.googleapis.com for GCB service accounts) 620 ServiceName string `json:"serviceName,omitempty"` 621 // ForceSendFields is a list of field names (e.g. "ServiceAccountEmail") to 622 // unconditionally include in API requests. By default, fields with empty or 623 // default values are omitted from API requests. See 624 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 625 // details. 626 ForceSendFields []string `json:"-"` 627 // NullFields is a list of field names (e.g. "ServiceAccountEmail") to include 628 // in API requests with the JSON null value. By default, fields with empty 629 // values are omitted from API requests. See 630 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 631 NullFields []string `json:"-"` 632 } 633 634 func (s *CloudAiPlatformTenantresourceTenantServiceAccountIdentity) MarshalJSON() ([]byte, error) { 635 type NoMethod CloudAiPlatformTenantresourceTenantServiceAccountIdentity 636 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 637 } 638 639 // GoogleApiServiceconsumermanagementV1BillingConfig: Describes the billing 640 // configuration for a new tenant project. 641 type GoogleApiServiceconsumermanagementV1BillingConfig struct { 642 // BillingAccount: Name of the billing account. For example 643 // `billingAccounts/012345-567890-ABCDEF`. 644 BillingAccount string `json:"billingAccount,omitempty"` 645 // ForceSendFields is a list of field names (e.g. "BillingAccount") to 646 // unconditionally include in API requests. By default, fields with empty or 647 // default values are omitted from API requests. See 648 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 649 // details. 650 ForceSendFields []string `json:"-"` 651 // NullFields is a list of field names (e.g. "BillingAccount") to include in 652 // API requests with the JSON null value. By default, fields with empty values 653 // are omitted from API requests. See 654 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 655 NullFields []string `json:"-"` 656 } 657 658 func (s *GoogleApiServiceconsumermanagementV1BillingConfig) MarshalJSON() ([]byte, error) { 659 type NoMethod GoogleApiServiceconsumermanagementV1BillingConfig 660 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 661 } 662 663 // GoogleApiServiceconsumermanagementV1PolicyBinding: Translates to IAM Policy 664 // bindings (without auditing at this level) 665 type GoogleApiServiceconsumermanagementV1PolicyBinding struct { 666 // Members: Uses the same format as in IAM policy. `member` must include both a 667 // prefix and ID. For example, `user:{emailId}`, `serviceAccount:{emailId}`, 668 // `group:{emailId}`. 669 Members []string `json:"members,omitempty"` 670 // Role: Role. (https://cloud.google.com/iam/docs/understanding-roles) For 671 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. 672 Role string `json:"role,omitempty"` 673 // ForceSendFields is a list of field names (e.g. "Members") to unconditionally 674 // include in API requests. By default, fields with empty or default values are 675 // omitted from API requests. See 676 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 677 // details. 678 ForceSendFields []string `json:"-"` 679 // NullFields is a list of field names (e.g. "Members") to include in API 680 // requests with the JSON null value. By default, fields with empty values are 681 // omitted from API requests. See 682 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 683 NullFields []string `json:"-"` 684 } 685 686 func (s *GoogleApiServiceconsumermanagementV1PolicyBinding) MarshalJSON() ([]byte, error) { 687 type NoMethod GoogleApiServiceconsumermanagementV1PolicyBinding 688 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 689 } 690 691 // GoogleCloudContentwarehouseV1AccessControlAction: Represents the action 692 // responsible for access control list management operations. 693 type GoogleCloudContentwarehouseV1AccessControlAction struct { 694 // OperationType: Identifies the type of operation. 695 // 696 // Possible values: 697 // "UNKNOWN" - The unknown operation type. 698 // "ADD_POLICY_BINDING" - Adds newly given policy bindings in the existing 699 // bindings list. 700 // "REMOVE_POLICY_BINDING" - Removes newly given policy bindings from the 701 // existing bindings list. 702 // "REPLACE_POLICY_BINDING" - Replaces existing policy bindings with the 703 // given policy binding list 704 OperationType string `json:"operationType,omitempty"` 705 // Policy: Represents the new policy from which bindings are added, removed or 706 // replaced based on the type of the operation. the policy is limited to a few 707 // 10s of KB. 708 Policy *GoogleIamV1Policy `json:"policy,omitempty"` 709 // ForceSendFields is a list of field names (e.g. "OperationType") to 710 // unconditionally include in API requests. By default, fields with empty or 711 // default values are omitted from API requests. See 712 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 713 // details. 714 ForceSendFields []string `json:"-"` 715 // NullFields is a list of field names (e.g. "OperationType") to include in API 716 // requests with the JSON null value. By default, fields with empty values are 717 // omitted from API requests. See 718 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 719 NullFields []string `json:"-"` 720 } 721 722 func (s *GoogleCloudContentwarehouseV1AccessControlAction) MarshalJSON() ([]byte, error) { 723 type NoMethod GoogleCloudContentwarehouseV1AccessControlAction 724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 725 } 726 727 // GoogleCloudContentwarehouseV1Action: Represents the action triggered by Rule 728 // Engine when the rule is true. 729 type GoogleCloudContentwarehouseV1Action struct { 730 // AccessControl: Action triggering access control operations. 731 AccessControl *GoogleCloudContentwarehouseV1AccessControlAction `json:"accessControl,omitempty"` 732 // ActionId: ID of the action. Managed internally. 733 ActionId string `json:"actionId,omitempty"` 734 // AddToFolder: Action triggering create document link operation. 735 AddToFolder *GoogleCloudContentwarehouseV1AddToFolderAction `json:"addToFolder,omitempty"` 736 // DataUpdate: Action triggering data update operations. 737 DataUpdate *GoogleCloudContentwarehouseV1DataUpdateAction `json:"dataUpdate,omitempty"` 738 // DataValidation: Action triggering data validation operations. 739 DataValidation *GoogleCloudContentwarehouseV1DataValidationAction `json:"dataValidation,omitempty"` 740 // DeleteDocumentAction: Action deleting the document. 741 DeleteDocumentAction *GoogleCloudContentwarehouseV1DeleteDocumentAction `json:"deleteDocumentAction,omitempty"` 742 // PublishToPubSub: Action publish to Pub/Sub operation. 743 PublishToPubSub *GoogleCloudContentwarehouseV1PublishAction `json:"publishToPubSub,omitempty"` 744 // RemoveFromFolderAction: Action removing a document from a folder. 745 RemoveFromFolderAction *GoogleCloudContentwarehouseV1RemoveFromFolderAction `json:"removeFromFolderAction,omitempty"` 746 // ForceSendFields is a list of field names (e.g. "AccessControl") to 747 // unconditionally include in API requests. By default, fields with empty or 748 // default values are omitted from API requests. See 749 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 750 // details. 751 ForceSendFields []string `json:"-"` 752 // NullFields is a list of field names (e.g. "AccessControl") to include in API 753 // requests with the JSON null value. By default, fields with empty values are 754 // omitted from API requests. See 755 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 756 NullFields []string `json:"-"` 757 } 758 759 func (s *GoogleCloudContentwarehouseV1Action) MarshalJSON() ([]byte, error) { 760 type NoMethod GoogleCloudContentwarehouseV1Action 761 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 762 } 763 764 // GoogleCloudContentwarehouseV1ActionExecutorOutput: Represents the output of 765 // the Action Executor. 766 type GoogleCloudContentwarehouseV1ActionExecutorOutput struct { 767 // RuleActionsPairs: List of rule and corresponding actions result. 768 RuleActionsPairs []*GoogleCloudContentwarehouseV1RuleActionsPair `json:"ruleActionsPairs,omitempty"` 769 // ForceSendFields is a list of field names (e.g. "RuleActionsPairs") to 770 // unconditionally include in API requests. By default, fields with empty or 771 // default values are omitted from API requests. See 772 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 773 // details. 774 ForceSendFields []string `json:"-"` 775 // NullFields is a list of field names (e.g. "RuleActionsPairs") to include in 776 // API requests with the JSON null value. By default, fields with empty values 777 // are omitted from API requests. See 778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 779 NullFields []string `json:"-"` 780 } 781 782 func (s *GoogleCloudContentwarehouseV1ActionExecutorOutput) MarshalJSON() ([]byte, error) { 783 type NoMethod GoogleCloudContentwarehouseV1ActionExecutorOutput 784 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 785 } 786 787 // GoogleCloudContentwarehouseV1ActionOutput: Represents the result of 788 // executing an action. 789 type GoogleCloudContentwarehouseV1ActionOutput struct { 790 // ActionId: ID of the action. 791 ActionId string `json:"actionId,omitempty"` 792 // ActionState: State of an action. 793 // 794 // Possible values: 795 // "UNKNOWN" - The unknown state. 796 // "ACTION_SUCCEEDED" - State indicating action executed successfully. 797 // "ACTION_FAILED" - State indicating action failed. 798 // "ACTION_TIMED_OUT" - State indicating action timed out. 799 // "ACTION_PENDING" - State indicating action is pending. 800 ActionState string `json:"actionState,omitempty"` 801 // OutputMessage: Action execution output message. 802 OutputMessage string `json:"outputMessage,omitempty"` 803 // ForceSendFields is a list of field names (e.g. "ActionId") to 804 // unconditionally include in API requests. By default, fields with empty or 805 // default values are omitted from API requests. See 806 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 807 // details. 808 ForceSendFields []string `json:"-"` 809 // NullFields is a list of field names (e.g. "ActionId") to include in API 810 // requests with the JSON null value. By default, fields with empty values are 811 // omitted from API requests. See 812 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 813 NullFields []string `json:"-"` 814 } 815 816 func (s *GoogleCloudContentwarehouseV1ActionOutput) MarshalJSON() ([]byte, error) { 817 type NoMethod GoogleCloudContentwarehouseV1ActionOutput 818 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 819 } 820 821 // GoogleCloudContentwarehouseV1AddToFolderAction: Represents the action 822 // responsible for adding document under a folder. 823 type GoogleCloudContentwarehouseV1AddToFolderAction struct { 824 // Folders: Names of the folder under which new document is to be added. 825 // Format: 826 // projects/{project_number}/locations/{location}/documents/{document_id}. 827 Folders []string `json:"folders,omitempty"` 828 // ForceSendFields is a list of field names (e.g. "Folders") to unconditionally 829 // include in API requests. By default, fields with empty or default values are 830 // omitted from API requests. See 831 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 832 // details. 833 ForceSendFields []string `json:"-"` 834 // NullFields is a list of field names (e.g. "Folders") to include in API 835 // requests with the JSON null value. By default, fields with empty values are 836 // omitted from API requests. See 837 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 838 NullFields []string `json:"-"` 839 } 840 841 func (s *GoogleCloudContentwarehouseV1AddToFolderAction) MarshalJSON() ([]byte, error) { 842 type NoMethod GoogleCloudContentwarehouseV1AddToFolderAction 843 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 844 } 845 846 // GoogleCloudContentwarehouseV1CloudAIDocumentOption: Request Option for 847 // processing Cloud AI Document in CW Document. 848 type GoogleCloudContentwarehouseV1CloudAIDocumentOption struct { 849 // CustomizedEntitiesPropertiesConversions: If set, only selected entities will 850 // be converted to properties. 851 CustomizedEntitiesPropertiesConversions map[string]string `json:"customizedEntitiesPropertiesConversions,omitempty"` 852 // EnableEntitiesConversions: Whether to convert all the entities to 853 // properties. 854 EnableEntitiesConversions bool `json:"enableEntitiesConversions,omitempty"` 855 // ForceSendFields is a list of field names (e.g. 856 // "CustomizedEntitiesPropertiesConversions") to unconditionally include in API 857 // requests. By default, fields with empty or default values are omitted from 858 // API requests. See 859 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 860 // details. 861 ForceSendFields []string `json:"-"` 862 // NullFields is a list of field names (e.g. 863 // "CustomizedEntitiesPropertiesConversions") to include in API requests with 864 // the JSON null value. By default, fields with empty values are omitted from 865 // API requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields 866 // for more details. 867 NullFields []string `json:"-"` 868 } 869 870 func (s *GoogleCloudContentwarehouseV1CloudAIDocumentOption) MarshalJSON() ([]byte, error) { 871 type NoMethod GoogleCloudContentwarehouseV1CloudAIDocumentOption 872 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 873 } 874 875 // GoogleCloudContentwarehouseV1CreateDocumentLinkRequest: Request message for 876 // DocumentLinkService.CreateDocumentLink. 877 type GoogleCloudContentwarehouseV1CreateDocumentLinkRequest struct { 878 // DocumentLink: Required. Document links associated with the source documents 879 // (source_document_id). 880 DocumentLink *GoogleCloudContentwarehouseV1DocumentLink `json:"documentLink,omitempty"` 881 // RequestMetadata: The meta information collected about the document creator, 882 // used to enforce access control for the service. 883 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 884 // ForceSendFields is a list of field names (e.g. "DocumentLink") to 885 // unconditionally include in API requests. By default, fields with empty or 886 // default values are omitted from API requests. See 887 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 888 // details. 889 ForceSendFields []string `json:"-"` 890 // NullFields is a list of field names (e.g. "DocumentLink") to include in API 891 // requests with the JSON null value. By default, fields with empty values are 892 // omitted from API requests. See 893 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 894 NullFields []string `json:"-"` 895 } 896 897 func (s *GoogleCloudContentwarehouseV1CreateDocumentLinkRequest) MarshalJSON() ([]byte, error) { 898 type NoMethod GoogleCloudContentwarehouseV1CreateDocumentLinkRequest 899 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 900 } 901 902 // GoogleCloudContentwarehouseV1CreateDocumentMetadata: Metadata object for 903 // CreateDocument request (currently empty). 904 type GoogleCloudContentwarehouseV1CreateDocumentMetadata struct { 905 } 906 907 // GoogleCloudContentwarehouseV1CreateDocumentRequest: Request message for 908 // DocumentService.CreateDocument. 909 type GoogleCloudContentwarehouseV1CreateDocumentRequest struct { 910 // CloudAiDocumentOption: Request Option for processing Cloud AI Document in 911 // Document Warehouse. This field offers limited support for mapping entities 912 // from Cloud AI Document to Warehouse Document. Please consult with product 913 // team before using this field and other available options. 914 CloudAiDocumentOption *GoogleCloudContentwarehouseV1CloudAIDocumentOption `json:"cloudAiDocumentOption,omitempty"` 915 // CreateMask: Field mask for creating Document fields. If mask path is empty, 916 // it means all fields are masked. For the `FieldMask` definition, see 917 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. 918 CreateMask string `json:"createMask,omitempty"` 919 // Document: Required. The document to create. 920 Document *GoogleCloudContentwarehouseV1Document `json:"document,omitempty"` 921 // Policy: Default document policy during creation. This refers to an Identity 922 // and Access (IAM) policy, which specifies access controls for the Document. 923 // Conditions defined in the policy will be ignored. 924 Policy *GoogleIamV1Policy `json:"policy,omitempty"` 925 // RequestMetadata: The meta information collected about the end user, used to 926 // enforce access control for the service. 927 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 928 // ForceSendFields is a list of field names (e.g. "CloudAiDocumentOption") to 929 // unconditionally include in API requests. By default, fields with empty or 930 // default values are omitted from API requests. See 931 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 932 // details. 933 ForceSendFields []string `json:"-"` 934 // NullFields is a list of field names (e.g. "CloudAiDocumentOption") to 935 // include in API requests with the JSON null value. By default, fields with 936 // empty values are omitted from API requests. See 937 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 938 NullFields []string `json:"-"` 939 } 940 941 func (s *GoogleCloudContentwarehouseV1CreateDocumentRequest) MarshalJSON() ([]byte, error) { 942 type NoMethod GoogleCloudContentwarehouseV1CreateDocumentRequest 943 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 944 } 945 946 // GoogleCloudContentwarehouseV1CreateDocumentResponse: Response message for 947 // DocumentService.CreateDocument. 948 type GoogleCloudContentwarehouseV1CreateDocumentResponse struct { 949 // Document: Document created after executing create request. 950 Document *GoogleCloudContentwarehouseV1Document `json:"document,omitempty"` 951 // LongRunningOperations: post-processing LROs 952 LongRunningOperations []*GoogleLongrunningOperation `json:"longRunningOperations,omitempty"` 953 // Metadata: Additional information for the API invocation, such as the request 954 // tracking id. 955 Metadata *GoogleCloudContentwarehouseV1ResponseMetadata `json:"metadata,omitempty"` 956 // RuleEngineOutput: Output from Rule Engine recording the rule evaluator and 957 // action executor's output. Refer format in: 958 // google/cloud/contentwarehouse/v1/rule_engine.proto 959 RuleEngineOutput *GoogleCloudContentwarehouseV1RuleEngineOutput `json:"ruleEngineOutput,omitempty"` 960 961 // ServerResponse contains the HTTP response code and headers from the server. 962 googleapi.ServerResponse `json:"-"` 963 // ForceSendFields is a list of field names (e.g. "Document") to 964 // unconditionally include in API requests. By default, fields with empty or 965 // default values are omitted from API requests. See 966 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 967 // details. 968 ForceSendFields []string `json:"-"` 969 // NullFields is a list of field names (e.g. "Document") to include in API 970 // requests with the JSON null value. By default, fields with empty values are 971 // omitted from API requests. See 972 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 973 NullFields []string `json:"-"` 974 } 975 976 func (s *GoogleCloudContentwarehouseV1CreateDocumentResponse) MarshalJSON() ([]byte, error) { 977 type NoMethod GoogleCloudContentwarehouseV1CreateDocumentResponse 978 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 979 } 980 981 // GoogleCloudContentwarehouseV1CustomWeightsMetadata: To support the custom 982 // weighting across document schemas. 983 type GoogleCloudContentwarehouseV1CustomWeightsMetadata struct { 984 // WeightedSchemaProperties: List of schema and property name. Allows a maximum 985 // of 10 schemas to be specified for relevance boosting. 986 WeightedSchemaProperties []*GoogleCloudContentwarehouseV1WeightedSchemaProperty `json:"weightedSchemaProperties,omitempty"` 987 // ForceSendFields is a list of field names (e.g. "WeightedSchemaProperties") 988 // to unconditionally include in API requests. By default, fields with empty or 989 // default values are omitted from API requests. See 990 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 991 // details. 992 ForceSendFields []string `json:"-"` 993 // NullFields is a list of field names (e.g. "WeightedSchemaProperties") to 994 // include in API requests with the JSON null value. By default, fields with 995 // empty values are omitted from API requests. See 996 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 997 NullFields []string `json:"-"` 998 } 999 1000 func (s *GoogleCloudContentwarehouseV1CustomWeightsMetadata) MarshalJSON() ([]byte, error) { 1001 type NoMethod GoogleCloudContentwarehouseV1CustomWeightsMetadata 1002 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1003 } 1004 1005 // GoogleCloudContentwarehouseV1DataUpdateAction: Represents the action 1006 // responsible for properties update operations. 1007 type GoogleCloudContentwarehouseV1DataUpdateAction struct { 1008 // Entries: Map of (K, V) -> (valid name of the field, new value of the field) 1009 // E.g., ("age", "60") entry triggers update of field age with a value of 60. 1010 // If the field is not present then new entry is added. During update action 1011 // execution, value strings will be casted to appropriate types. 1012 Entries map[string]string `json:"entries,omitempty"` 1013 // ForceSendFields is a list of field names (e.g. "Entries") to unconditionally 1014 // include in API requests. By default, fields with empty or default values are 1015 // omitted from API requests. See 1016 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1017 // details. 1018 ForceSendFields []string `json:"-"` 1019 // NullFields is a list of field names (e.g. "Entries") to include in API 1020 // requests with the JSON null value. By default, fields with empty values are 1021 // omitted from API requests. See 1022 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1023 NullFields []string `json:"-"` 1024 } 1025 1026 func (s *GoogleCloudContentwarehouseV1DataUpdateAction) MarshalJSON() ([]byte, error) { 1027 type NoMethod GoogleCloudContentwarehouseV1DataUpdateAction 1028 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1029 } 1030 1031 // GoogleCloudContentwarehouseV1DataValidationAction: Represents the action 1032 // responsible for data validation operations. 1033 type GoogleCloudContentwarehouseV1DataValidationAction struct { 1034 // Conditions: Map of (K, V) -> (field, string condition to be evaluated on the 1035 // field) E.g., ("age", "age > 18 && age < 60") entry triggers validation of 1036 // field age with the given condition. Map entries will be ANDed during 1037 // validation. 1038 Conditions map[string]string `json:"conditions,omitempty"` 1039 // ForceSendFields is a list of field names (e.g. "Conditions") to 1040 // unconditionally include in API requests. By default, fields with empty or 1041 // default values are omitted from API requests. See 1042 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1043 // details. 1044 ForceSendFields []string `json:"-"` 1045 // NullFields is a list of field names (e.g. "Conditions") to include in API 1046 // requests with the JSON null value. By default, fields with empty values are 1047 // omitted from API requests. See 1048 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1049 NullFields []string `json:"-"` 1050 } 1051 1052 func (s *GoogleCloudContentwarehouseV1DataValidationAction) MarshalJSON() ([]byte, error) { 1053 type NoMethod GoogleCloudContentwarehouseV1DataValidationAction 1054 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1055 } 1056 1057 // GoogleCloudContentwarehouseV1DateTimeArray: DateTime values. 1058 type GoogleCloudContentwarehouseV1DateTimeArray struct { 1059 // Values: List of datetime values. Both OffsetDateTime and ZonedDateTime are 1060 // supported. 1061 Values []*GoogleTypeDateTime `json:"values,omitempty"` 1062 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 1063 // include in API requests. By default, fields with empty or default values are 1064 // omitted from API requests. See 1065 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1066 // details. 1067 ForceSendFields []string `json:"-"` 1068 // NullFields is a list of field names (e.g. "Values") to include in API 1069 // requests with the JSON null value. By default, fields with empty values are 1070 // omitted from API requests. See 1071 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1072 NullFields []string `json:"-"` 1073 } 1074 1075 func (s *GoogleCloudContentwarehouseV1DateTimeArray) MarshalJSON() ([]byte, error) { 1076 type NoMethod GoogleCloudContentwarehouseV1DateTimeArray 1077 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1078 } 1079 1080 // GoogleCloudContentwarehouseV1DateTimeTypeOptions: Configurations for a date 1081 // time property. 1082 type GoogleCloudContentwarehouseV1DateTimeTypeOptions struct { 1083 } 1084 1085 // GoogleCloudContentwarehouseV1DeleteDocumentAction: Represents the action 1086 // responsible for deleting the document. 1087 type GoogleCloudContentwarehouseV1DeleteDocumentAction struct { 1088 // EnableHardDelete: Boolean field to select between hard vs soft delete 1089 // options. Set 'true' for 'hard delete' and 'false' for 'soft delete'. 1090 EnableHardDelete bool `json:"enableHardDelete,omitempty"` 1091 // ForceSendFields is a list of field names (e.g. "EnableHardDelete") to 1092 // unconditionally include in API requests. By default, fields with empty or 1093 // default values are omitted from API requests. See 1094 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1095 // details. 1096 ForceSendFields []string `json:"-"` 1097 // NullFields is a list of field names (e.g. "EnableHardDelete") to include in 1098 // API requests with the JSON null value. By default, fields with empty values 1099 // are omitted from API requests. See 1100 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1101 NullFields []string `json:"-"` 1102 } 1103 1104 func (s *GoogleCloudContentwarehouseV1DeleteDocumentAction) MarshalJSON() ([]byte, error) { 1105 type NoMethod GoogleCloudContentwarehouseV1DeleteDocumentAction 1106 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1107 } 1108 1109 // GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest: Request message for 1110 // DocumentLinkService.DeleteDocumentLink. 1111 type GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest struct { 1112 // RequestMetadata: The meta information collected about the document creator, 1113 // used to enforce access control for the service. 1114 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 1115 // ForceSendFields is a list of field names (e.g. "RequestMetadata") to 1116 // unconditionally include in API requests. By default, fields with empty or 1117 // default values are omitted from API requests. See 1118 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1119 // details. 1120 ForceSendFields []string `json:"-"` 1121 // NullFields is a list of field names (e.g. "RequestMetadata") to include in 1122 // API requests with the JSON null value. By default, fields with empty values 1123 // are omitted from API requests. See 1124 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1125 NullFields []string `json:"-"` 1126 } 1127 1128 func (s *GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest) MarshalJSON() ([]byte, error) { 1129 type NoMethod GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest 1130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1131 } 1132 1133 // GoogleCloudContentwarehouseV1DeleteDocumentRequest: Request message for 1134 // DocumentService.DeleteDocument. 1135 type GoogleCloudContentwarehouseV1DeleteDocumentRequest struct { 1136 // RequestMetadata: The meta information collected about the end user, used to 1137 // enforce access control for the service. 1138 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 1139 // ForceSendFields is a list of field names (e.g. "RequestMetadata") to 1140 // unconditionally include in API requests. By default, fields with empty or 1141 // default values are omitted from API requests. See 1142 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1143 // details. 1144 ForceSendFields []string `json:"-"` 1145 // NullFields is a list of field names (e.g. "RequestMetadata") to include in 1146 // API requests with the JSON null value. By default, fields with empty values 1147 // are omitted from API requests. See 1148 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1149 NullFields []string `json:"-"` 1150 } 1151 1152 func (s *GoogleCloudContentwarehouseV1DeleteDocumentRequest) MarshalJSON() ([]byte, error) { 1153 type NoMethod GoogleCloudContentwarehouseV1DeleteDocumentRequest 1154 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1155 } 1156 1157 // GoogleCloudContentwarehouseV1Document: Defines the structure for content 1158 // warehouse document proto. 1159 type GoogleCloudContentwarehouseV1Document struct { 1160 // CloudAiDocument: Document AI format to save the structured content, 1161 // including OCR. 1162 CloudAiDocument *GoogleCloudDocumentaiV1Document `json:"cloudAiDocument,omitempty"` 1163 // ContentCategory: Indicates the category (image, audio, video etc.) of the 1164 // original content. 1165 // 1166 // Possible values: 1167 // "CONTENT_CATEGORY_UNSPECIFIED" - No category is specified. 1168 // "CONTENT_CATEGORY_IMAGE" - Content is of image type. 1169 // "CONTENT_CATEGORY_AUDIO" - Content is of audio type. 1170 // "CONTENT_CATEGORY_VIDEO" - Content is of video type. 1171 ContentCategory string `json:"contentCategory,omitempty"` 1172 // CreateTime: Output only. The time when the document is created. 1173 CreateTime string `json:"createTime,omitempty"` 1174 // Creator: The user who creates the document. 1175 Creator string `json:"creator,omitempty"` 1176 // DisplayName: Required. Display name of the document given by the user. This 1177 // name will be displayed in the UI. Customer can populate this field with the 1178 // name of the document. This differs from the 'title' field as 'title' is 1179 // optional and stores the top heading in the document. 1180 DisplayName string `json:"displayName,omitempty"` 1181 // DisplayUri: Uri to display the document, for example, in the UI. 1182 DisplayUri string `json:"displayUri,omitempty"` 1183 // DispositionTime: Output only. If linked to a Collection with 1184 // RetentionPolicy, the date when the document becomes mutable. 1185 DispositionTime string `json:"dispositionTime,omitempty"` 1186 // DocumentSchemaName: The Document schema name. Format: 1187 // projects/{project_number}/locations/{location}/documentSchemas/{document_sche 1188 // ma_id}. 1189 DocumentSchemaName string `json:"documentSchemaName,omitempty"` 1190 // InlineRawDocument: Raw document content. 1191 InlineRawDocument string `json:"inlineRawDocument,omitempty"` 1192 // LegalHold: Output only. Indicates if the document has a legal hold on it. 1193 LegalHold bool `json:"legalHold,omitempty"` 1194 // Name: The resource name of the document. Format: 1195 // projects/{project_number}/locations/{location}/documents/{document_id}. The 1196 // name is ignored when creating a document. 1197 Name string `json:"name,omitempty"` 1198 // PlainText: Other document format, such as PPTX, XLXS 1199 PlainText string `json:"plainText,omitempty"` 1200 // Properties: List of values that are user supplied metadata. 1201 Properties []*GoogleCloudContentwarehouseV1Property `json:"properties,omitempty"` 1202 // RawDocumentFileType: This is used when DocAI was not used to load the 1203 // document and parsing/ extracting is needed for the inline_raw_document. For 1204 // example, if inline_raw_document is the byte representation of a PDF file, 1205 // then this should be set to: RAW_DOCUMENT_FILE_TYPE_PDF. 1206 // 1207 // Possible values: 1208 // "RAW_DOCUMENT_FILE_TYPE_UNSPECIFIED" - No raw document specified or it is 1209 // non-parsable 1210 // "RAW_DOCUMENT_FILE_TYPE_PDF" - Adobe PDF format 1211 // "RAW_DOCUMENT_FILE_TYPE_DOCX" - Microsoft Word format 1212 // "RAW_DOCUMENT_FILE_TYPE_XLSX" - Microsoft Excel format 1213 // "RAW_DOCUMENT_FILE_TYPE_PPTX" - Microsoft Powerpoint format 1214 // "RAW_DOCUMENT_FILE_TYPE_TEXT" - UTF-8 encoded text format 1215 // "RAW_DOCUMENT_FILE_TYPE_TIFF" - TIFF or TIF image file format 1216 RawDocumentFileType string `json:"rawDocumentFileType,omitempty"` 1217 // RawDocumentPath: Raw document file in Cloud Storage path. 1218 RawDocumentPath string `json:"rawDocumentPath,omitempty"` 1219 // ReferenceId: The reference ID set by customers. Must be unique per project 1220 // and location. 1221 ReferenceId string `json:"referenceId,omitempty"` 1222 // TextExtractionDisabled: If true, text extraction will not be performed. 1223 TextExtractionDisabled bool `json:"textExtractionDisabled,omitempty"` 1224 // TextExtractionEnabled: If true, text extraction will be performed. 1225 TextExtractionEnabled bool `json:"textExtractionEnabled,omitempty"` 1226 // Title: Title that describes the document. This can be the top heading or 1227 // text that describes the document. 1228 Title string `json:"title,omitempty"` 1229 // UpdateTime: Output only. The time when the document is last updated. 1230 UpdateTime string `json:"updateTime,omitempty"` 1231 // Updater: The user who lastly updates the document. 1232 Updater string `json:"updater,omitempty"` 1233 1234 // ServerResponse contains the HTTP response code and headers from the server. 1235 googleapi.ServerResponse `json:"-"` 1236 // ForceSendFields is a list of field names (e.g. "CloudAiDocument") to 1237 // unconditionally include in API requests. By default, fields with empty or 1238 // default values are omitted from API requests. See 1239 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1240 // details. 1241 ForceSendFields []string `json:"-"` 1242 // NullFields is a list of field names (e.g. "CloudAiDocument") to include in 1243 // API requests with the JSON null value. By default, fields with empty values 1244 // are omitted from API requests. See 1245 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1246 NullFields []string `json:"-"` 1247 } 1248 1249 func (s *GoogleCloudContentwarehouseV1Document) MarshalJSON() ([]byte, error) { 1250 type NoMethod GoogleCloudContentwarehouseV1Document 1251 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1252 } 1253 1254 // GoogleCloudContentwarehouseV1DocumentLink: A document-link between source 1255 // and target document. 1256 type GoogleCloudContentwarehouseV1DocumentLink struct { 1257 // CreateTime: Output only. The time when the documentLink is created. 1258 CreateTime string `json:"createTime,omitempty"` 1259 // Description: Description of this document-link. 1260 Description string `json:"description,omitempty"` 1261 // Name: Name of this document-link. It is required that the parent derived 1262 // form the name to be consistent with the source document reference. Otherwise 1263 // an exception will be thrown. Format: 1264 // projects/{project_number}/locations/{location}/documents/{source_document_id} 1265 // /documentLinks/{document_link_id}. 1266 Name string `json:"name,omitempty"` 1267 // SourceDocumentReference: Document references of the source document. 1268 SourceDocumentReference *GoogleCloudContentwarehouseV1DocumentReference `json:"sourceDocumentReference,omitempty"` 1269 // State: The state of the documentlink. If target node has been deleted, the 1270 // link is marked as invalid. Removing a source node will result in removal of 1271 // all associated links. 1272 // 1273 // Possible values: 1274 // "STATE_UNSPECIFIED" - Unknown state of documentlink. 1275 // "ACTIVE" - The documentlink has both source and target documents detected. 1276 // "SOFT_DELETED" - Target document is deleted, and mark the documentlink as 1277 // soft-deleted. 1278 State string `json:"state,omitempty"` 1279 // TargetDocumentReference: Document references of the target document. 1280 TargetDocumentReference *GoogleCloudContentwarehouseV1DocumentReference `json:"targetDocumentReference,omitempty"` 1281 // UpdateTime: Output only. The time when the documentLink is last updated. 1282 UpdateTime string `json:"updateTime,omitempty"` 1283 1284 // ServerResponse contains the HTTP response code and headers from the server. 1285 googleapi.ServerResponse `json:"-"` 1286 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1287 // unconditionally include in API requests. By default, fields with empty or 1288 // default values are omitted from API requests. See 1289 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1290 // details. 1291 ForceSendFields []string `json:"-"` 1292 // NullFields is a list of field names (e.g. "CreateTime") to include in API 1293 // requests with the JSON null value. By default, fields with empty values are 1294 // omitted from API requests. See 1295 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1296 NullFields []string `json:"-"` 1297 } 1298 1299 func (s *GoogleCloudContentwarehouseV1DocumentLink) MarshalJSON() ([]byte, error) { 1300 type NoMethod GoogleCloudContentwarehouseV1DocumentLink 1301 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1302 } 1303 1304 type GoogleCloudContentwarehouseV1DocumentQuery struct { 1305 // CustomPropertyFilter: This filter specifies a structured syntax to match 1306 // against the [PropertyDefinition].is_filterable marked as `true`. The syntax 1307 // for this expression is a subset of SQL syntax. Supported operators are: `=`, 1308 // `!=`, `<`, `<=`, `>`, and `>=` where the left of the operator is a property 1309 // name and the right of the operator is a number or a quoted string. You must 1310 // escape backslash (\\) and quote (\") characters. Supported functions are 1311 // `LOWER([property_name])` to perform a case insensitive match and 1312 // `EMPTY([property_name])` to filter on the existence of a key. Boolean 1313 // expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for 1314 // example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 comparisons 1315 // or functions are allowed in the expression. The expression must be < 6000 1316 // bytes in length. Sample Query: `(LOWER(driving_license)="class \"a\"" OR 1317 // EMPTY(driving_license)) AND driving_years > 10` 1318 CustomPropertyFilter string `json:"customPropertyFilter,omitempty"` 1319 // CustomWeightsMetadata: To support the custom weighting across document 1320 // schemas, customers need to provide the properties to be used to boost the 1321 // ranking in the search request. For a search query with CustomWeightsMetadata 1322 // specified, only the RetrievalImportance for the properties in the 1323 // CustomWeightsMetadata will be honored. 1324 CustomWeightsMetadata *GoogleCloudContentwarehouseV1CustomWeightsMetadata `json:"customWeightsMetadata,omitempty"` 1325 // DocumentCreatorFilter: The exact creator(s) of the documents to search 1326 // against. If a value isn't specified, documents within the search results are 1327 // associated with any creator. If multiple values are specified, documents 1328 // within the search results may be associated with any of the specified 1329 // creators. 1330 DocumentCreatorFilter []string `json:"documentCreatorFilter,omitempty"` 1331 // DocumentNameFilter: Search the documents in the list. Format: 1332 // projects/{project_number}/locations/{location}/documents/{document_id}. 1333 DocumentNameFilter []string `json:"documentNameFilter,omitempty"` 1334 // DocumentSchemaNames: This filter specifies the exact document schema 1335 // Document.document_schema_name of the documents to search against. If a value 1336 // isn't specified, documents within the search results are associated with any 1337 // schema. If multiple values are specified, documents within the search 1338 // results may be associated with any of the specified schemas. At most 20 1339 // document schema names are allowed. 1340 DocumentSchemaNames []string `json:"documentSchemaNames,omitempty"` 1341 // FileTypeFilter: This filter specifies the types of files to return: ALL, 1342 // FOLDER, or FILE. If FOLDER or FILE is specified, then only either folders or 1343 // files will be returned, respectively. If ALL is specified, both folders and 1344 // files will be returned. If no value is specified, ALL files will be 1345 // returned. 1346 FileTypeFilter *GoogleCloudContentwarehouseV1FileTypeFilter `json:"fileTypeFilter,omitempty"` 1347 // FolderNameFilter: Search all the documents under this specified folder. 1348 // Format: 1349 // projects/{project_number}/locations/{location}/documents/{document_id}. 1350 FolderNameFilter string `json:"folderNameFilter,omitempty"` 1351 // IsNlQuery: Experimental, do not use. If the query is a natural language 1352 // question. False by default. If true, then the question-answering feature 1353 // will be used instead of search, and `result_count` in SearchDocumentsRequest 1354 // must be set. In addition, all other input fields related to search 1355 // (pagination, histograms, etc.) will be ignored. 1356 IsNlQuery bool `json:"isNlQuery,omitempty"` 1357 // PropertyFilter: This filter specifies a structured syntax to match against 1358 // the PropertyDefinition.is_filterable marked as `true`. The relationship 1359 // between the PropertyFilters is OR. 1360 PropertyFilter []*GoogleCloudContentwarehouseV1PropertyFilter `json:"propertyFilter,omitempty"` 1361 // Query: The query string that matches against the full text of the document 1362 // and the searchable properties. The query partially supports Google AIP style 1363 // syntax (https://google.aip.dev/160). Specifically, the query supports 1364 // literals, logical operators, negation operators, comparison operators, and 1365 // functions. Literals: A bare literal value (examples: "42", "Hugo") is a 1366 // value to be matched against. It searches over the full text of the document 1367 // and the searchable properties. Logical operators: "AND", "and", "OR", and 1368 // "or" are binary logical operators (example: "engineer OR developer"). 1369 // Negation operators: "NOT" and "!" are negation operators (example: "NOT 1370 // software"). Comparison operators: support the binary comparison operators =, 1371 // !=, <, >, <= and >= for string, numeric, enum, boolean. Also support like 1372 // operator `~~` for string. It provides semantic search functionality by 1373 // parsing, stemming and doing synonyms expansion against the input query. To 1374 // specify a property in the query, the left hand side expression in the 1375 // comparison must be the property ID including the parent. The right hand side 1376 // must be literals. For example: "\"projects/123/locations/us\".property_a < 1377 // 1" matches results whose "property_a" is less than 1 in project 123 and us 1378 // location. The literals and comparison expression can be connected in a 1379 // single query (example: "software engineer 1380 // \"projects/123/locations/us\".salary > 100"). Functions: supported functions 1381 // are `LOWER([property_name])` to perform a case insensitive match and 1382 // `EMPTY([property_name])` to filter on the existence of a key. Support nested 1383 // expressions connected using parenthesis and logical operators. The default 1384 // logical operators is `AND` if there is no operators between expressions. The 1385 // query can be used with other filters e.g. `time_filters` and 1386 // `folder_name_filter`. They are connected with `AND` operator under the hood. 1387 // The maximum number of allowed characters is 255. 1388 Query string `json:"query,omitempty"` 1389 // QueryContext: For custom synonyms. Customers provide the synonyms based on 1390 // context. One customer can provide multiple set of synonyms based on 1391 // different context. The search query will be expanded based on the custom 1392 // synonyms of the query context set. By default, no custom synonyms wll be 1393 // applied if no query context is provided. It is not supported for CMEK 1394 // compliant deployment. 1395 QueryContext []string `json:"queryContext,omitempty"` 1396 // TimeFilters: Documents created/updated within a range specified by this 1397 // filter are searched against. 1398 TimeFilters []*GoogleCloudContentwarehouseV1TimeFilter `json:"timeFilters,omitempty"` 1399 // ForceSendFields is a list of field names (e.g. "CustomPropertyFilter") to 1400 // unconditionally include in API requests. By default, fields with empty or 1401 // default values are omitted from API requests. See 1402 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1403 // details. 1404 ForceSendFields []string `json:"-"` 1405 // NullFields is a list of field names (e.g. "CustomPropertyFilter") to include 1406 // in API requests with the JSON null value. By default, fields with empty 1407 // values are omitted from API requests. See 1408 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1409 NullFields []string `json:"-"` 1410 } 1411 1412 func (s *GoogleCloudContentwarehouseV1DocumentQuery) MarshalJSON() ([]byte, error) { 1413 type NoMethod GoogleCloudContentwarehouseV1DocumentQuery 1414 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1415 } 1416 1417 // GoogleCloudContentwarehouseV1DocumentReference: References to the documents. 1418 type GoogleCloudContentwarehouseV1DocumentReference struct { 1419 // CreateTime: Output only. The time when the document is created. 1420 CreateTime string `json:"createTime,omitempty"` 1421 // DeleteTime: Output only. The time when the document is deleted. 1422 DeleteTime string `json:"deleteTime,omitempty"` 1423 // DisplayName: display_name of the referenced document; this name does not 1424 // need to be consistent to the display_name in the Document proto, depending 1425 // on the ACL constraint. 1426 DisplayName string `json:"displayName,omitempty"` 1427 // DocumentIsFolder: The document type of the document being referenced. 1428 DocumentIsFolder bool `json:"documentIsFolder,omitempty"` 1429 // DocumentIsLegalHoldFolder: Document is a folder with legal hold. 1430 DocumentIsLegalHoldFolder bool `json:"documentIsLegalHoldFolder,omitempty"` 1431 // DocumentIsRetentionFolder: Document is a folder with retention policy. 1432 DocumentIsRetentionFolder bool `json:"documentIsRetentionFolder,omitempty"` 1433 // DocumentName: Required. Name of the referenced document. 1434 DocumentName string `json:"documentName,omitempty"` 1435 // Snippet: Stores the subset of the referenced document's content. This is 1436 // useful to allow user peek the information of the referenced document. 1437 Snippet string `json:"snippet,omitempty"` 1438 // UpdateTime: Output only. The time when the document is last updated. 1439 UpdateTime string `json:"updateTime,omitempty"` 1440 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1441 // unconditionally include in API requests. By default, fields with empty or 1442 // default values are omitted from API requests. See 1443 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1444 // details. 1445 ForceSendFields []string `json:"-"` 1446 // NullFields is a list of field names (e.g. "CreateTime") to include in API 1447 // requests with the JSON null value. By default, fields with empty values are 1448 // omitted from API requests. See 1449 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1450 NullFields []string `json:"-"` 1451 } 1452 1453 func (s *GoogleCloudContentwarehouseV1DocumentReference) MarshalJSON() ([]byte, error) { 1454 type NoMethod GoogleCloudContentwarehouseV1DocumentReference 1455 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1456 } 1457 1458 // GoogleCloudContentwarehouseV1DocumentSchema: A document schema used to 1459 // define document structure. 1460 type GoogleCloudContentwarehouseV1DocumentSchema struct { 1461 // CreateTime: Output only. The time when the document schema is created. 1462 CreateTime string `json:"createTime,omitempty"` 1463 // Description: Schema description. 1464 Description string `json:"description,omitempty"` 1465 // DisplayName: Required. Name of the schema given by the user. Must be unique 1466 // per project. 1467 DisplayName string `json:"displayName,omitempty"` 1468 // DocumentIsFolder: Document Type, true refers the document is a folder, 1469 // otherwise it is a typical document. 1470 DocumentIsFolder bool `json:"documentIsFolder,omitempty"` 1471 // Name: The resource name of the document schema. Format: 1472 // projects/{project_number}/locations/{location}/documentSchemas/{document_sche 1473 // ma_id}. The name is ignored when creating a document schema. 1474 Name string `json:"name,omitempty"` 1475 // PropertyDefinitions: Document details. 1476 PropertyDefinitions []*GoogleCloudContentwarehouseV1PropertyDefinition `json:"propertyDefinitions,omitempty"` 1477 // UpdateTime: Output only. The time when the document schema is last updated. 1478 UpdateTime string `json:"updateTime,omitempty"` 1479 1480 // ServerResponse contains the HTTP response code and headers from the server. 1481 googleapi.ServerResponse `json:"-"` 1482 // ForceSendFields is a list of field names (e.g. "CreateTime") to 1483 // unconditionally include in API requests. By default, fields with empty or 1484 // default values are omitted from API requests. See 1485 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1486 // details. 1487 ForceSendFields []string `json:"-"` 1488 // NullFields is a list of field names (e.g. "CreateTime") to include in API 1489 // requests with the JSON null value. By default, fields with empty values are 1490 // omitted from API requests. See 1491 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1492 NullFields []string `json:"-"` 1493 } 1494 1495 func (s *GoogleCloudContentwarehouseV1DocumentSchema) MarshalJSON() ([]byte, error) { 1496 type NoMethod GoogleCloudContentwarehouseV1DocumentSchema 1497 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1498 } 1499 1500 // GoogleCloudContentwarehouseV1EnumArray: Enum values. 1501 type GoogleCloudContentwarehouseV1EnumArray struct { 1502 // Values: List of enum values. 1503 Values []string `json:"values,omitempty"` 1504 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 1505 // include in API requests. By default, fields with empty or default values are 1506 // omitted from API requests. See 1507 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1508 // details. 1509 ForceSendFields []string `json:"-"` 1510 // NullFields is a list of field names (e.g. "Values") to include in API 1511 // requests with the JSON null value. By default, fields with empty values are 1512 // omitted from API requests. See 1513 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1514 NullFields []string `json:"-"` 1515 } 1516 1517 func (s *GoogleCloudContentwarehouseV1EnumArray) MarshalJSON() ([]byte, error) { 1518 type NoMethod GoogleCloudContentwarehouseV1EnumArray 1519 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1520 } 1521 1522 // GoogleCloudContentwarehouseV1EnumTypeOptions: Configurations for an 1523 // enum/categorical property. 1524 type GoogleCloudContentwarehouseV1EnumTypeOptions struct { 1525 // PossibleValues: Required. List of possible enum values. 1526 PossibleValues []string `json:"possibleValues,omitempty"` 1527 // ValidationCheckDisabled: Make sure the Enum property value provided in the 1528 // document is in the possile value list during document creation. The 1529 // validation check runs by default. 1530 ValidationCheckDisabled bool `json:"validationCheckDisabled,omitempty"` 1531 // ForceSendFields is a list of field names (e.g. "PossibleValues") to 1532 // unconditionally include in API requests. By default, fields with empty or 1533 // default values are omitted from API requests. See 1534 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1535 // details. 1536 ForceSendFields []string `json:"-"` 1537 // NullFields is a list of field names (e.g. "PossibleValues") to include in 1538 // API requests with the JSON null value. By default, fields with empty values 1539 // are omitted from API requests. See 1540 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1541 NullFields []string `json:"-"` 1542 } 1543 1544 func (s *GoogleCloudContentwarehouseV1EnumTypeOptions) MarshalJSON() ([]byte, error) { 1545 type NoMethod GoogleCloudContentwarehouseV1EnumTypeOptions 1546 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1547 } 1548 1549 // GoogleCloudContentwarehouseV1EnumValue: Represents the string value of the 1550 // enum field. 1551 type GoogleCloudContentwarehouseV1EnumValue struct { 1552 // Value: String value of the enum field. This must match defined set of enums 1553 // in document schema using EnumTypeOptions. 1554 Value string `json:"value,omitempty"` 1555 // ForceSendFields is a list of field names (e.g. "Value") to unconditionally 1556 // include in API requests. By default, fields with empty or default values are 1557 // omitted from API requests. See 1558 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1559 // details. 1560 ForceSendFields []string `json:"-"` 1561 // NullFields is a list of field names (e.g. "Value") to include in API 1562 // requests with the JSON null value. By default, fields with empty values are 1563 // omitted from API requests. See 1564 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1565 NullFields []string `json:"-"` 1566 } 1567 1568 func (s *GoogleCloudContentwarehouseV1EnumValue) MarshalJSON() ([]byte, error) { 1569 type NoMethod GoogleCloudContentwarehouseV1EnumValue 1570 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1571 } 1572 1573 // GoogleCloudContentwarehouseV1ExportToCdwPipeline: The configuration of 1574 // exporting documents from the Document Warehouse to CDW pipeline. 1575 type GoogleCloudContentwarehouseV1ExportToCdwPipeline struct { 1576 // DocAiDataset: Optional. The CDW dataset resource name. This field is 1577 // optional. If not set, the documents will be exported to Cloud Storage only. 1578 // Format: 1579 // projects/{project}/locations/{location}/processors/{processor}/dataset 1580 DocAiDataset string `json:"docAiDataset,omitempty"` 1581 // Documents: The list of all the resource names of the documents to be 1582 // processed. Format: 1583 // projects/{project_number}/locations/{location}/documents/{document_id}. 1584 Documents []string `json:"documents,omitempty"` 1585 // ExportFolderPath: The Cloud Storage folder path used to store the exported 1586 // documents before being sent to CDW. Format: `gs:///`. 1587 ExportFolderPath string `json:"exportFolderPath,omitempty"` 1588 // TrainingSplitRatio: Ratio of training dataset split. When importing into 1589 // Document AI Workbench, documents will be automatically split into training 1590 // and test split category with the specified ratio. This field is required if 1591 // doc_ai_dataset is set. 1592 TrainingSplitRatio float64 `json:"trainingSplitRatio,omitempty"` 1593 // ForceSendFields is a list of field names (e.g. "DocAiDataset") to 1594 // unconditionally include in API requests. By default, fields with empty or 1595 // default values are omitted from API requests. See 1596 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1597 // details. 1598 ForceSendFields []string `json:"-"` 1599 // NullFields is a list of field names (e.g. "DocAiDataset") to include in API 1600 // requests with the JSON null value. By default, fields with empty values are 1601 // omitted from API requests. See 1602 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1603 NullFields []string `json:"-"` 1604 } 1605 1606 func (s *GoogleCloudContentwarehouseV1ExportToCdwPipeline) MarshalJSON() ([]byte, error) { 1607 type NoMethod GoogleCloudContentwarehouseV1ExportToCdwPipeline 1608 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1609 } 1610 1611 func (s *GoogleCloudContentwarehouseV1ExportToCdwPipeline) UnmarshalJSON(data []byte) error { 1612 type NoMethod GoogleCloudContentwarehouseV1ExportToCdwPipeline 1613 var s1 struct { 1614 TrainingSplitRatio gensupport.JSONFloat64 `json:"trainingSplitRatio"` 1615 *NoMethod 1616 } 1617 s1.NoMethod = (*NoMethod)(s) 1618 if err := json.Unmarshal(data, &s1); err != nil { 1619 return err 1620 } 1621 s.TrainingSplitRatio = float64(s1.TrainingSplitRatio) 1622 return nil 1623 } 1624 1625 // GoogleCloudContentwarehouseV1FetchAclRequest: Request message for 1626 // DocumentService.FetchAcl 1627 type GoogleCloudContentwarehouseV1FetchAclRequest struct { 1628 // ProjectOwner: For Get Project ACL only. Authorization check for end user 1629 // will be ignored when project_owner=true. 1630 ProjectOwner bool `json:"projectOwner,omitempty"` 1631 // RequestMetadata: The meta information collected about the end user, used to 1632 // enforce access control for the service. 1633 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 1634 // ForceSendFields is a list of field names (e.g. "ProjectOwner") to 1635 // unconditionally include in API requests. By default, fields with empty or 1636 // default values are omitted from API requests. See 1637 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1638 // details. 1639 ForceSendFields []string `json:"-"` 1640 // NullFields is a list of field names (e.g. "ProjectOwner") to include in API 1641 // requests with the JSON null value. By default, fields with empty values are 1642 // omitted from API requests. See 1643 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1644 NullFields []string `json:"-"` 1645 } 1646 1647 func (s *GoogleCloudContentwarehouseV1FetchAclRequest) MarshalJSON() ([]byte, error) { 1648 type NoMethod GoogleCloudContentwarehouseV1FetchAclRequest 1649 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1650 } 1651 1652 // GoogleCloudContentwarehouseV1FetchAclResponse: Response message for 1653 // DocumentService.FetchAcl. 1654 type GoogleCloudContentwarehouseV1FetchAclResponse struct { 1655 // Metadata: Additional information for the API invocation, such as the request 1656 // tracking id. 1657 Metadata *GoogleCloudContentwarehouseV1ResponseMetadata `json:"metadata,omitempty"` 1658 // Policy: The IAM policy. 1659 Policy *GoogleIamV1Policy `json:"policy,omitempty"` 1660 1661 // ServerResponse contains the HTTP response code and headers from the server. 1662 googleapi.ServerResponse `json:"-"` 1663 // ForceSendFields is a list of field names (e.g. "Metadata") to 1664 // unconditionally include in API requests. By default, fields with empty or 1665 // default values are omitted from API requests. See 1666 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1667 // details. 1668 ForceSendFields []string `json:"-"` 1669 // NullFields is a list of field names (e.g. "Metadata") to include in API 1670 // requests with the JSON null value. By default, fields with empty values are 1671 // omitted from API requests. See 1672 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1673 NullFields []string `json:"-"` 1674 } 1675 1676 func (s *GoogleCloudContentwarehouseV1FetchAclResponse) MarshalJSON() ([]byte, error) { 1677 type NoMethod GoogleCloudContentwarehouseV1FetchAclResponse 1678 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1679 } 1680 1681 // GoogleCloudContentwarehouseV1FileTypeFilter: Filter for the specific types 1682 // of documents returned. 1683 type GoogleCloudContentwarehouseV1FileTypeFilter struct { 1684 // FileType: The type of files to return. 1685 // 1686 // Possible values: 1687 // "FILE_TYPE_UNSPECIFIED" - Default document type. If set, disables the 1688 // filter. 1689 // "ALL" - Returns all document types, including folders. 1690 // "FOLDER" - Returns only folders. 1691 // "DOCUMENT" - Returns only non-folder documents. 1692 // "ROOT_FOLDER" - Returns only root folders 1693 FileType string `json:"fileType,omitempty"` 1694 // ForceSendFields is a list of field names (e.g. "FileType") to 1695 // unconditionally include in API requests. By default, fields with empty or 1696 // default values are omitted from API requests. See 1697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1698 // details. 1699 ForceSendFields []string `json:"-"` 1700 // NullFields is a list of field names (e.g. "FileType") to include in API 1701 // requests with the JSON null value. By default, fields with empty values are 1702 // omitted from API requests. See 1703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1704 NullFields []string `json:"-"` 1705 } 1706 1707 func (s *GoogleCloudContentwarehouseV1FileTypeFilter) MarshalJSON() ([]byte, error) { 1708 type NoMethod GoogleCloudContentwarehouseV1FileTypeFilter 1709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1710 } 1711 1712 // GoogleCloudContentwarehouseV1FloatArray: Float values. 1713 type GoogleCloudContentwarehouseV1FloatArray struct { 1714 // Values: List of float values. 1715 Values []float64 `json:"values,omitempty"` 1716 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 1717 // include in API requests. By default, fields with empty or default values are 1718 // omitted from API requests. See 1719 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1720 // details. 1721 ForceSendFields []string `json:"-"` 1722 // NullFields is a list of field names (e.g. "Values") to include in API 1723 // requests with the JSON null value. By default, fields with empty values are 1724 // omitted from API requests. See 1725 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1726 NullFields []string `json:"-"` 1727 } 1728 1729 func (s *GoogleCloudContentwarehouseV1FloatArray) MarshalJSON() ([]byte, error) { 1730 type NoMethod GoogleCloudContentwarehouseV1FloatArray 1731 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1732 } 1733 1734 func (s *GoogleCloudContentwarehouseV1FloatArray) UnmarshalJSON(data []byte) error { 1735 type NoMethod GoogleCloudContentwarehouseV1FloatArray 1736 var s1 struct { 1737 Values []gensupport.JSONFloat64 `json:"values"` 1738 *NoMethod 1739 } 1740 s1.NoMethod = (*NoMethod)(s) 1741 if err := json.Unmarshal(data, &s1); err != nil { 1742 return err 1743 } 1744 s.Values = make([]float64, len(s1.Values)) 1745 for i := range s1.Values { 1746 s.Values[i] = float64(s1.Values[i]) 1747 } 1748 return nil 1749 } 1750 1751 // GoogleCloudContentwarehouseV1FloatTypeOptions: Configurations for a float 1752 // property. 1753 type GoogleCloudContentwarehouseV1FloatTypeOptions struct { 1754 } 1755 1756 // GoogleCloudContentwarehouseV1GcsIngestPipeline: The configuration of the 1757 // Cloud Storage Ingestion pipeline. 1758 type GoogleCloudContentwarehouseV1GcsIngestPipeline struct { 1759 // InputPath: The input Cloud Storage folder. All files under this folder will 1760 // be imported to Document Warehouse. Format: `gs:///`. 1761 InputPath string `json:"inputPath,omitempty"` 1762 // PipelineConfig: Optional. The config for the Cloud Storage Ingestion 1763 // pipeline. It provides additional customization options to run the pipeline 1764 // and can be skipped if it is not applicable. 1765 PipelineConfig *GoogleCloudContentwarehouseV1IngestPipelineConfig `json:"pipelineConfig,omitempty"` 1766 // ProcessorType: The Doc AI processor type name. Only used when the format of 1767 // ingested files is Doc AI Document proto format. 1768 ProcessorType string `json:"processorType,omitempty"` 1769 // SchemaName: The Document Warehouse schema resource name. All documents 1770 // processed by this pipeline will use this schema. Format: 1771 // projects/{project_number}/locations/{location}/documentSchemas/{document_sche 1772 // ma_id}. 1773 SchemaName string `json:"schemaName,omitempty"` 1774 // SkipIngestedDocuments: The flag whether to skip ingested documents. If it is 1775 // set to true, documents in Cloud Storage contains key "status" with value 1776 // "status=ingested" in custom metadata will be skipped to ingest. 1777 SkipIngestedDocuments bool `json:"skipIngestedDocuments,omitempty"` 1778 // ForceSendFields is a list of field names (e.g. "InputPath") to 1779 // unconditionally include in API requests. By default, fields with empty or 1780 // default values are omitted from API requests. See 1781 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1782 // details. 1783 ForceSendFields []string `json:"-"` 1784 // NullFields is a list of field names (e.g. "InputPath") to include in API 1785 // requests with the JSON null value. By default, fields with empty values are 1786 // omitted from API requests. See 1787 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1788 NullFields []string `json:"-"` 1789 } 1790 1791 func (s *GoogleCloudContentwarehouseV1GcsIngestPipeline) MarshalJSON() ([]byte, error) { 1792 type NoMethod GoogleCloudContentwarehouseV1GcsIngestPipeline 1793 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1794 } 1795 1796 // GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline: The 1797 // configuration of the Cloud Storage Ingestion with DocAI Processors pipeline. 1798 type GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline struct { 1799 // ExtractProcessorInfos: The extract processors information. One matched 1800 // extract processor will be used to process documents based on the classify 1801 // processor result. If no classify processor is specified, the first extract 1802 // processor will be used. 1803 ExtractProcessorInfos []*GoogleCloudContentwarehouseV1ProcessorInfo `json:"extractProcessorInfos,omitempty"` 1804 // InputPath: The input Cloud Storage folder. All files under this folder will 1805 // be imported to Document Warehouse. Format: `gs:///`. 1806 InputPath string `json:"inputPath,omitempty"` 1807 // PipelineConfig: Optional. The config for the Cloud Storage Ingestion with 1808 // DocAI Processors pipeline. It provides additional customization options to 1809 // run the pipeline and can be skipped if it is not applicable. 1810 PipelineConfig *GoogleCloudContentwarehouseV1IngestPipelineConfig `json:"pipelineConfig,omitempty"` 1811 // ProcessorResultsFolderPath: The Cloud Storage folder path used to store the 1812 // raw results from processors. Format: `gs:///`. 1813 ProcessorResultsFolderPath string `json:"processorResultsFolderPath,omitempty"` 1814 // SkipIngestedDocuments: The flag whether to skip ingested documents. If it is 1815 // set to true, documents in Cloud Storage contains key "status" with value 1816 // "status=ingested" in custom metadata will be skipped to ingest. 1817 SkipIngestedDocuments bool `json:"skipIngestedDocuments,omitempty"` 1818 // SplitClassifyProcessorInfo: The split and classify processor information. 1819 // The split and classify result will be used to find a matched extract 1820 // processor. 1821 SplitClassifyProcessorInfo *GoogleCloudContentwarehouseV1ProcessorInfo `json:"splitClassifyProcessorInfo,omitempty"` 1822 // ForceSendFields is a list of field names (e.g. "ExtractProcessorInfos") to 1823 // unconditionally include in API requests. By default, fields with empty or 1824 // default values are omitted from API requests. See 1825 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1826 // details. 1827 ForceSendFields []string `json:"-"` 1828 // NullFields is a list of field names (e.g. "ExtractProcessorInfos") to 1829 // include in API requests with the JSON null value. By default, fields with 1830 // empty values are omitted from API requests. See 1831 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1832 NullFields []string `json:"-"` 1833 } 1834 1835 func (s *GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline) MarshalJSON() ([]byte, error) { 1836 type NoMethod GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline 1837 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1838 } 1839 1840 // GoogleCloudContentwarehouseV1GetDocumentRequest: Request message for 1841 // DocumentService.GetDocument. 1842 type GoogleCloudContentwarehouseV1GetDocumentRequest struct { 1843 // RequestMetadata: The meta information collected about the end user, used to 1844 // enforce access control for the service. 1845 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 1846 // ForceSendFields is a list of field names (e.g. "RequestMetadata") to 1847 // unconditionally include in API requests. By default, fields with empty or 1848 // default values are omitted from API requests. See 1849 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1850 // details. 1851 ForceSendFields []string `json:"-"` 1852 // NullFields is a list of field names (e.g. "RequestMetadata") to include in 1853 // API requests with the JSON null value. By default, fields with empty values 1854 // are omitted from API requests. See 1855 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1856 NullFields []string `json:"-"` 1857 } 1858 1859 func (s *GoogleCloudContentwarehouseV1GetDocumentRequest) MarshalJSON() ([]byte, error) { 1860 type NoMethod GoogleCloudContentwarehouseV1GetDocumentRequest 1861 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1862 } 1863 1864 // GoogleCloudContentwarehouseV1HistogramQuery: The histogram request. 1865 type GoogleCloudContentwarehouseV1HistogramQuery struct { 1866 // Filters: Optional. Filter the result of histogram query by the property 1867 // names. It only works with histogram query count('FilterableProperties'). It 1868 // is an optional. It will perform histogram on all the property names for all 1869 // the document schemas. Setting this field will have a better performance. 1870 Filters *GoogleCloudContentwarehouseV1HistogramQueryPropertyNameFilter `json:"filters,omitempty"` 1871 // HistogramQuery: An expression specifies a histogram request against matching 1872 // documents for searches. See SearchDocumentsRequest.histogram_queries for 1873 // details about syntax. 1874 HistogramQuery string `json:"histogramQuery,omitempty"` 1875 // RequirePreciseResultSize: Controls if the histogram query requires the 1876 // return of a precise count. Enable this flag may adversely impact 1877 // performance. Defaults to true. 1878 RequirePreciseResultSize bool `json:"requirePreciseResultSize,omitempty"` 1879 // ForceSendFields is a list of field names (e.g. "Filters") to unconditionally 1880 // include in API requests. By default, fields with empty or default values are 1881 // omitted from API requests. See 1882 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1883 // details. 1884 ForceSendFields []string `json:"-"` 1885 // NullFields is a list of field names (e.g. "Filters") to include in API 1886 // requests with the JSON null value. By default, fields with empty values are 1887 // omitted from API requests. See 1888 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1889 NullFields []string `json:"-"` 1890 } 1891 1892 func (s *GoogleCloudContentwarehouseV1HistogramQuery) MarshalJSON() ([]byte, error) { 1893 type NoMethod GoogleCloudContentwarehouseV1HistogramQuery 1894 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1895 } 1896 1897 type GoogleCloudContentwarehouseV1HistogramQueryPropertyNameFilter struct { 1898 // DocumentSchemas: This filter specifies the exact document schema(s) 1899 // Document.document_schema_name to run histogram query against. It is 1900 // optional. It will perform histogram for property names for all the document 1901 // schemas if it is not set. At most 10 document schema names are allowed. 1902 // Format: 1903 // projects/{project_number}/locations/{location}/documentSchemas/{document_sche 1904 // ma_id}. 1905 DocumentSchemas []string `json:"documentSchemas,omitempty"` 1906 // PropertyNames: It is optional. It will perform histogram for all the 1907 // property names if it is not set. The properties need to be defined with the 1908 // is_filterable flag set to true and the name of the property should be in the 1909 // format: "schemaId.propertyName". The property needs to be defined in the 1910 // schema. Example: the schema id is abc. Then the name of property for 1911 // property MORTGAGE_TYPE will be "abc.MORTGAGE_TYPE". 1912 PropertyNames []string `json:"propertyNames,omitempty"` 1913 // YAxis: By default, the y_axis is HISTOGRAM_YAXIS_DOCUMENT if this field is 1914 // not set. 1915 // 1916 // Possible values: 1917 // "HISTOGRAM_YAXIS_DOCUMENT" - Count the documents per property name. 1918 // "HISTOGRAM_YAXIS_PROPERTY" - Count the properties per property name. 1919 YAxis string `json:"yAxis,omitempty"` 1920 // ForceSendFields is a list of field names (e.g. "DocumentSchemas") to 1921 // unconditionally include in API requests. By default, fields with empty or 1922 // default values are omitted from API requests. See 1923 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1924 // details. 1925 ForceSendFields []string `json:"-"` 1926 // NullFields is a list of field names (e.g. "DocumentSchemas") to include in 1927 // API requests with the JSON null value. By default, fields with empty values 1928 // are omitted from API requests. See 1929 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1930 NullFields []string `json:"-"` 1931 } 1932 1933 func (s *GoogleCloudContentwarehouseV1HistogramQueryPropertyNameFilter) MarshalJSON() ([]byte, error) { 1934 type NoMethod GoogleCloudContentwarehouseV1HistogramQueryPropertyNameFilter 1935 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1936 } 1937 1938 // GoogleCloudContentwarehouseV1HistogramQueryResult: Histogram result that 1939 // matches HistogramQuery specified in searches. 1940 type GoogleCloudContentwarehouseV1HistogramQueryResult struct { 1941 // Histogram: A map from the values of the facet associated with distinct 1942 // values to the number of matching entries with corresponding value. The key 1943 // format is: * (for string histogram) string values stored in the field. 1944 Histogram map[string]string `json:"histogram,omitempty"` 1945 // HistogramQuery: Requested histogram expression. 1946 HistogramQuery string `json:"histogramQuery,omitempty"` 1947 // ForceSendFields is a list of field names (e.g. "Histogram") to 1948 // unconditionally include in API requests. By default, fields with empty or 1949 // default values are omitted from API requests. See 1950 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1951 // details. 1952 ForceSendFields []string `json:"-"` 1953 // NullFields is a list of field names (e.g. "Histogram") to include in API 1954 // requests with the JSON null value. By default, fields with empty values are 1955 // omitted from API requests. See 1956 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1957 NullFields []string `json:"-"` 1958 } 1959 1960 func (s *GoogleCloudContentwarehouseV1HistogramQueryResult) MarshalJSON() ([]byte, error) { 1961 type NoMethod GoogleCloudContentwarehouseV1HistogramQueryResult 1962 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1963 } 1964 1965 // GoogleCloudContentwarehouseV1IngestPipelineConfig: The ingestion pipeline 1966 // config. 1967 type GoogleCloudContentwarehouseV1IngestPipelineConfig struct { 1968 // CloudFunction: The Cloud Function resource name. The Cloud Function needs to 1969 // live inside consumer project and is accessible to Document AI Warehouse 1970 // P4SA. Only Cloud Functions V2 is supported. Cloud function execution should 1971 // complete within 5 minutes or this file ingestion may fail due to timeout. 1972 // Format: `https://{region}-{project_id}.cloudfunctions.net/{cloud_function}` 1973 // The following keys are available the request json payload. * display_name * 1974 // properties * plain_text * reference_id * document_schema_name * 1975 // raw_document_path * raw_document_file_type The following keys from the cloud 1976 // function json response payload will be ingested to the Document AI Warehouse 1977 // as part of Document proto content and/or related information. The original 1978 // values will be overridden if any key is present in the response. * 1979 // display_name * properties * plain_text * document_acl_policy * folder 1980 CloudFunction string `json:"cloudFunction,omitempty"` 1981 // DocumentAclPolicy: The document level acl policy config. This refers to an 1982 // Identity and Access (IAM) policy, which specifies access controls for all 1983 // documents ingested by the pipeline. The role and members under the policy 1984 // needs to be specified. The following roles are supported for document level 1985 // acl control: * roles/contentwarehouse.documentAdmin * 1986 // roles/contentwarehouse.documentEditor * 1987 // roles/contentwarehouse.documentViewer The following members are supported 1988 // for document level acl control: * user:user-email@example.com * 1989 // group:group-email@example.com Note that for documents searched with LLM, 1990 // only single level user or group acl check is supported. 1991 DocumentAclPolicy *GoogleIamV1Policy `json:"documentAclPolicy,omitempty"` 1992 // EnableDocumentTextExtraction: The document text extraction enabled flag. If 1993 // the flag is set to true, DWH will perform text extraction on the raw 1994 // document. 1995 EnableDocumentTextExtraction bool `json:"enableDocumentTextExtraction,omitempty"` 1996 // Folder: Optional. The name of the folder to which all ingested documents 1997 // will be linked during ingestion process. Format is 1998 // `projects/{project}/locations/{location}/documents/{folder_id}` 1999 Folder string `json:"folder,omitempty"` 2000 // ForceSendFields is a list of field names (e.g. "CloudFunction") to 2001 // unconditionally include in API requests. By default, fields with empty or 2002 // default values are omitted from API requests. See 2003 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2004 // details. 2005 ForceSendFields []string `json:"-"` 2006 // NullFields is a list of field names (e.g. "CloudFunction") to include in API 2007 // requests with the JSON null value. By default, fields with empty values are 2008 // omitted from API requests. See 2009 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2010 NullFields []string `json:"-"` 2011 } 2012 2013 func (s *GoogleCloudContentwarehouseV1IngestPipelineConfig) MarshalJSON() ([]byte, error) { 2014 type NoMethod GoogleCloudContentwarehouseV1IngestPipelineConfig 2015 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2016 } 2017 2018 // GoogleCloudContentwarehouseV1InitializeProjectRequest: Request message for 2019 // projectService.InitializeProject 2020 type GoogleCloudContentwarehouseV1InitializeProjectRequest struct { 2021 // AccessControlMode: Required. The access control mode for accessing the 2022 // customer data 2023 // 2024 // Possible values: 2025 // "ACL_MODE_UNKNOWN" - This value is required by protobuf best practices 2026 // "ACL_MODE_UNIVERSAL_ACCESS" - Universal Access: No document level access 2027 // control. 2028 // "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_BYOID" - Document level access 2029 // control with customer own Identity Service. 2030 // "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_GCI" - Document level access 2031 // control using Google Cloud Identity. 2032 AccessControlMode string `json:"accessControlMode,omitempty"` 2033 // DatabaseType: Required. The type of database used to store customer data 2034 // 2035 // Possible values: 2036 // "DB_UNKNOWN" - This value is required by protobuf best practices 2037 // "DB_INFRA_SPANNER" - Internal Spanner 2038 // "DB_CLOUD_SQL_POSTGRES" - Cloud Sql with a Postgres Sql instance 2039 DatabaseType string `json:"databaseType,omitempty"` 2040 // DocumentCreatorDefaultRole: Optional. The default role for the person who 2041 // create a document. 2042 // 2043 // Possible values: 2044 // "DOCUMENT_CREATOR_DEFAULT_ROLE_UNSPECIFIED" - Unspecified, will be default 2045 // to document admin role. 2046 // "DOCUMENT_ADMIN" - Document Admin, same as 2047 // contentwarehouse.googleapis.com/documentAdmin. 2048 // "DOCUMENT_EDITOR" - Document Editor, same as 2049 // contentwarehouse.googleapis.com/documentEditor. 2050 // "DOCUMENT_VIEWER" - Document Viewer, same as 2051 // contentwarehouse.googleapis.com/documentViewer. 2052 DocumentCreatorDefaultRole string `json:"documentCreatorDefaultRole,omitempty"` 2053 // EnableCalUserEmailLogging: Optional. Whether to enable CAL user email 2054 // logging. 2055 EnableCalUserEmailLogging bool `json:"enableCalUserEmailLogging,omitempty"` 2056 // KmsKey: Optional. The KMS key used for CMEK encryption. It is required that 2057 // the kms key is in the same region as the endpoint. The same key will be used 2058 // for all provisioned resources, if encryption is available. If the kms_key is 2059 // left empty, no encryption will be enforced. 2060 KmsKey string `json:"kmsKey,omitempty"` 2061 // ForceSendFields is a list of field names (e.g. "AccessControlMode") to 2062 // unconditionally include in API requests. By default, fields with empty or 2063 // default values are omitted from API requests. See 2064 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2065 // details. 2066 ForceSendFields []string `json:"-"` 2067 // NullFields is a list of field names (e.g. "AccessControlMode") to include in 2068 // API requests with the JSON null value. By default, fields with empty values 2069 // are omitted from API requests. See 2070 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2071 NullFields []string `json:"-"` 2072 } 2073 2074 func (s *GoogleCloudContentwarehouseV1InitializeProjectRequest) MarshalJSON() ([]byte, error) { 2075 type NoMethod GoogleCloudContentwarehouseV1InitializeProjectRequest 2076 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2077 } 2078 2079 // GoogleCloudContentwarehouseV1InitializeProjectResponse: Response message for 2080 // projectService.InitializeProject 2081 type GoogleCloudContentwarehouseV1InitializeProjectResponse struct { 2082 // Message: The message of the project initialization process. 2083 Message string `json:"message,omitempty"` 2084 // State: The state of the project initialization process. 2085 // 2086 // Possible values: 2087 // "STATE_UNSPECIFIED" - Clients should never see this. 2088 // "SUCCEEDED" - Finished project initialization without error. 2089 // "FAILED" - Finished project initialization with an error. 2090 // "CANCELLED" - Client canceled the LRO. 2091 // "RUNNING" - Ask the customer to check the operation for results. 2092 State string `json:"state,omitempty"` 2093 // ForceSendFields is a list of field names (e.g. "Message") to unconditionally 2094 // include in API requests. By default, fields with empty or default values are 2095 // omitted from API requests. See 2096 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2097 // details. 2098 ForceSendFields []string `json:"-"` 2099 // NullFields is a list of field names (e.g. "Message") to include in API 2100 // requests with the JSON null value. By default, fields with empty values are 2101 // omitted from API requests. See 2102 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2103 NullFields []string `json:"-"` 2104 } 2105 2106 func (s *GoogleCloudContentwarehouseV1InitializeProjectResponse) MarshalJSON() ([]byte, error) { 2107 type NoMethod GoogleCloudContentwarehouseV1InitializeProjectResponse 2108 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2109 } 2110 2111 // GoogleCloudContentwarehouseV1IntegerArray: Integer values. 2112 type GoogleCloudContentwarehouseV1IntegerArray struct { 2113 // Values: List of integer values. 2114 Values []int64 `json:"values,omitempty"` 2115 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 2116 // include in API requests. By default, fields with empty or default values are 2117 // omitted from API requests. See 2118 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2119 // details. 2120 ForceSendFields []string `json:"-"` 2121 // NullFields is a list of field names (e.g. "Values") to include in API 2122 // requests with the JSON null value. By default, fields with empty values are 2123 // omitted from API requests. See 2124 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2125 NullFields []string `json:"-"` 2126 } 2127 2128 func (s *GoogleCloudContentwarehouseV1IntegerArray) MarshalJSON() ([]byte, error) { 2129 type NoMethod GoogleCloudContentwarehouseV1IntegerArray 2130 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2131 } 2132 2133 // GoogleCloudContentwarehouseV1IntegerTypeOptions: Configurations for an 2134 // integer property. 2135 type GoogleCloudContentwarehouseV1IntegerTypeOptions struct { 2136 } 2137 2138 // GoogleCloudContentwarehouseV1InvalidRule: A triggered rule that failed the 2139 // validation check(s) after parsing. 2140 type GoogleCloudContentwarehouseV1InvalidRule struct { 2141 // Error: Validation error on a parsed expression. 2142 Error string `json:"error,omitempty"` 2143 // Rule: Triggered rule. 2144 Rule *GoogleCloudContentwarehouseV1Rule `json:"rule,omitempty"` 2145 // ForceSendFields is a list of field names (e.g. "Error") to unconditionally 2146 // include in API requests. By default, fields with empty or default values are 2147 // omitted from API requests. See 2148 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2149 // details. 2150 ForceSendFields []string `json:"-"` 2151 // NullFields is a list of field names (e.g. "Error") to include in API 2152 // requests with the JSON null value. By default, fields with empty values are 2153 // omitted from API requests. See 2154 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2155 NullFields []string `json:"-"` 2156 } 2157 2158 func (s *GoogleCloudContentwarehouseV1InvalidRule) MarshalJSON() ([]byte, error) { 2159 type NoMethod GoogleCloudContentwarehouseV1InvalidRule 2160 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2161 } 2162 2163 // GoogleCloudContentwarehouseV1ListDocumentSchemasResponse: Response message 2164 // for DocumentSchemaService.ListDocumentSchemas. 2165 type GoogleCloudContentwarehouseV1ListDocumentSchemasResponse struct { 2166 // DocumentSchemas: The document schemas from the specified parent. 2167 DocumentSchemas []*GoogleCloudContentwarehouseV1DocumentSchema `json:"documentSchemas,omitempty"` 2168 // NextPageToken: A token, which can be sent as `page_token` to retrieve the 2169 // next page. If this field is omitted, there are no subsequent pages. 2170 NextPageToken string `json:"nextPageToken,omitempty"` 2171 2172 // ServerResponse contains the HTTP response code and headers from the server. 2173 googleapi.ServerResponse `json:"-"` 2174 // ForceSendFields is a list of field names (e.g. "DocumentSchemas") to 2175 // unconditionally include in API requests. By default, fields with empty or 2176 // default values are omitted from API requests. See 2177 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2178 // details. 2179 ForceSendFields []string `json:"-"` 2180 // NullFields is a list of field names (e.g. "DocumentSchemas") to include in 2181 // API requests with the JSON null value. By default, fields with empty values 2182 // are omitted from API requests. See 2183 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2184 NullFields []string `json:"-"` 2185 } 2186 2187 func (s *GoogleCloudContentwarehouseV1ListDocumentSchemasResponse) MarshalJSON() ([]byte, error) { 2188 type NoMethod GoogleCloudContentwarehouseV1ListDocumentSchemasResponse 2189 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2190 } 2191 2192 // GoogleCloudContentwarehouseV1ListLinkedSourcesRequest: Response message for 2193 // DocumentLinkService.ListLinkedSources. 2194 type GoogleCloudContentwarehouseV1ListLinkedSourcesRequest struct { 2195 // PageSize: The maximum number of document-links to return. The service may 2196 // return fewer than this value. If unspecified, at most 50 document-links will 2197 // be returned. The maximum value is 1000; values above 1000 will be coerced to 2198 // 1000. 2199 PageSize int64 `json:"pageSize,omitempty"` 2200 // PageToken: A page token, received from a previous `ListLinkedSources` call. 2201 // Provide this to retrieve the subsequent page. When paginating, all other 2202 // parameters provided to `ListLinkedSources` must match the call that provided 2203 // the page token. 2204 PageToken string `json:"pageToken,omitempty"` 2205 // RequestMetadata: The meta information collected about the document creator, 2206 // used to enforce access control for the service. 2207 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 2208 // ForceSendFields is a list of field names (e.g. "PageSize") to 2209 // unconditionally include in API requests. By default, fields with empty or 2210 // default values are omitted from API requests. See 2211 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2212 // details. 2213 ForceSendFields []string `json:"-"` 2214 // NullFields is a list of field names (e.g. "PageSize") to include in API 2215 // requests with the JSON null value. By default, fields with empty values are 2216 // omitted from API requests. See 2217 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2218 NullFields []string `json:"-"` 2219 } 2220 2221 func (s *GoogleCloudContentwarehouseV1ListLinkedSourcesRequest) MarshalJSON() ([]byte, error) { 2222 type NoMethod GoogleCloudContentwarehouseV1ListLinkedSourcesRequest 2223 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2224 } 2225 2226 // GoogleCloudContentwarehouseV1ListLinkedSourcesResponse: Response message for 2227 // DocumentLinkService.ListLinkedSources. 2228 type GoogleCloudContentwarehouseV1ListLinkedSourcesResponse struct { 2229 // DocumentLinks: Source document-links. 2230 DocumentLinks []*GoogleCloudContentwarehouseV1DocumentLink `json:"documentLinks,omitempty"` 2231 // NextPageToken: A token, which can be sent as `page_token` to retrieve the 2232 // next page. If this field is omitted, there are no subsequent pages. 2233 NextPageToken string `json:"nextPageToken,omitempty"` 2234 2235 // ServerResponse contains the HTTP response code and headers from the server. 2236 googleapi.ServerResponse `json:"-"` 2237 // ForceSendFields is a list of field names (e.g. "DocumentLinks") to 2238 // unconditionally include in API requests. By default, fields with empty or 2239 // default values are omitted from API requests. See 2240 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2241 // details. 2242 ForceSendFields []string `json:"-"` 2243 // NullFields is a list of field names (e.g. "DocumentLinks") to include in API 2244 // requests with the JSON null value. By default, fields with empty values are 2245 // omitted from API requests. See 2246 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2247 NullFields []string `json:"-"` 2248 } 2249 2250 func (s *GoogleCloudContentwarehouseV1ListLinkedSourcesResponse) MarshalJSON() ([]byte, error) { 2251 type NoMethod GoogleCloudContentwarehouseV1ListLinkedSourcesResponse 2252 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2253 } 2254 2255 // GoogleCloudContentwarehouseV1ListLinkedTargetsRequest: Request message for 2256 // DocumentLinkService.ListLinkedTargets. 2257 type GoogleCloudContentwarehouseV1ListLinkedTargetsRequest struct { 2258 // RequestMetadata: The meta information collected about the document creator, 2259 // used to enforce access control for the service. 2260 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 2261 // ForceSendFields is a list of field names (e.g. "RequestMetadata") to 2262 // unconditionally include in API requests. By default, fields with empty or 2263 // default values are omitted from API requests. See 2264 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2265 // details. 2266 ForceSendFields []string `json:"-"` 2267 // NullFields is a list of field names (e.g. "RequestMetadata") to include in 2268 // API requests with the JSON null value. By default, fields with empty values 2269 // are omitted from API requests. See 2270 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2271 NullFields []string `json:"-"` 2272 } 2273 2274 func (s *GoogleCloudContentwarehouseV1ListLinkedTargetsRequest) MarshalJSON() ([]byte, error) { 2275 type NoMethod GoogleCloudContentwarehouseV1ListLinkedTargetsRequest 2276 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2277 } 2278 2279 // GoogleCloudContentwarehouseV1ListLinkedTargetsResponse: Response message for 2280 // DocumentLinkService.ListLinkedTargets. 2281 type GoogleCloudContentwarehouseV1ListLinkedTargetsResponse struct { 2282 // DocumentLinks: Target document-links. 2283 DocumentLinks []*GoogleCloudContentwarehouseV1DocumentLink `json:"documentLinks,omitempty"` 2284 // NextPageToken: A token, which can be sent as `page_token` to retrieve the 2285 // next page. If this field is omitted, there are no subsequent pages. 2286 NextPageToken string `json:"nextPageToken,omitempty"` 2287 2288 // ServerResponse contains the HTTP response code and headers from the server. 2289 googleapi.ServerResponse `json:"-"` 2290 // ForceSendFields is a list of field names (e.g. "DocumentLinks") to 2291 // unconditionally include in API requests. By default, fields with empty or 2292 // default values are omitted from API requests. See 2293 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2294 // details. 2295 ForceSendFields []string `json:"-"` 2296 // NullFields is a list of field names (e.g. "DocumentLinks") to include in API 2297 // requests with the JSON null value. By default, fields with empty values are 2298 // omitted from API requests. See 2299 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2300 NullFields []string `json:"-"` 2301 } 2302 2303 func (s *GoogleCloudContentwarehouseV1ListLinkedTargetsResponse) MarshalJSON() ([]byte, error) { 2304 type NoMethod GoogleCloudContentwarehouseV1ListLinkedTargetsResponse 2305 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2306 } 2307 2308 // GoogleCloudContentwarehouseV1ListRuleSetsResponse: Response message for 2309 // RuleSetService.ListRuleSets. 2310 type GoogleCloudContentwarehouseV1ListRuleSetsResponse struct { 2311 // NextPageToken: A token, which can be sent as `page_token` to retrieve the 2312 // next page. If this field is omitted, there are no subsequent pages. 2313 NextPageToken string `json:"nextPageToken,omitempty"` 2314 // RuleSets: The rule sets from the specified parent. 2315 RuleSets []*GoogleCloudContentwarehouseV1RuleSet `json:"ruleSets,omitempty"` 2316 2317 // ServerResponse contains the HTTP response code and headers from the server. 2318 googleapi.ServerResponse `json:"-"` 2319 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2320 // unconditionally include in API requests. By default, fields with empty or 2321 // default values are omitted from API requests. See 2322 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2323 // details. 2324 ForceSendFields []string `json:"-"` 2325 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 2326 // requests with the JSON null value. By default, fields with empty values are 2327 // omitted from API requests. See 2328 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2329 NullFields []string `json:"-"` 2330 } 2331 2332 func (s *GoogleCloudContentwarehouseV1ListRuleSetsResponse) MarshalJSON() ([]byte, error) { 2333 type NoMethod GoogleCloudContentwarehouseV1ListRuleSetsResponse 2334 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2335 } 2336 2337 // GoogleCloudContentwarehouseV1ListSynonymSetsResponse: Response message for 2338 // SynonymSetService.ListSynonymSets. 2339 type GoogleCloudContentwarehouseV1ListSynonymSetsResponse struct { 2340 // NextPageToken: A page token, received from a previous `ListSynonymSets` 2341 // call. Provide this to retrieve the subsequent page. 2342 NextPageToken string `json:"nextPageToken,omitempty"` 2343 // SynonymSets: The synonymSets from the specified parent. 2344 SynonymSets []*GoogleCloudContentwarehouseV1SynonymSet `json:"synonymSets,omitempty"` 2345 2346 // ServerResponse contains the HTTP response code and headers from the server. 2347 googleapi.ServerResponse `json:"-"` 2348 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 2349 // unconditionally include in API requests. By default, fields with empty or 2350 // default values are omitted from API requests. See 2351 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2352 // details. 2353 ForceSendFields []string `json:"-"` 2354 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 2355 // requests with the JSON null value. By default, fields with empty values are 2356 // omitted from API requests. See 2357 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2358 NullFields []string `json:"-"` 2359 } 2360 2361 func (s *GoogleCloudContentwarehouseV1ListSynonymSetsResponse) MarshalJSON() ([]byte, error) { 2362 type NoMethod GoogleCloudContentwarehouseV1ListSynonymSetsResponse 2363 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2364 } 2365 2366 // GoogleCloudContentwarehouseV1LockDocumentRequest: Request message for 2367 // DocumentService.LockDocument. 2368 type GoogleCloudContentwarehouseV1LockDocumentRequest struct { 2369 // CollectionId: The collection the document connects to. 2370 CollectionId string `json:"collectionId,omitempty"` 2371 // LockingUser: The user information who locks the document. 2372 LockingUser *GoogleCloudContentwarehouseV1UserInfo `json:"lockingUser,omitempty"` 2373 // ForceSendFields is a list of field names (e.g. "CollectionId") to 2374 // unconditionally include in API requests. By default, fields with empty or 2375 // default values are omitted from API requests. See 2376 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2377 // details. 2378 ForceSendFields []string `json:"-"` 2379 // NullFields is a list of field names (e.g. "CollectionId") to include in API 2380 // requests with the JSON null value. By default, fields with empty values are 2381 // omitted from API requests. See 2382 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2383 NullFields []string `json:"-"` 2384 } 2385 2386 func (s *GoogleCloudContentwarehouseV1LockDocumentRequest) MarshalJSON() ([]byte, error) { 2387 type NoMethod GoogleCloudContentwarehouseV1LockDocumentRequest 2388 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2389 } 2390 2391 // GoogleCloudContentwarehouseV1MapProperty: Map property value. Represents a 2392 // structured entries of key value pairs, consisting of field names which map 2393 // to dynamically typed values. 2394 type GoogleCloudContentwarehouseV1MapProperty struct { 2395 // Fields: Unordered map of dynamically typed values. 2396 Fields map[string]GoogleCloudContentwarehouseV1Value `json:"fields,omitempty"` 2397 // ForceSendFields is a list of field names (e.g. "Fields") to unconditionally 2398 // include in API requests. By default, fields with empty or default values are 2399 // omitted from API requests. See 2400 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2401 // details. 2402 ForceSendFields []string `json:"-"` 2403 // NullFields is a list of field names (e.g. "Fields") to include in API 2404 // requests with the JSON null value. By default, fields with empty values are 2405 // omitted from API requests. See 2406 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2407 NullFields []string `json:"-"` 2408 } 2409 2410 func (s *GoogleCloudContentwarehouseV1MapProperty) MarshalJSON() ([]byte, error) { 2411 type NoMethod GoogleCloudContentwarehouseV1MapProperty 2412 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2413 } 2414 2415 // GoogleCloudContentwarehouseV1MapTypeOptions: Configurations for a Map 2416 // property. 2417 type GoogleCloudContentwarehouseV1MapTypeOptions struct { 2418 } 2419 2420 // GoogleCloudContentwarehouseV1MergeFieldsOptions: Options for merging updated 2421 // fields. 2422 type GoogleCloudContentwarehouseV1MergeFieldsOptions struct { 2423 // ReplaceMessageFields: When merging message fields, the default behavior is 2424 // to merge the content of two message fields together. If you instead want to 2425 // use the field from the source message to replace the corresponding field in 2426 // the destination message, set this flag to true. When this flag is set, 2427 // specified submessage fields that are missing in source will be cleared in 2428 // destination. 2429 ReplaceMessageFields bool `json:"replaceMessageFields,omitempty"` 2430 // ReplaceRepeatedFields: When merging repeated fields, the default behavior is 2431 // to append entries from the source repeated field to the destination repeated 2432 // field. If you instead want to keep only the entries from the source repeated 2433 // field, set this flag to true. If you want to replace a repeated field within 2434 // a message field on the destination message, you must set both 2435 // replace_repeated_fields and replace_message_fields to true, otherwise the 2436 // repeated fields will be appended. 2437 ReplaceRepeatedFields bool `json:"replaceRepeatedFields,omitempty"` 2438 // ForceSendFields is a list of field names (e.g. "ReplaceMessageFields") to 2439 // unconditionally include in API requests. By default, fields with empty or 2440 // default values are omitted from API requests. See 2441 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2442 // details. 2443 ForceSendFields []string `json:"-"` 2444 // NullFields is a list of field names (e.g. "ReplaceMessageFields") to include 2445 // in API requests with the JSON null value. By default, fields with empty 2446 // values are omitted from API requests. See 2447 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2448 NullFields []string `json:"-"` 2449 } 2450 2451 func (s *GoogleCloudContentwarehouseV1MergeFieldsOptions) MarshalJSON() ([]byte, error) { 2452 type NoMethod GoogleCloudContentwarehouseV1MergeFieldsOptions 2453 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2454 } 2455 2456 // GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline: The configuration of 2457 // processing documents in Document Warehouse with DocAi processors pipeline. 2458 type GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline struct { 2459 // Documents: The list of all the resource names of the documents to be 2460 // processed. Format: 2461 // projects/{project_number}/locations/{location}/documents/{document_id}. 2462 Documents []string `json:"documents,omitempty"` 2463 // ExportFolderPath: The Cloud Storage folder path used to store the exported 2464 // documents before being sent to CDW. Format: `gs:///`. 2465 ExportFolderPath string `json:"exportFolderPath,omitempty"` 2466 // ProcessorInfo: The CDW processor information. 2467 ProcessorInfo *GoogleCloudContentwarehouseV1ProcessorInfo `json:"processorInfo,omitempty"` 2468 // ProcessorResultsFolderPath: The Cloud Storage folder path used to store the 2469 // raw results from processors. Format: `gs:///`. 2470 ProcessorResultsFolderPath string `json:"processorResultsFolderPath,omitempty"` 2471 // ForceSendFields is a list of field names (e.g. "Documents") to 2472 // unconditionally include in API requests. By default, fields with empty or 2473 // default values are omitted from API requests. See 2474 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2475 // details. 2476 ForceSendFields []string `json:"-"` 2477 // NullFields is a list of field names (e.g. "Documents") to include in API 2478 // requests with the JSON null value. By default, fields with empty values are 2479 // omitted from API requests. See 2480 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2481 NullFields []string `json:"-"` 2482 } 2483 2484 func (s *GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline) MarshalJSON() ([]byte, error) { 2485 type NoMethod GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline 2486 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2487 } 2488 2489 // GoogleCloudContentwarehouseV1ProcessorInfo: The DocAI processor information. 2490 type GoogleCloudContentwarehouseV1ProcessorInfo struct { 2491 // DocumentType: The processor will process the documents with this document 2492 // type. 2493 DocumentType string `json:"documentType,omitempty"` 2494 // ProcessorName: The processor resource name. Format is 2495 // `projects/{project}/locations/{location}/processors/{processor}`, or 2496 // `projects/{project}/locations/{location}/processors/{processor}/processorVers 2497 // ions/{processorVersion}` 2498 ProcessorName string `json:"processorName,omitempty"` 2499 // SchemaName: The Document schema resource name. All documents processed by 2500 // this processor will use this schema. Format: 2501 // projects/{project_number}/locations/{location}/documentSchemas/{document_sche 2502 // ma_id}. 2503 SchemaName string `json:"schemaName,omitempty"` 2504 // ForceSendFields is a list of field names (e.g. "DocumentType") to 2505 // unconditionally include in API requests. By default, fields with empty or 2506 // default values are omitted from API requests. See 2507 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2508 // details. 2509 ForceSendFields []string `json:"-"` 2510 // NullFields is a list of field names (e.g. "DocumentType") to include in API 2511 // requests with the JSON null value. By default, fields with empty values are 2512 // omitted from API requests. See 2513 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2514 NullFields []string `json:"-"` 2515 } 2516 2517 func (s *GoogleCloudContentwarehouseV1ProcessorInfo) MarshalJSON() ([]byte, error) { 2518 type NoMethod GoogleCloudContentwarehouseV1ProcessorInfo 2519 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2520 } 2521 2522 // GoogleCloudContentwarehouseV1ProjectStatus: Status of a project, including 2523 // the project state, dbType, aclMode and etc. 2524 type GoogleCloudContentwarehouseV1ProjectStatus struct { 2525 // AccessControlMode: Access control mode. 2526 // 2527 // Possible values: 2528 // "ACL_MODE_UNKNOWN" - This value is required by protobuf best practices 2529 // "ACL_MODE_UNIVERSAL_ACCESS" - Universal Access: No document level access 2530 // control. 2531 // "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_BYOID" - Document level access 2532 // control with customer own Identity Service. 2533 // "ACL_MODE_DOCUMENT_LEVEL_ACCESS_CONTROL_GCI" - Document level access 2534 // control using Google Cloud Identity. 2535 AccessControlMode string `json:"accessControlMode,omitempty"` 2536 // DatabaseType: Database type. 2537 // 2538 // Possible values: 2539 // "DB_UNKNOWN" - This value is required by protobuf best practices 2540 // "DB_INFRA_SPANNER" - Internal Spanner 2541 // "DB_CLOUD_SQL_POSTGRES" - Cloud Sql with a Postgres Sql instance 2542 DatabaseType string `json:"databaseType,omitempty"` 2543 // DocumentCreatorDefaultRole: The default role for the person who create a 2544 // document. 2545 DocumentCreatorDefaultRole string `json:"documentCreatorDefaultRole,omitempty"` 2546 // Location: The location of the queried project. 2547 Location string `json:"location,omitempty"` 2548 // QaEnabled: If the qa is enabled on this project. 2549 QaEnabled bool `json:"qaEnabled,omitempty"` 2550 // State: State of the project. 2551 // 2552 // Possible values: 2553 // "PROJECT_STATE_UNSPECIFIED" - Default status, required by protobuf best 2554 // practices. 2555 // "PROJECT_STATE_PENDING" - The project is in the middle of a provision 2556 // process. 2557 // "PROJECT_STATE_COMPLETED" - All dependencies have been provisioned. 2558 // "PROJECT_STATE_FAILED" - A provision process was previously initiated, but 2559 // failed. 2560 // "PROJECT_STATE_DELETING" - The project is in the middle of a deletion 2561 // process. 2562 // "PROJECT_STATE_DELETING_FAILED" - A deleting process was initiated, but 2563 // failed. 2564 // "PROJECT_STATE_DELETED" - The project is deleted. 2565 // "PROJECT_STATE_NOT_FOUND" - The project is not found. 2566 State string `json:"state,omitempty"` 2567 2568 // ServerResponse contains the HTTP response code and headers from the server. 2569 googleapi.ServerResponse `json:"-"` 2570 // ForceSendFields is a list of field names (e.g. "AccessControlMode") to 2571 // unconditionally include in API requests. By default, fields with empty or 2572 // default values are omitted from API requests. See 2573 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2574 // details. 2575 ForceSendFields []string `json:"-"` 2576 // NullFields is a list of field names (e.g. "AccessControlMode") to include in 2577 // API requests with the JSON null value. By default, fields with empty values 2578 // are omitted from API requests. See 2579 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2580 NullFields []string `json:"-"` 2581 } 2582 2583 func (s *GoogleCloudContentwarehouseV1ProjectStatus) MarshalJSON() ([]byte, error) { 2584 type NoMethod GoogleCloudContentwarehouseV1ProjectStatus 2585 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2586 } 2587 2588 // GoogleCloudContentwarehouseV1Property: Property of a document. 2589 type GoogleCloudContentwarehouseV1Property struct { 2590 // DateTimeValues: Date time property values. It is not supported by CMEK 2591 // compliant deployment. 2592 DateTimeValues *GoogleCloudContentwarehouseV1DateTimeArray `json:"dateTimeValues,omitempty"` 2593 // EnumValues: Enum property values. 2594 EnumValues *GoogleCloudContentwarehouseV1EnumArray `json:"enumValues,omitempty"` 2595 // FloatValues: Float property values. 2596 FloatValues *GoogleCloudContentwarehouseV1FloatArray `json:"floatValues,omitempty"` 2597 // IntegerValues: Integer property values. 2598 IntegerValues *GoogleCloudContentwarehouseV1IntegerArray `json:"integerValues,omitempty"` 2599 // MapProperty: Map property values. 2600 MapProperty *GoogleCloudContentwarehouseV1MapProperty `json:"mapProperty,omitempty"` 2601 // Name: Required. Must match the name of a PropertyDefinition in the 2602 // DocumentSchema. 2603 Name string `json:"name,omitempty"` 2604 // PropertyValues: Nested structured data property values. 2605 PropertyValues *GoogleCloudContentwarehouseV1PropertyArray `json:"propertyValues,omitempty"` 2606 // TextValues: String/text property values. 2607 TextValues *GoogleCloudContentwarehouseV1TextArray `json:"textValues,omitempty"` 2608 // TimestampValues: Timestamp property values. It is not supported by CMEK 2609 // compliant deployment. 2610 TimestampValues *GoogleCloudContentwarehouseV1TimestampArray `json:"timestampValues,omitempty"` 2611 // ForceSendFields is a list of field names (e.g. "DateTimeValues") to 2612 // unconditionally include in API requests. By default, fields with empty or 2613 // default values are omitted from API requests. See 2614 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2615 // details. 2616 ForceSendFields []string `json:"-"` 2617 // NullFields is a list of field names (e.g. "DateTimeValues") to include in 2618 // API requests with the JSON null value. By default, fields with empty values 2619 // are omitted from API requests. See 2620 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2621 NullFields []string `json:"-"` 2622 } 2623 2624 func (s *GoogleCloudContentwarehouseV1Property) MarshalJSON() ([]byte, error) { 2625 type NoMethod GoogleCloudContentwarehouseV1Property 2626 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2627 } 2628 2629 // GoogleCloudContentwarehouseV1PropertyArray: Property values. 2630 type GoogleCloudContentwarehouseV1PropertyArray struct { 2631 // Properties: List of property values. 2632 Properties []*GoogleCloudContentwarehouseV1Property `json:"properties,omitempty"` 2633 // ForceSendFields is a list of field names (e.g. "Properties") to 2634 // unconditionally include in API requests. By default, fields with empty or 2635 // default values are omitted from API requests. See 2636 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2637 // details. 2638 ForceSendFields []string `json:"-"` 2639 // NullFields is a list of field names (e.g. "Properties") to include in API 2640 // requests with the JSON null value. By default, fields with empty values are 2641 // omitted from API requests. See 2642 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2643 NullFields []string `json:"-"` 2644 } 2645 2646 func (s *GoogleCloudContentwarehouseV1PropertyArray) MarshalJSON() ([]byte, error) { 2647 type NoMethod GoogleCloudContentwarehouseV1PropertyArray 2648 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2649 } 2650 2651 // GoogleCloudContentwarehouseV1PropertyDefinition: Defines the metadata for a 2652 // schema property. 2653 type GoogleCloudContentwarehouseV1PropertyDefinition struct { 2654 // DateTimeTypeOptions: Date time property. It is not supported by CMEK 2655 // compliant deployment. 2656 DateTimeTypeOptions *GoogleCloudContentwarehouseV1DateTimeTypeOptions `json:"dateTimeTypeOptions,omitempty"` 2657 // DisplayName: The display-name for the property, used for front-end. 2658 DisplayName string `json:"displayName,omitempty"` 2659 // EnumTypeOptions: Enum/categorical property. 2660 EnumTypeOptions *GoogleCloudContentwarehouseV1EnumTypeOptions `json:"enumTypeOptions,omitempty"` 2661 // FloatTypeOptions: Float property. 2662 FloatTypeOptions *GoogleCloudContentwarehouseV1FloatTypeOptions `json:"floatTypeOptions,omitempty"` 2663 // IntegerTypeOptions: Integer property. 2664 IntegerTypeOptions *GoogleCloudContentwarehouseV1IntegerTypeOptions `json:"integerTypeOptions,omitempty"` 2665 // IsFilterable: Whether the property can be filtered. If this is a 2666 // sub-property, all the parent properties must be marked filterable. 2667 IsFilterable bool `json:"isFilterable,omitempty"` 2668 // IsMetadata: Whether the property is user supplied metadata. This out-of-the 2669 // box placeholder setting can be used to tag derived properties. Its value and 2670 // interpretation logic should be implemented by API user. 2671 IsMetadata bool `json:"isMetadata,omitempty"` 2672 // IsRepeatable: Whether the property can have multiple values. 2673 IsRepeatable bool `json:"isRepeatable,omitempty"` 2674 // IsRequired: Whether the property is mandatory. Default is 'false', i.e. 2675 // populating property value can be skipped. If 'true' then user must populate 2676 // the value for this property. 2677 IsRequired bool `json:"isRequired,omitempty"` 2678 // IsSearchable: Indicates that the property should be included in a global 2679 // search. 2680 IsSearchable bool `json:"isSearchable,omitempty"` 2681 // MapTypeOptions: Map property. 2682 MapTypeOptions *GoogleCloudContentwarehouseV1MapTypeOptions `json:"mapTypeOptions,omitempty"` 2683 // Name: Required. The name of the metadata property. Must be unique within a 2684 // document schema and is case insensitive. Names must be non-blank, start with 2685 // a letter, and can contain alphanumeric characters and: /, :, -, _, and . 2686 Name string `json:"name,omitempty"` 2687 // PropertyTypeOptions: Nested structured data property. 2688 PropertyTypeOptions *GoogleCloudContentwarehouseV1PropertyTypeOptions `json:"propertyTypeOptions,omitempty"` 2689 // RetrievalImportance: The retrieval importance of the property during search. 2690 // 2691 // Possible values: 2692 // "RETRIEVAL_IMPORTANCE_UNSPECIFIED" - No importance specified. Default 2693 // medium importance. 2694 // "HIGHEST" - Highest importance. 2695 // "HIGHER" - Higher importance. 2696 // "HIGH" - High importance. 2697 // "MEDIUM" - Medium importance. 2698 // "LOW" - Low importance (negative). 2699 // "LOWEST" - Lowest importance (negative). 2700 RetrievalImportance string `json:"retrievalImportance,omitempty"` 2701 // SchemaSources: The mapping information between this property to another 2702 // schema source. 2703 SchemaSources []*GoogleCloudContentwarehouseV1PropertyDefinitionSchemaSource `json:"schemaSources,omitempty"` 2704 // TextTypeOptions: Text/string property. 2705 TextTypeOptions *GoogleCloudContentwarehouseV1TextTypeOptions `json:"textTypeOptions,omitempty"` 2706 // TimestampTypeOptions: Timestamp property. It is not supported by CMEK 2707 // compliant deployment. 2708 TimestampTypeOptions *GoogleCloudContentwarehouseV1TimestampTypeOptions `json:"timestampTypeOptions,omitempty"` 2709 // ForceSendFields is a list of field names (e.g. "DateTimeTypeOptions") to 2710 // unconditionally include in API requests. By default, fields with empty or 2711 // default values are omitted from API requests. See 2712 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2713 // details. 2714 ForceSendFields []string `json:"-"` 2715 // NullFields is a list of field names (e.g. "DateTimeTypeOptions") to include 2716 // in API requests with the JSON null value. By default, fields with empty 2717 // values are omitted from API requests. See 2718 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2719 NullFields []string `json:"-"` 2720 } 2721 2722 func (s *GoogleCloudContentwarehouseV1PropertyDefinition) MarshalJSON() ([]byte, error) { 2723 type NoMethod GoogleCloudContentwarehouseV1PropertyDefinition 2724 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2725 } 2726 2727 // GoogleCloudContentwarehouseV1PropertyDefinitionSchemaSource: The schema 2728 // source information. 2729 type GoogleCloudContentwarehouseV1PropertyDefinitionSchemaSource struct { 2730 // Name: The schema name in the source. 2731 Name string `json:"name,omitempty"` 2732 // ProcessorType: The Doc AI processor type name. 2733 ProcessorType string `json:"processorType,omitempty"` 2734 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2735 // include in API requests. By default, fields with empty or default values are 2736 // omitted from API requests. See 2737 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2738 // details. 2739 ForceSendFields []string `json:"-"` 2740 // NullFields is a list of field names (e.g. "Name") to include in API requests 2741 // with the JSON null value. By default, fields with empty values are omitted 2742 // from API requests. See 2743 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2744 NullFields []string `json:"-"` 2745 } 2746 2747 func (s *GoogleCloudContentwarehouseV1PropertyDefinitionSchemaSource) MarshalJSON() ([]byte, error) { 2748 type NoMethod GoogleCloudContentwarehouseV1PropertyDefinitionSchemaSource 2749 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2750 } 2751 2752 type GoogleCloudContentwarehouseV1PropertyFilter struct { 2753 // Condition: The filter condition. The syntax for this expression is a subset 2754 // of SQL syntax. Supported operators are: `=`, `!=`, `<`, `<=`, `>`, `>=`, and 2755 // `~~` where the left of the operator is a property name and the right of the 2756 // operator is a number or a quoted string. You must escape backslash (\\) and 2757 // quote (\") characters. `~~` is the LIKE operator. The right of the operator 2758 // must be a string. The only supported property data type for LIKE is 2759 // text_values. It provides semantic search functionality by parsing, stemming 2760 // and doing synonyms expansion against the input query. It matches if the 2761 // property contains semantic similar content to the query. It is not regex 2762 // matching or wildcard matching. For example, "property.company ~~ \"google\"" 2763 // will match records whose property `property.compnay` have values like 2764 // "Google Inc.", "Google LLC" or "Google Company". Supported functions are 2765 // `LOWER([property_name])` to perform a case insensitive match and 2766 // `EMPTY([property_name])` to filter on the existence of a key. Boolean 2767 // expressions (AND/OR/NOT) are supported up to 3 levels of nesting (for 2768 // example, "((A AND B AND C) OR NOT D) AND E"), a maximum of 100 comparisons 2769 // or functions are allowed in the expression. The expression must be < 6000 2770 // bytes in length. Only properties that are marked filterable are allowed 2771 // (PropertyDefinition.is_filterable). Property names do not need to be 2772 // prefixed by the document schema id (as is the case with histograms), however 2773 // property names will need to be prefixed by its parent hierarchy, if any. For 2774 // example: top_property_name.sub_property_name. Sample Query: 2775 // `(LOWER(driving_license)="class \"a\"" OR EMPTY(driving_license)) AND 2776 // driving_years > 10` CMEK compliant deployment only supports: * Operators: 2777 // `=`, `<`, `<=`, `>`, and `>=`. * Boolean expressions: AND and OR. 2778 Condition string `json:"condition,omitempty"` 2779 // DocumentSchemaName: The Document schema name Document.document_schema_name. 2780 // Format: 2781 // projects/{project_number}/locations/{location}/documentSchemas/{document_sche 2782 // ma_id}. 2783 DocumentSchemaName string `json:"documentSchemaName,omitempty"` 2784 // ForceSendFields is a list of field names (e.g. "Condition") to 2785 // unconditionally include in API requests. By default, fields with empty or 2786 // default values are omitted from API requests. See 2787 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2788 // details. 2789 ForceSendFields []string `json:"-"` 2790 // NullFields is a list of field names (e.g. "Condition") to include in API 2791 // requests with the JSON null value. By default, fields with empty values are 2792 // omitted from API requests. See 2793 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2794 NullFields []string `json:"-"` 2795 } 2796 2797 func (s *GoogleCloudContentwarehouseV1PropertyFilter) MarshalJSON() ([]byte, error) { 2798 type NoMethod GoogleCloudContentwarehouseV1PropertyFilter 2799 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2800 } 2801 2802 // GoogleCloudContentwarehouseV1PropertyTypeOptions: Configurations for a 2803 // nested structured data property. 2804 type GoogleCloudContentwarehouseV1PropertyTypeOptions struct { 2805 // PropertyDefinitions: Required. List of property definitions. 2806 PropertyDefinitions []*GoogleCloudContentwarehouseV1PropertyDefinition `json:"propertyDefinitions,omitempty"` 2807 // ForceSendFields is a list of field names (e.g. "PropertyDefinitions") to 2808 // unconditionally include in API requests. By default, fields with empty or 2809 // default values are omitted from API requests. See 2810 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2811 // details. 2812 ForceSendFields []string `json:"-"` 2813 // NullFields is a list of field names (e.g. "PropertyDefinitions") to include 2814 // in API requests with the JSON null value. By default, fields with empty 2815 // values are omitted from API requests. See 2816 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2817 NullFields []string `json:"-"` 2818 } 2819 2820 func (s *GoogleCloudContentwarehouseV1PropertyTypeOptions) MarshalJSON() ([]byte, error) { 2821 type NoMethod GoogleCloudContentwarehouseV1PropertyTypeOptions 2822 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2823 } 2824 2825 // GoogleCloudContentwarehouseV1PublishAction: Represents the action 2826 // responsible for publishing messages to a Pub/Sub topic. 2827 type GoogleCloudContentwarehouseV1PublishAction struct { 2828 // Messages: Messages to be published. 2829 Messages []string `json:"messages,omitempty"` 2830 // TopicId: The topic id in the Pub/Sub service for which messages will be 2831 // published to. 2832 TopicId string `json:"topicId,omitempty"` 2833 // ForceSendFields is a list of field names (e.g. "Messages") to 2834 // unconditionally include in API requests. By default, fields with empty or 2835 // default values are omitted from API requests. See 2836 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2837 // details. 2838 ForceSendFields []string `json:"-"` 2839 // NullFields is a list of field names (e.g. "Messages") to include in API 2840 // requests with the JSON null value. By default, fields with empty values are 2841 // omitted from API requests. See 2842 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2843 NullFields []string `json:"-"` 2844 } 2845 2846 func (s *GoogleCloudContentwarehouseV1PublishAction) MarshalJSON() ([]byte, error) { 2847 type NoMethod GoogleCloudContentwarehouseV1PublishAction 2848 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2849 } 2850 2851 // GoogleCloudContentwarehouseV1QAResult: Additional result info for the 2852 // question-answering feature. 2853 type GoogleCloudContentwarehouseV1QAResult struct { 2854 // ConfidenceScore: The calibrated confidence score for this document, in the 2855 // range [0., 1.]. This represents the confidence level for whether the 2856 // returned document and snippet answers the user's query. 2857 ConfidenceScore float64 `json:"confidenceScore,omitempty"` 2858 // Highlights: Highlighted sections in the snippet. 2859 Highlights []*GoogleCloudContentwarehouseV1QAResultHighlight `json:"highlights,omitempty"` 2860 // ForceSendFields is a list of field names (e.g. "ConfidenceScore") to 2861 // unconditionally include in API requests. By default, fields with empty or 2862 // default values are omitted from API requests. See 2863 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2864 // details. 2865 ForceSendFields []string `json:"-"` 2866 // NullFields is a list of field names (e.g. "ConfidenceScore") to include in 2867 // API requests with the JSON null value. By default, fields with empty values 2868 // are omitted from API requests. See 2869 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2870 NullFields []string `json:"-"` 2871 } 2872 2873 func (s *GoogleCloudContentwarehouseV1QAResult) MarshalJSON() ([]byte, error) { 2874 type NoMethod GoogleCloudContentwarehouseV1QAResult 2875 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2876 } 2877 2878 func (s *GoogleCloudContentwarehouseV1QAResult) UnmarshalJSON(data []byte) error { 2879 type NoMethod GoogleCloudContentwarehouseV1QAResult 2880 var s1 struct { 2881 ConfidenceScore gensupport.JSONFloat64 `json:"confidenceScore"` 2882 *NoMethod 2883 } 2884 s1.NoMethod = (*NoMethod)(s) 2885 if err := json.Unmarshal(data, &s1); err != nil { 2886 return err 2887 } 2888 s.ConfidenceScore = float64(s1.ConfidenceScore) 2889 return nil 2890 } 2891 2892 // GoogleCloudContentwarehouseV1QAResultHighlight: A text span in the search 2893 // text snippet that represents a highlighted section (answer context, highly 2894 // relevant sentence, etc.). 2895 type GoogleCloudContentwarehouseV1QAResultHighlight struct { 2896 // EndIndex: End index of the highlight, exclusive. 2897 EndIndex int64 `json:"endIndex,omitempty"` 2898 // StartIndex: Start index of the highlight. 2899 StartIndex int64 `json:"startIndex,omitempty"` 2900 // ForceSendFields is a list of field names (e.g. "EndIndex") to 2901 // unconditionally include in API requests. By default, fields with empty or 2902 // default values are omitted from API requests. See 2903 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2904 // details. 2905 ForceSendFields []string `json:"-"` 2906 // NullFields is a list of field names (e.g. "EndIndex") to include in API 2907 // requests with the JSON null value. By default, fields with empty values are 2908 // omitted from API requests. See 2909 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2910 NullFields []string `json:"-"` 2911 } 2912 2913 func (s *GoogleCloudContentwarehouseV1QAResultHighlight) MarshalJSON() ([]byte, error) { 2914 type NoMethod GoogleCloudContentwarehouseV1QAResultHighlight 2915 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2916 } 2917 2918 // GoogleCloudContentwarehouseV1RemoveFromFolderAction: Represents the action 2919 // responsible for remove a document from a specific folder. 2920 type GoogleCloudContentwarehouseV1RemoveFromFolderAction struct { 2921 // Condition: Condition of the action to be executed. 2922 Condition string `json:"condition,omitempty"` 2923 // Folder: Name of the folder under which new document is to be added. Format: 2924 // projects/{project_number}/locations/{location}/documents/{document_id}. 2925 Folder string `json:"folder,omitempty"` 2926 // ForceSendFields is a list of field names (e.g. "Condition") to 2927 // unconditionally include in API requests. By default, fields with empty or 2928 // default values are omitted from API requests. See 2929 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2930 // details. 2931 ForceSendFields []string `json:"-"` 2932 // NullFields is a list of field names (e.g. "Condition") to include in API 2933 // requests with the JSON null value. By default, fields with empty values are 2934 // omitted from API requests. See 2935 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2936 NullFields []string `json:"-"` 2937 } 2938 2939 func (s *GoogleCloudContentwarehouseV1RemoveFromFolderAction) MarshalJSON() ([]byte, error) { 2940 type NoMethod GoogleCloudContentwarehouseV1RemoveFromFolderAction 2941 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2942 } 2943 2944 // GoogleCloudContentwarehouseV1RequestMetadata: Meta information is used to 2945 // improve the performance of the service. 2946 type GoogleCloudContentwarehouseV1RequestMetadata struct { 2947 // UserInfo: Provides user unique identification and groups information. 2948 UserInfo *GoogleCloudContentwarehouseV1UserInfo `json:"userInfo,omitempty"` 2949 // ForceSendFields is a list of field names (e.g. "UserInfo") to 2950 // unconditionally include in API requests. By default, fields with empty or 2951 // default values are omitted from API requests. See 2952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2953 // details. 2954 ForceSendFields []string `json:"-"` 2955 // NullFields is a list of field names (e.g. "UserInfo") to include in API 2956 // requests with the JSON null value. By default, fields with empty values are 2957 // omitted from API requests. See 2958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2959 NullFields []string `json:"-"` 2960 } 2961 2962 func (s *GoogleCloudContentwarehouseV1RequestMetadata) MarshalJSON() ([]byte, error) { 2963 type NoMethod GoogleCloudContentwarehouseV1RequestMetadata 2964 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2965 } 2966 2967 // GoogleCloudContentwarehouseV1ResponseMetadata: Additional information 2968 // returned to client, such as debugging information. 2969 type GoogleCloudContentwarehouseV1ResponseMetadata struct { 2970 // RequestId: A unique id associated with this call. This id is logged for 2971 // tracking purpose. 2972 RequestId string `json:"requestId,omitempty"` 2973 // ForceSendFields is a list of field names (e.g. "RequestId") to 2974 // unconditionally include in API requests. By default, fields with empty or 2975 // default values are omitted from API requests. See 2976 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2977 // details. 2978 ForceSendFields []string `json:"-"` 2979 // NullFields is a list of field names (e.g. "RequestId") to include in API 2980 // requests with the JSON null value. By default, fields with empty values are 2981 // omitted from API requests. See 2982 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2983 NullFields []string `json:"-"` 2984 } 2985 2986 func (s *GoogleCloudContentwarehouseV1ResponseMetadata) MarshalJSON() ([]byte, error) { 2987 type NoMethod GoogleCloudContentwarehouseV1ResponseMetadata 2988 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2989 } 2990 2991 // GoogleCloudContentwarehouseV1Rule: Represents the rule for a content 2992 // warehouse trigger. 2993 type GoogleCloudContentwarehouseV1Rule struct { 2994 // Actions: List of actions that are executed when the rule is satisfied. 2995 Actions []*GoogleCloudContentwarehouseV1Action `json:"actions,omitempty"` 2996 // Condition: Represents the conditional expression to be evaluated. Expression 2997 // should evaluate to a boolean result. When the condition is true actions are 2998 // executed. Example: user_role = "hsbc_role_1" AND doc.salary > 20000 2999 Condition string `json:"condition,omitempty"` 3000 // Description: Short description of the rule and its context. 3001 Description string `json:"description,omitempty"` 3002 // RuleId: ID of the rule. It has to be unique across all the examples. This is 3003 // managed internally. 3004 RuleId string `json:"ruleId,omitempty"` 3005 // TriggerType: Identifies the trigger type for running the policy. 3006 // 3007 // Possible values: 3008 // "UNKNOWN" - Trigger for unknown action. 3009 // "ON_CREATE" - Trigger for create document action. 3010 // "ON_UPDATE" - Trigger for update document action. 3011 // "ON_CREATE_LINK" - Trigger for create link action. 3012 // "ON_DELETE_LINK" - Trigger for delete link action. 3013 TriggerType string `json:"triggerType,omitempty"` 3014 // ForceSendFields is a list of field names (e.g. "Actions") to unconditionally 3015 // include in API requests. By default, fields with empty or default values are 3016 // omitted from API requests. See 3017 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3018 // details. 3019 ForceSendFields []string `json:"-"` 3020 // NullFields is a list of field names (e.g. "Actions") to include in API 3021 // requests with the JSON null value. By default, fields with empty values are 3022 // omitted from API requests. See 3023 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3024 NullFields []string `json:"-"` 3025 } 3026 3027 func (s *GoogleCloudContentwarehouseV1Rule) MarshalJSON() ([]byte, error) { 3028 type NoMethod GoogleCloudContentwarehouseV1Rule 3029 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3030 } 3031 3032 // GoogleCloudContentwarehouseV1RuleActionsPair: Represents a rule and outputs 3033 // of associated actions. 3034 type GoogleCloudContentwarehouseV1RuleActionsPair struct { 3035 // ActionOutputs: Outputs of executing the actions associated with the above 3036 // rule. 3037 ActionOutputs []*GoogleCloudContentwarehouseV1ActionOutput `json:"actionOutputs,omitempty"` 3038 // Rule: Represents the rule. 3039 Rule *GoogleCloudContentwarehouseV1Rule `json:"rule,omitempty"` 3040 // ForceSendFields is a list of field names (e.g. "ActionOutputs") to 3041 // unconditionally include in API requests. By default, fields with empty or 3042 // default values are omitted from API requests. See 3043 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3044 // details. 3045 ForceSendFields []string `json:"-"` 3046 // NullFields is a list of field names (e.g. "ActionOutputs") to include in API 3047 // requests with the JSON null value. By default, fields with empty values are 3048 // omitted from API requests. See 3049 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3050 NullFields []string `json:"-"` 3051 } 3052 3053 func (s *GoogleCloudContentwarehouseV1RuleActionsPair) MarshalJSON() ([]byte, error) { 3054 type NoMethod GoogleCloudContentwarehouseV1RuleActionsPair 3055 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3056 } 3057 3058 // GoogleCloudContentwarehouseV1RuleEngineOutput: Records the output of Rule 3059 // Engine including rule evaluation and actions result. 3060 type GoogleCloudContentwarehouseV1RuleEngineOutput struct { 3061 // ActionExecutorOutput: Output from Action Executor containing rule and 3062 // corresponding actions execution result. 3063 ActionExecutorOutput *GoogleCloudContentwarehouseV1ActionExecutorOutput `json:"actionExecutorOutput,omitempty"` 3064 // DocumentName: Name of the document against which the rules and actions were 3065 // evaluated. 3066 DocumentName string `json:"documentName,omitempty"` 3067 // RuleEvaluatorOutput: Output from Rule Evaluator containing matched, 3068 // unmatched and invalid rules. 3069 RuleEvaluatorOutput *GoogleCloudContentwarehouseV1RuleEvaluatorOutput `json:"ruleEvaluatorOutput,omitempty"` 3070 // ForceSendFields is a list of field names (e.g. "ActionExecutorOutput") to 3071 // unconditionally include in API requests. By default, fields with empty or 3072 // default values are omitted from API requests. See 3073 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3074 // details. 3075 ForceSendFields []string `json:"-"` 3076 // NullFields is a list of field names (e.g. "ActionExecutorOutput") to include 3077 // in API requests with the JSON null value. By default, fields with empty 3078 // values are omitted from API requests. See 3079 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3080 NullFields []string `json:"-"` 3081 } 3082 3083 func (s *GoogleCloudContentwarehouseV1RuleEngineOutput) MarshalJSON() ([]byte, error) { 3084 type NoMethod GoogleCloudContentwarehouseV1RuleEngineOutput 3085 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3086 } 3087 3088 // GoogleCloudContentwarehouseV1RuleEvaluatorOutput: Represents the output of 3089 // the Rule Evaluator. 3090 type GoogleCloudContentwarehouseV1RuleEvaluatorOutput struct { 3091 // InvalidRules: A subset of triggered rules that failed the validation 3092 // check(s) after parsing. 3093 InvalidRules []*GoogleCloudContentwarehouseV1InvalidRule `json:"invalidRules,omitempty"` 3094 // MatchedRules: A subset of triggered rules that are evaluated true for a 3095 // given request. 3096 MatchedRules []*GoogleCloudContentwarehouseV1Rule `json:"matchedRules,omitempty"` 3097 // TriggeredRules: List of rules fetched from database for the given request 3098 // trigger type. 3099 TriggeredRules []*GoogleCloudContentwarehouseV1Rule `json:"triggeredRules,omitempty"` 3100 // ForceSendFields is a list of field names (e.g. "InvalidRules") to 3101 // unconditionally include in API requests. By default, fields with empty or 3102 // default values are omitted from API requests. See 3103 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3104 // details. 3105 ForceSendFields []string `json:"-"` 3106 // NullFields is a list of field names (e.g. "InvalidRules") to include in API 3107 // requests with the JSON null value. By default, fields with empty values are 3108 // omitted from API requests. See 3109 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3110 NullFields []string `json:"-"` 3111 } 3112 3113 func (s *GoogleCloudContentwarehouseV1RuleEvaluatorOutput) MarshalJSON() ([]byte, error) { 3114 type NoMethod GoogleCloudContentwarehouseV1RuleEvaluatorOutput 3115 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3116 } 3117 3118 // GoogleCloudContentwarehouseV1RuleSet: Represents a set of rules from a 3119 // single customer. 3120 type GoogleCloudContentwarehouseV1RuleSet struct { 3121 // Description: Short description of the rule-set. 3122 Description string `json:"description,omitempty"` 3123 // Name: The resource name of the rule set. Managed internally. Format: 3124 // projects/{project_number}/locations/{location}/ruleSet/{rule_set_id}. The 3125 // name is ignored when creating a rule set. 3126 Name string `json:"name,omitempty"` 3127 // Rules: List of rules given by the customer. 3128 Rules []*GoogleCloudContentwarehouseV1Rule `json:"rules,omitempty"` 3129 // Source: Source of the rules i.e., customer name. 3130 Source string `json:"source,omitempty"` 3131 3132 // ServerResponse contains the HTTP response code and headers from the server. 3133 googleapi.ServerResponse `json:"-"` 3134 // ForceSendFields is a list of field names (e.g. "Description") to 3135 // unconditionally include in API requests. By default, fields with empty or 3136 // default values are omitted from API requests. See 3137 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3138 // details. 3139 ForceSendFields []string `json:"-"` 3140 // NullFields is a list of field names (e.g. "Description") to include in API 3141 // requests with the JSON null value. By default, fields with empty values are 3142 // omitted from API requests. See 3143 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3144 NullFields []string `json:"-"` 3145 } 3146 3147 func (s *GoogleCloudContentwarehouseV1RuleSet) MarshalJSON() ([]byte, error) { 3148 type NoMethod GoogleCloudContentwarehouseV1RuleSet 3149 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3150 } 3151 3152 // GoogleCloudContentwarehouseV1RunPipelineMetadata: Metadata message of 3153 // RunPipeline method. 3154 type GoogleCloudContentwarehouseV1RunPipelineMetadata struct { 3155 // ExportToCdwPipelineMetadata: The pipeline metadata for Export-to-CDW 3156 // pipeline. 3157 ExportToCdwPipelineMetadata *GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata `json:"exportToCdwPipelineMetadata,omitempty"` 3158 // FailedFileCount: Number of files that have failed at some point in the 3159 // pipeline. 3160 FailedFileCount int64 `json:"failedFileCount,omitempty"` 3161 // GcsIngestPipelineMetadata: The pipeline metadata for GcsIngest pipeline. 3162 GcsIngestPipelineMetadata *GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata `json:"gcsIngestPipelineMetadata,omitempty"` 3163 // IndividualDocumentStatuses: The list of response details of each document. 3164 IndividualDocumentStatuses []*GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus `json:"individualDocumentStatuses,omitempty"` 3165 // ProcessWithDocAiPipelineMetadata: The pipeline metadata for 3166 // Process-with-DocAi pipeline. 3167 ProcessWithDocAiPipelineMetadata *GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetadata `json:"processWithDocAiPipelineMetadata,omitempty"` 3168 // TotalFileCount: Number of files that were processed by the pipeline. 3169 TotalFileCount int64 `json:"totalFileCount,omitempty"` 3170 // UserInfo: User unique identification and groups information. 3171 UserInfo *GoogleCloudContentwarehouseV1UserInfo `json:"userInfo,omitempty"` 3172 // ForceSendFields is a list of field names (e.g. 3173 // "ExportToCdwPipelineMetadata") to unconditionally include in API requests. 3174 // By default, fields with empty or default values are omitted from API 3175 // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields 3176 // for more details. 3177 ForceSendFields []string `json:"-"` 3178 // NullFields is a list of field names (e.g. "ExportToCdwPipelineMetadata") to 3179 // include in API requests with the JSON null value. By default, fields with 3180 // empty values are omitted from API requests. See 3181 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3182 NullFields []string `json:"-"` 3183 } 3184 3185 func (s *GoogleCloudContentwarehouseV1RunPipelineMetadata) MarshalJSON() ([]byte, error) { 3186 type NoMethod GoogleCloudContentwarehouseV1RunPipelineMetadata 3187 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3188 } 3189 3190 // GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata: 3191 // The metadata message for Export-to-CDW pipeline. 3192 type GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata struct { 3193 // DocAiDataset: The output CDW dataset resource name. 3194 DocAiDataset string `json:"docAiDataset,omitempty"` 3195 // Documents: The input list of all the resource names of the documents to be 3196 // exported. 3197 Documents []string `json:"documents,omitempty"` 3198 // OutputPath: The output Cloud Storage folder in this pipeline. 3199 OutputPath string `json:"outputPath,omitempty"` 3200 // ForceSendFields is a list of field names (e.g. "DocAiDataset") to 3201 // unconditionally include in API requests. By default, fields with empty or 3202 // default values are omitted from API requests. See 3203 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3204 // details. 3205 ForceSendFields []string `json:"-"` 3206 // NullFields is a list of field names (e.g. "DocAiDataset") to include in API 3207 // requests with the JSON null value. By default, fields with empty values are 3208 // omitted from API requests. See 3209 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3210 NullFields []string `json:"-"` 3211 } 3212 3213 func (s *GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata) MarshalJSON() ([]byte, error) { 3214 type NoMethod GoogleCloudContentwarehouseV1RunPipelineMetadataExportToCdwPipelineMetadata 3215 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3216 } 3217 3218 // GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata: 3219 // The metadata message for GcsIngest pipeline. 3220 type GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata struct { 3221 // InputPath: The input Cloud Storage folder in this pipeline. Format: 3222 // `gs:///`. 3223 InputPath string `json:"inputPath,omitempty"` 3224 // ForceSendFields is a list of field names (e.g. "InputPath") to 3225 // unconditionally include in API requests. By default, fields with empty or 3226 // default values are omitted from API requests. See 3227 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3228 // details. 3229 ForceSendFields []string `json:"-"` 3230 // NullFields is a list of field names (e.g. "InputPath") to include in API 3231 // requests with the JSON null value. By default, fields with empty values are 3232 // omitted from API requests. See 3233 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3234 NullFields []string `json:"-"` 3235 } 3236 3237 func (s *GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata) MarshalJSON() ([]byte, error) { 3238 type NoMethod GoogleCloudContentwarehouseV1RunPipelineMetadataGcsIngestPipelineMetadata 3239 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3240 } 3241 3242 // GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus: 3243 // The status of processing a document. 3244 type GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus struct { 3245 // DocumentId: Document identifier of an existing document. 3246 DocumentId string `json:"documentId,omitempty"` 3247 // Status: The status processing the document. 3248 Status *GoogleRpcStatus `json:"status,omitempty"` 3249 // ForceSendFields is a list of field names (e.g. "DocumentId") to 3250 // unconditionally include in API requests. By default, fields with empty or 3251 // default values are omitted from API requests. See 3252 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3253 // details. 3254 ForceSendFields []string `json:"-"` 3255 // NullFields is a list of field names (e.g. "DocumentId") to include in API 3256 // requests with the JSON null value. By default, fields with empty values are 3257 // omitted from API requests. See 3258 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3259 NullFields []string `json:"-"` 3260 } 3261 3262 func (s *GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus) MarshalJSON() ([]byte, error) { 3263 type NoMethod GoogleCloudContentwarehouseV1RunPipelineMetadataIndividualDocumentStatus 3264 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3265 } 3266 3267 // GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetad 3268 // ata: The metadata message for Process-with-DocAi pipeline. 3269 type GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetadata struct { 3270 // Documents: The input list of all the resource names of the documents to be 3271 // processed. 3272 Documents []string `json:"documents,omitempty"` 3273 // ProcessorInfo: The DocAI processor to process the documents with. 3274 ProcessorInfo *GoogleCloudContentwarehouseV1ProcessorInfo `json:"processorInfo,omitempty"` 3275 // ForceSendFields is a list of field names (e.g. "Documents") to 3276 // unconditionally include in API requests. By default, fields with empty or 3277 // default values are omitted from API requests. See 3278 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3279 // details. 3280 ForceSendFields []string `json:"-"` 3281 // NullFields is a list of field names (e.g. "Documents") to include in API 3282 // requests with the JSON null value. By default, fields with empty values are 3283 // omitted from API requests. See 3284 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3285 NullFields []string `json:"-"` 3286 } 3287 3288 func (s *GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetadata) MarshalJSON() ([]byte, error) { 3289 type NoMethod GoogleCloudContentwarehouseV1RunPipelineMetadataProcessWithDocAiPipelineMetadata 3290 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3291 } 3292 3293 // GoogleCloudContentwarehouseV1RunPipelineRequest: Request message for 3294 // DocumentService.RunPipeline. 3295 type GoogleCloudContentwarehouseV1RunPipelineRequest struct { 3296 // ExportCdwPipeline: Export docuemnts from Document Warehouse to CDW for 3297 // training purpose. 3298 ExportCdwPipeline *GoogleCloudContentwarehouseV1ExportToCdwPipeline `json:"exportCdwPipeline,omitempty"` 3299 // GcsIngestPipeline: Cloud Storage ingestion pipeline. 3300 GcsIngestPipeline *GoogleCloudContentwarehouseV1GcsIngestPipeline `json:"gcsIngestPipeline,omitempty"` 3301 // GcsIngestWithDocAiProcessorsPipeline: Use DocAI processors to process 3302 // documents in Cloud Storage and ingest them to Document Warehouse. 3303 GcsIngestWithDocAiProcessorsPipeline *GoogleCloudContentwarehouseV1GcsIngestWithDocAiProcessorsPipeline `json:"gcsIngestWithDocAiProcessorsPipeline,omitempty"` 3304 // ProcessWithDocAiPipeline: Use a DocAI processor to process documents in 3305 // Document Warehouse, and re-ingest the updated results into Document 3306 // Warehouse. 3307 ProcessWithDocAiPipeline *GoogleCloudContentwarehouseV1ProcessWithDocAiPipeline `json:"processWithDocAiPipeline,omitempty"` 3308 // RequestMetadata: The meta information collected about the end user, used to 3309 // enforce access control for the service. 3310 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 3311 // ForceSendFields is a list of field names (e.g. "ExportCdwPipeline") to 3312 // unconditionally include in API requests. By default, fields with empty or 3313 // default values are omitted from API requests. See 3314 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3315 // details. 3316 ForceSendFields []string `json:"-"` 3317 // NullFields is a list of field names (e.g. "ExportCdwPipeline") to include in 3318 // API requests with the JSON null value. By default, fields with empty values 3319 // are omitted from API requests. See 3320 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3321 NullFields []string `json:"-"` 3322 } 3323 3324 func (s *GoogleCloudContentwarehouseV1RunPipelineRequest) MarshalJSON() ([]byte, error) { 3325 type NoMethod GoogleCloudContentwarehouseV1RunPipelineRequest 3326 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3327 } 3328 3329 // GoogleCloudContentwarehouseV1SearchDocumentsRequest: Request message for 3330 // DocumentService.SearchDocuments. 3331 type GoogleCloudContentwarehouseV1SearchDocumentsRequest struct { 3332 // DocumentQuery: Query used to search against documents (keyword, filters, 3333 // etc.). 3334 DocumentQuery *GoogleCloudContentwarehouseV1DocumentQuery `json:"documentQuery,omitempty"` 3335 // HistogramQueries: An expression specifying a histogram request against 3336 // matching documents. Expression syntax is an aggregation function call with 3337 // histogram facets and other options. The following aggregation functions are 3338 // supported: * `count(string_histogram_facet)`: Count the number of matching 3339 // entities for each distinct attribute value. Data types: * Histogram facet 3340 // (aka filterable properties): Facet names with format <schema id>.<facet>. 3341 // Facets will have the format of: `a-zA-Z`. If the facet is a child facet, 3342 // then the parent hierarchy needs to be specified separated by dots in the 3343 // prefix after the schema id. Thus, the format for a multi- level facet is: 3344 // <schema id>.<parent facet name>. <child facet name>. Example: 3345 // schema123.root_parent_facet.middle_facet.child_facet * DocumentSchemaId: 3346 // (with no schema id prefix) to get histograms for each document type (returns 3347 // the schema id path, e.g. 3348 // projects/12345/locations/us-west/documentSchemas/abc123). Example 3349 // expression: * Document type counts: count('DocumentSchemaId') * For schema 3350 // id, abc123, get the counts for MORTGAGE_TYPE: count('abc123.MORTGAGE_TYPE') 3351 HistogramQueries []*GoogleCloudContentwarehouseV1HistogramQuery `json:"histogramQueries,omitempty"` 3352 // Offset: An integer that specifies the current offset (that is, starting 3353 // result location, amongst the documents deemed by the API as relevant) in 3354 // search results. This field is only considered if page_token is unset. The 3355 // maximum allowed value is 5000. Otherwise an error is thrown. For example, 0 3356 // means to return results starting from the first matching document, and 10 3357 // means to return from the 11th document. This can be used for pagination, 3358 // (for example, pageSize = 10 and offset = 10 means to return from the second 3359 // page). 3360 Offset int64 `json:"offset,omitempty"` 3361 // OrderBy: The criteria determining how search results are sorted. For 3362 // non-empty query, default is "relevance desc". For empty query, default is 3363 // "upload_date desc". Supported options are: * "relevance desc": By 3364 // relevance descending, as determined by the API algorithms. * "upload_date 3365 // desc": By upload date descending. * "upload_date": By upload date 3366 // ascending. * "update_date desc": By last updated date descending. * 3367 // "update_date": By last updated date ascending. * "retrieval_importance 3368 // desc": By retrieval importance of properties descending. This feature is 3369 // still under development, please do not use unless otherwise instructed to do 3370 // so. 3371 OrderBy string `json:"orderBy,omitempty"` 3372 // PageSize: A limit on the number of documents returned in the search results. 3373 // Increasing this value above the default value of 10 can increase search 3374 // response time. The value can be between 1 and 100. 3375 PageSize int64 `json:"pageSize,omitempty"` 3376 // PageToken: The token specifying the current offset within search results. 3377 // See SearchDocumentsResponse.next_page_token for an explanation of how to 3378 // obtain the next set of query results. 3379 PageToken string `json:"pageToken,omitempty"` 3380 // QaSizeLimit: Experimental, do not use. The limit on the number of documents 3381 // returned for the question-answering feature. To enable the 3382 // question-answering feature, set [DocumentQuery].is_nl_query to true. 3383 QaSizeLimit int64 `json:"qaSizeLimit,omitempty"` 3384 // RequestMetadata: The meta information collected about the end user, used to 3385 // enforce access control and improve the search quality of the service. 3386 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 3387 // RequireTotalSize: Controls if the search document request requires the 3388 // return of a total size of matched documents. See 3389 // SearchDocumentsResponse.total_size. Enabling this flag may adversely impact 3390 // performance. Hint: If this is used with pagination, set this flag on the 3391 // initial query but set this to false on subsequent page calls (keep the total 3392 // count locally). Defaults to false. 3393 RequireTotalSize bool `json:"requireTotalSize,omitempty"` 3394 // TotalResultSize: Controls if the search document request requires the return 3395 // of a total size of matched documents. See 3396 // SearchDocumentsResponse.total_size. 3397 // 3398 // Possible values: 3399 // "TOTAL_RESULT_SIZE_UNSPECIFIED" - Total number calculation will be 3400 // skipped. 3401 // "ESTIMATED_SIZE" - Estimate total number. The total result size will be 3402 // accurated up to 10,000. This option will add cost and latency to your 3403 // request. 3404 // "ACTUAL_SIZE" - It may adversely impact performance. The limit is 3405 // 1000,000. 3406 TotalResultSize string `json:"totalResultSize,omitempty"` 3407 // ForceSendFields is a list of field names (e.g. "DocumentQuery") to 3408 // unconditionally include in API requests. By default, fields with empty or 3409 // default values are omitted from API requests. See 3410 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3411 // details. 3412 ForceSendFields []string `json:"-"` 3413 // NullFields is a list of field names (e.g. "DocumentQuery") to include in API 3414 // requests with the JSON null value. By default, fields with empty values are 3415 // omitted from API requests. See 3416 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3417 NullFields []string `json:"-"` 3418 } 3419 3420 func (s *GoogleCloudContentwarehouseV1SearchDocumentsRequest) MarshalJSON() ([]byte, error) { 3421 type NoMethod GoogleCloudContentwarehouseV1SearchDocumentsRequest 3422 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3423 } 3424 3425 // GoogleCloudContentwarehouseV1SearchDocumentsResponse: Response message for 3426 // DocumentService.SearchDocuments. 3427 type GoogleCloudContentwarehouseV1SearchDocumentsResponse struct { 3428 // HistogramQueryResults: The histogram results that match with the specified 3429 // SearchDocumentsRequest.histogram_queries. 3430 HistogramQueryResults []*GoogleCloudContentwarehouseV1HistogramQueryResult `json:"histogramQueryResults,omitempty"` 3431 // MatchingDocuments: The document entities that match the specified 3432 // SearchDocumentsRequest. 3433 MatchingDocuments []*GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument `json:"matchingDocuments,omitempty"` 3434 // Metadata: Additional information for the API invocation, such as the request 3435 // tracking id. 3436 Metadata *GoogleCloudContentwarehouseV1ResponseMetadata `json:"metadata,omitempty"` 3437 // NextPageToken: The token that specifies the starting position of the next 3438 // page of results. This field is empty if there are no more results. 3439 NextPageToken string `json:"nextPageToken,omitempty"` 3440 // QuestionAnswer: Experimental. Question answer from the query against the 3441 // document. 3442 QuestionAnswer string `json:"questionAnswer,omitempty"` 3443 // TotalSize: The total number of matched documents which is available only if 3444 // the client set SearchDocumentsRequest.require_total_size to `true` or set 3445 // SearchDocumentsRequest.total_result_size to `ESTIMATED_SIZE` or 3446 // `ACTUAL_SIZE`. Otherwise, the value will be `-1`. Typically a UI would 3447 // handle this condition by displaying "of many", for example: "Displaying 10 3448 // of many". 3449 TotalSize int64 `json:"totalSize,omitempty"` 3450 3451 // ServerResponse contains the HTTP response code and headers from the server. 3452 googleapi.ServerResponse `json:"-"` 3453 // ForceSendFields is a list of field names (e.g. "HistogramQueryResults") to 3454 // unconditionally include in API requests. By default, fields with empty or 3455 // default values are omitted from API requests. See 3456 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3457 // details. 3458 ForceSendFields []string `json:"-"` 3459 // NullFields is a list of field names (e.g. "HistogramQueryResults") to 3460 // include in API requests with the JSON null value. By default, fields with 3461 // empty values are omitted from API requests. See 3462 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3463 NullFields []string `json:"-"` 3464 } 3465 3466 func (s *GoogleCloudContentwarehouseV1SearchDocumentsResponse) MarshalJSON() ([]byte, error) { 3467 type NoMethod GoogleCloudContentwarehouseV1SearchDocumentsResponse 3468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3469 } 3470 3471 // GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument: 3472 // Document entry with metadata inside SearchDocumentsResponse 3473 type GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument struct { 3474 // Document: Document that matches the specified SearchDocumentsRequest. This 3475 // document only contains indexed metadata information. 3476 Document *GoogleCloudContentwarehouseV1Document `json:"document,omitempty"` 3477 // MatchedTokenPageIndices: Return the 1-based page indices where those pages 3478 // have one or more matched tokens. 3479 MatchedTokenPageIndices googleapi.Int64s `json:"matchedTokenPageIndices,omitempty"` 3480 // QaResult: Experimental. Additional result info if the question-answering 3481 // feature is enabled. 3482 QaResult *GoogleCloudContentwarehouseV1QAResult `json:"qaResult,omitempty"` 3483 // SearchTextSnippet: Contains snippets of text from the document full raw text 3484 // that most closely match a search query's keywords, if available. All HTML 3485 // tags in the original fields are stripped when returned in this field, and 3486 // matching query keywords are enclosed in HTML bold tags. If the 3487 // question-answering feature is enabled, this field will instead contain a 3488 // snippet that answers the user's natural-language query. No HTML bold tags 3489 // will be present, and highlights in the answer snippet can be found in 3490 // QAResult.highlights. 3491 SearchTextSnippet string `json:"searchTextSnippet,omitempty"` 3492 // ForceSendFields is a list of field names (e.g. "Document") to 3493 // unconditionally include in API requests. By default, fields with empty or 3494 // default values are omitted from API requests. See 3495 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3496 // details. 3497 ForceSendFields []string `json:"-"` 3498 // NullFields is a list of field names (e.g. "Document") to include in API 3499 // requests with the JSON null value. By default, fields with empty values are 3500 // omitted from API requests. See 3501 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3502 NullFields []string `json:"-"` 3503 } 3504 3505 func (s *GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument) MarshalJSON() ([]byte, error) { 3506 type NoMethod GoogleCloudContentwarehouseV1SearchDocumentsResponseMatchingDocument 3507 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3508 } 3509 3510 // GoogleCloudContentwarehouseV1SetAclRequest: Request message for 3511 // DocumentService.SetAcl. 3512 type GoogleCloudContentwarehouseV1SetAclRequest struct { 3513 // Policy: Required. REQUIRED: The complete policy to be applied to the 3514 // `resource`. The size of the policy is limited to a few 10s of KB. This 3515 // refers to an Identity and Access (IAM) policy, which specifies access 3516 // controls for the Document. You can set ACL with condition for projects only. 3517 // Supported operators are: `=`, `!=`, `<`, `<=`, `>`, and `>=` where the left 3518 // of the operator is `DocumentSchemaId` or property name and the right of the 3519 // operator is a number or a quoted string. You must escape backslash (\\) and 3520 // quote (\") characters. Boolean expressions (AND/OR) are supported up to 3 3521 // levels of nesting (for example, "((A AND B AND C) OR D) AND E"), a maximum 3522 // of 10 comparisons are allowed in the expression. The expression must be < 3523 // 6000 bytes in length. Sample condition: "DocumentSchemaId = \"some schema 3524 // id\" OR SchemaId.floatPropertyName >= 10" 3525 Policy *GoogleIamV1Policy `json:"policy,omitempty"` 3526 // ProjectOwner: For Set Project ACL only. Authorization check for end user 3527 // will be ignored when project_owner=true. 3528 ProjectOwner bool `json:"projectOwner,omitempty"` 3529 // RequestMetadata: The meta information collected about the end user, used to 3530 // enforce access control for the service. 3531 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 3532 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally 3533 // include in API requests. By default, fields with empty or default values are 3534 // omitted from API requests. See 3535 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3536 // details. 3537 ForceSendFields []string `json:"-"` 3538 // NullFields is a list of field names (e.g. "Policy") to include in API 3539 // requests with the JSON null value. By default, fields with empty values are 3540 // omitted from API requests. See 3541 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3542 NullFields []string `json:"-"` 3543 } 3544 3545 func (s *GoogleCloudContentwarehouseV1SetAclRequest) MarshalJSON() ([]byte, error) { 3546 type NoMethod GoogleCloudContentwarehouseV1SetAclRequest 3547 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3548 } 3549 3550 // GoogleCloudContentwarehouseV1SetAclResponse: Response message for 3551 // DocumentService.SetAcl. 3552 type GoogleCloudContentwarehouseV1SetAclResponse struct { 3553 // Metadata: Additional information for the API invocation, such as the request 3554 // tracking id. 3555 Metadata *GoogleCloudContentwarehouseV1ResponseMetadata `json:"metadata,omitempty"` 3556 // Policy: The policy will be attached to a resource (e.g. projecct, document). 3557 Policy *GoogleIamV1Policy `json:"policy,omitempty"` 3558 3559 // ServerResponse contains the HTTP response code and headers from the server. 3560 googleapi.ServerResponse `json:"-"` 3561 // ForceSendFields is a list of field names (e.g. "Metadata") to 3562 // unconditionally include in API requests. By default, fields with empty or 3563 // default values are omitted from API requests. See 3564 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3565 // details. 3566 ForceSendFields []string `json:"-"` 3567 // NullFields is a list of field names (e.g. "Metadata") to include in API 3568 // requests with the JSON null value. By default, fields with empty values are 3569 // omitted from API requests. See 3570 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3571 NullFields []string `json:"-"` 3572 } 3573 3574 func (s *GoogleCloudContentwarehouseV1SetAclResponse) MarshalJSON() ([]byte, error) { 3575 type NoMethod GoogleCloudContentwarehouseV1SetAclResponse 3576 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3577 } 3578 3579 // GoogleCloudContentwarehouseV1SynonymSet: Represents a list of synonyms for a 3580 // given context. For example a context "sales" could contain: Synonym 1: sale, 3581 // invoice, bill, order Synonym 2: money, credit, finance, payment Synonym 3: 3582 // shipping, freight, transport Each SynonymSets should be disjoint 3583 type GoogleCloudContentwarehouseV1SynonymSet struct { 3584 // Context: This is a freeform field. Example contexts can be "sales," 3585 // "engineering," "real estate," "accounting," etc. The context can be supplied 3586 // during search requests. 3587 Context string `json:"context,omitempty"` 3588 // Name: The resource name of the SynonymSet This is mandatory for 3589 // google.api.resource. Format: 3590 // projects/{project_number}/locations/{location}/synonymSets/{context}. 3591 Name string `json:"name,omitempty"` 3592 // Synonyms: List of Synonyms for the context. 3593 Synonyms []*GoogleCloudContentwarehouseV1SynonymSetSynonym `json:"synonyms,omitempty"` 3594 3595 // ServerResponse contains the HTTP response code and headers from the server. 3596 googleapi.ServerResponse `json:"-"` 3597 // ForceSendFields is a list of field names (e.g. "Context") to unconditionally 3598 // include in API requests. By default, fields with empty or default values are 3599 // omitted from API requests. See 3600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3601 // details. 3602 ForceSendFields []string `json:"-"` 3603 // NullFields is a list of field names (e.g. "Context") to include in API 3604 // requests with the JSON null value. By default, fields with empty values are 3605 // omitted from API requests. See 3606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3607 NullFields []string `json:"-"` 3608 } 3609 3610 func (s *GoogleCloudContentwarehouseV1SynonymSet) MarshalJSON() ([]byte, error) { 3611 type NoMethod GoogleCloudContentwarehouseV1SynonymSet 3612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3613 } 3614 3615 // GoogleCloudContentwarehouseV1SynonymSetSynonym: Represents a list of words 3616 // given by the customer All these words are synonyms of each other. 3617 type GoogleCloudContentwarehouseV1SynonymSetSynonym struct { 3618 // Words: For example: sale, invoice, bill, order 3619 Words []string `json:"words,omitempty"` 3620 // ForceSendFields is a list of field names (e.g. "Words") to unconditionally 3621 // include in API requests. By default, fields with empty or default values are 3622 // omitted from API requests. See 3623 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3624 // details. 3625 ForceSendFields []string `json:"-"` 3626 // NullFields is a list of field names (e.g. "Words") to include in API 3627 // requests with the JSON null value. By default, fields with empty values are 3628 // omitted from API requests. See 3629 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3630 NullFields []string `json:"-"` 3631 } 3632 3633 func (s *GoogleCloudContentwarehouseV1SynonymSetSynonym) MarshalJSON() ([]byte, error) { 3634 type NoMethod GoogleCloudContentwarehouseV1SynonymSetSynonym 3635 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3636 } 3637 3638 // GoogleCloudContentwarehouseV1TextArray: String/text values. 3639 type GoogleCloudContentwarehouseV1TextArray struct { 3640 // Values: List of text values. 3641 Values []string `json:"values,omitempty"` 3642 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 3643 // include in API requests. By default, fields with empty or default values are 3644 // omitted from API requests. See 3645 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3646 // details. 3647 ForceSendFields []string `json:"-"` 3648 // NullFields is a list of field names (e.g. "Values") to include in API 3649 // requests with the JSON null value. By default, fields with empty values are 3650 // omitted from API requests. See 3651 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3652 NullFields []string `json:"-"` 3653 } 3654 3655 func (s *GoogleCloudContentwarehouseV1TextArray) MarshalJSON() ([]byte, error) { 3656 type NoMethod GoogleCloudContentwarehouseV1TextArray 3657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3658 } 3659 3660 // GoogleCloudContentwarehouseV1TextTypeOptions: Configurations for a text 3661 // property. 3662 type GoogleCloudContentwarehouseV1TextTypeOptions struct { 3663 } 3664 3665 // GoogleCloudContentwarehouseV1TimeFilter: Filter on create timestamp or 3666 // update timestamp of documents. 3667 type GoogleCloudContentwarehouseV1TimeFilter struct { 3668 // TimeField: Specifies which time field to filter documents on. Defaults to 3669 // TimeField.UPLOAD_TIME. 3670 // 3671 // Possible values: 3672 // "TIME_FIELD_UNSPECIFIED" - Default value. 3673 // "CREATE_TIME" - Earliest document create time. 3674 // "UPDATE_TIME" - Latest document update time. 3675 // "DISPOSITION_TIME" - Time when document becomes mutable again. 3676 TimeField string `json:"timeField,omitempty"` 3677 TimeRange *GoogleTypeInterval `json:"timeRange,omitempty"` 3678 // ForceSendFields is a list of field names (e.g. "TimeField") to 3679 // unconditionally include in API requests. By default, fields with empty or 3680 // default values are omitted from API requests. See 3681 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3682 // details. 3683 ForceSendFields []string `json:"-"` 3684 // NullFields is a list of field names (e.g. "TimeField") to include in API 3685 // requests with the JSON null value. By default, fields with empty values are 3686 // omitted from API requests. See 3687 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3688 NullFields []string `json:"-"` 3689 } 3690 3691 func (s *GoogleCloudContentwarehouseV1TimeFilter) MarshalJSON() ([]byte, error) { 3692 type NoMethod GoogleCloudContentwarehouseV1TimeFilter 3693 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3694 } 3695 3696 // GoogleCloudContentwarehouseV1TimestampArray: Timestamp values. 3697 type GoogleCloudContentwarehouseV1TimestampArray struct { 3698 // Values: List of timestamp values. 3699 Values []*GoogleCloudContentwarehouseV1TimestampValue `json:"values,omitempty"` 3700 // ForceSendFields is a list of field names (e.g. "Values") to unconditionally 3701 // include in API requests. By default, fields with empty or default values are 3702 // omitted from API requests. See 3703 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3704 // details. 3705 ForceSendFields []string `json:"-"` 3706 // NullFields is a list of field names (e.g. "Values") to include in API 3707 // requests with the JSON null value. By default, fields with empty values are 3708 // omitted from API requests. See 3709 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3710 NullFields []string `json:"-"` 3711 } 3712 3713 func (s *GoogleCloudContentwarehouseV1TimestampArray) MarshalJSON() ([]byte, error) { 3714 type NoMethod GoogleCloudContentwarehouseV1TimestampArray 3715 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3716 } 3717 3718 // GoogleCloudContentwarehouseV1TimestampTypeOptions: Configurations for a 3719 // timestamp property. 3720 type GoogleCloudContentwarehouseV1TimestampTypeOptions struct { 3721 } 3722 3723 // GoogleCloudContentwarehouseV1TimestampValue: Timestamp value type. 3724 type GoogleCloudContentwarehouseV1TimestampValue struct { 3725 // TextValue: The string must represent a valid instant in UTC and is parsed 3726 // using java.time.format.DateTimeFormatter.ISO_INSTANT. e.g. 3727 // "2013-09-29T18:46:19Z" 3728 TextValue string `json:"textValue,omitempty"` 3729 // TimestampValue: Timestamp value 3730 TimestampValue string `json:"timestampValue,omitempty"` 3731 // ForceSendFields is a list of field names (e.g. "TextValue") to 3732 // unconditionally include in API requests. By default, fields with empty or 3733 // default values are omitted from API requests. See 3734 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3735 // details. 3736 ForceSendFields []string `json:"-"` 3737 // NullFields is a list of field names (e.g. "TextValue") to include in API 3738 // requests with the JSON null value. By default, fields with empty values are 3739 // omitted from API requests. See 3740 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3741 NullFields []string `json:"-"` 3742 } 3743 3744 func (s *GoogleCloudContentwarehouseV1TimestampValue) MarshalJSON() ([]byte, error) { 3745 type NoMethod GoogleCloudContentwarehouseV1TimestampValue 3746 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3747 } 3748 3749 // GoogleCloudContentwarehouseV1UpdateDocumentMetadata: Metadata object for 3750 // UpdateDocument request (currently empty). 3751 type GoogleCloudContentwarehouseV1UpdateDocumentMetadata struct { 3752 } 3753 3754 // GoogleCloudContentwarehouseV1UpdateDocumentRequest: Request message for 3755 // DocumentService.UpdateDocument. 3756 type GoogleCloudContentwarehouseV1UpdateDocumentRequest struct { 3757 // CloudAiDocumentOption: Request Option for processing Cloud AI Document in 3758 // Document Warehouse. This field offers limited support for mapping entities 3759 // from Cloud AI Document to Warehouse Document. Please consult with product 3760 // team before using this field and other available options. 3761 CloudAiDocumentOption *GoogleCloudContentwarehouseV1CloudAIDocumentOption `json:"cloudAiDocumentOption,omitempty"` 3762 // Document: Required. The document to update. 3763 Document *GoogleCloudContentwarehouseV1Document `json:"document,omitempty"` 3764 // RequestMetadata: The meta information collected about the end user, used to 3765 // enforce access control for the service. 3766 RequestMetadata *GoogleCloudContentwarehouseV1RequestMetadata `json:"requestMetadata,omitempty"` 3767 // UpdateOptions: Options for the update operation. 3768 UpdateOptions *GoogleCloudContentwarehouseV1UpdateOptions `json:"updateOptions,omitempty"` 3769 // ForceSendFields is a list of field names (e.g. "CloudAiDocumentOption") to 3770 // unconditionally include in API requests. By default, fields with empty or 3771 // default values are omitted from API requests. See 3772 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3773 // details. 3774 ForceSendFields []string `json:"-"` 3775 // NullFields is a list of field names (e.g. "CloudAiDocumentOption") to 3776 // include in API requests with the JSON null value. By default, fields with 3777 // empty values are omitted from API requests. See 3778 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3779 NullFields []string `json:"-"` 3780 } 3781 3782 func (s *GoogleCloudContentwarehouseV1UpdateDocumentRequest) MarshalJSON() ([]byte, error) { 3783 type NoMethod GoogleCloudContentwarehouseV1UpdateDocumentRequest 3784 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3785 } 3786 3787 // GoogleCloudContentwarehouseV1UpdateDocumentResponse: Response message for 3788 // DocumentService.UpdateDocument. 3789 type GoogleCloudContentwarehouseV1UpdateDocumentResponse struct { 3790 // Document: Updated document after executing update request. 3791 Document *GoogleCloudContentwarehouseV1Document `json:"document,omitempty"` 3792 // Metadata: Additional information for the API invocation, such as the request 3793 // tracking id. 3794 Metadata *GoogleCloudContentwarehouseV1ResponseMetadata `json:"metadata,omitempty"` 3795 // RuleEngineOutput: Output from Rule Engine recording the rule evaluator and 3796 // action executor's output. Refer format in: 3797 // google/cloud/contentwarehouse/v1/rule_engine.proto 3798 RuleEngineOutput *GoogleCloudContentwarehouseV1RuleEngineOutput `json:"ruleEngineOutput,omitempty"` 3799 3800 // ServerResponse contains the HTTP response code and headers from the server. 3801 googleapi.ServerResponse `json:"-"` 3802 // ForceSendFields is a list of field names (e.g. "Document") to 3803 // unconditionally include in API requests. By default, fields with empty or 3804 // default values are omitted from API requests. See 3805 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3806 // details. 3807 ForceSendFields []string `json:"-"` 3808 // NullFields is a list of field names (e.g. "Document") to include in API 3809 // requests with the JSON null value. By default, fields with empty values are 3810 // omitted from API requests. See 3811 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3812 NullFields []string `json:"-"` 3813 } 3814 3815 func (s *GoogleCloudContentwarehouseV1UpdateDocumentResponse) MarshalJSON() ([]byte, error) { 3816 type NoMethod GoogleCloudContentwarehouseV1UpdateDocumentResponse 3817 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3818 } 3819 3820 // GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest: Request message 3821 // for DocumentSchemaService.UpdateDocumentSchema. 3822 type GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest struct { 3823 // DocumentSchema: Required. The document schema to update with. 3824 DocumentSchema *GoogleCloudContentwarehouseV1DocumentSchema `json:"documentSchema,omitempty"` 3825 // ForceSendFields is a list of field names (e.g. "DocumentSchema") to 3826 // unconditionally include in API requests. By default, fields with empty or 3827 // default values are omitted from API requests. See 3828 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3829 // details. 3830 ForceSendFields []string `json:"-"` 3831 // NullFields is a list of field names (e.g. "DocumentSchema") to include in 3832 // API requests with the JSON null value. By default, fields with empty values 3833 // are omitted from API requests. See 3834 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3835 NullFields []string `json:"-"` 3836 } 3837 3838 func (s *GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest) MarshalJSON() ([]byte, error) { 3839 type NoMethod GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest 3840 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3841 } 3842 3843 // GoogleCloudContentwarehouseV1UpdateOptions: Options for Update operations. 3844 type GoogleCloudContentwarehouseV1UpdateOptions struct { 3845 // MergeFieldsOptions: Options for merging. 3846 MergeFieldsOptions *GoogleCloudContentwarehouseV1MergeFieldsOptions `json:"mergeFieldsOptions,omitempty"` 3847 // UpdateMask: Field mask for merging Document fields. For the `FieldMask` 3848 // definition, see 3849 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 3850 UpdateMask string `json:"updateMask,omitempty"` 3851 // UpdateType: Type for update. 3852 // 3853 // Possible values: 3854 // "UPDATE_TYPE_UNSPECIFIED" - Defaults to full replace behavior, ie. 3855 // FULL_REPLACE. 3856 // "UPDATE_TYPE_REPLACE" - Fully replace all the fields (including previously 3857 // linked raw document). Any field masks will be ignored. 3858 // "UPDATE_TYPE_MERGE" - Merge the fields into the existing entities. 3859 // "UPDATE_TYPE_INSERT_PROPERTIES_BY_NAMES" - Inserts the properties by 3860 // names. 3861 // "UPDATE_TYPE_REPLACE_PROPERTIES_BY_NAMES" - Replace the properties by 3862 // names. 3863 // "UPDATE_TYPE_DELETE_PROPERTIES_BY_NAMES" - Delete the properties by names. 3864 // "UPDATE_TYPE_MERGE_AND_REPLACE_OR_INSERT_PROPERTIES_BY_NAMES" - For each 3865 // of the property, replaces the property if the it exists, otherwise inserts a 3866 // new property. And for the rest of the fields, merge them based on update 3867 // mask and merge fields options. 3868 UpdateType string `json:"updateType,omitempty"` 3869 // ForceSendFields is a list of field names (e.g. "MergeFieldsOptions") to 3870 // unconditionally include in API requests. By default, fields with empty or 3871 // default values are omitted from API requests. See 3872 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3873 // details. 3874 ForceSendFields []string `json:"-"` 3875 // NullFields is a list of field names (e.g. "MergeFieldsOptions") to include 3876 // in API requests with the JSON null value. By default, fields with empty 3877 // values are omitted from API requests. See 3878 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3879 NullFields []string `json:"-"` 3880 } 3881 3882 func (s *GoogleCloudContentwarehouseV1UpdateOptions) MarshalJSON() ([]byte, error) { 3883 type NoMethod GoogleCloudContentwarehouseV1UpdateOptions 3884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3885 } 3886 3887 // GoogleCloudContentwarehouseV1UpdateRuleSetRequest: Request message for 3888 // RuleSetService.UpdateRuleSet. 3889 type GoogleCloudContentwarehouseV1UpdateRuleSetRequest struct { 3890 // RuleSet: Required. The rule set to update. 3891 RuleSet *GoogleCloudContentwarehouseV1RuleSet `json:"ruleSet,omitempty"` 3892 // ForceSendFields is a list of field names (e.g. "RuleSet") to unconditionally 3893 // include in API requests. By default, fields with empty or default values are 3894 // omitted from API requests. See 3895 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3896 // details. 3897 ForceSendFields []string `json:"-"` 3898 // NullFields is a list of field names (e.g. "RuleSet") to include in API 3899 // requests with the JSON null value. By default, fields with empty values are 3900 // omitted from API requests. See 3901 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3902 NullFields []string `json:"-"` 3903 } 3904 3905 func (s *GoogleCloudContentwarehouseV1UpdateRuleSetRequest) MarshalJSON() ([]byte, error) { 3906 type NoMethod GoogleCloudContentwarehouseV1UpdateRuleSetRequest 3907 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3908 } 3909 3910 // GoogleCloudContentwarehouseV1UserInfo: The user information. 3911 type GoogleCloudContentwarehouseV1UserInfo struct { 3912 // GroupIds: The unique group identifications which the user is belong to. The 3913 // format is "group:yyyy@example.com"; 3914 GroupIds []string `json:"groupIds,omitempty"` 3915 // Id: A unique user identification string, as determined by the client. The 3916 // maximum number of allowed characters is 255. Allowed characters include 3917 // numbers 0 to 9, uppercase and lowercase letters, and restricted special 3918 // symbols (:, @, +, -, _, ~) The format is "user:xxxx@example.com"; 3919 Id string `json:"id,omitempty"` 3920 // ForceSendFields is a list of field names (e.g. "GroupIds") to 3921 // unconditionally include in API requests. By default, fields with empty or 3922 // default values are omitted from API requests. See 3923 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3924 // details. 3925 ForceSendFields []string `json:"-"` 3926 // NullFields is a list of field names (e.g. "GroupIds") to include in API 3927 // requests with the JSON null value. By default, fields with empty values are 3928 // omitted from API requests. See 3929 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3930 NullFields []string `json:"-"` 3931 } 3932 3933 func (s *GoogleCloudContentwarehouseV1UserInfo) MarshalJSON() ([]byte, error) { 3934 type NoMethod GoogleCloudContentwarehouseV1UserInfo 3935 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3936 } 3937 3938 // GoogleCloudContentwarehouseV1Value: `Value` represents a dynamically typed 3939 // value which can be either be a float, a integer, a string, or a datetime 3940 // value. A producer of value is expected to set one of these variants. Absence 3941 // of any variant indicates an error. 3942 type GoogleCloudContentwarehouseV1Value struct { 3943 // BooleanValue: Represents a boolean value. 3944 BooleanValue bool `json:"booleanValue,omitempty"` 3945 // DatetimeValue: Represents a datetime value. 3946 DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` 3947 // EnumValue: Represents an enum value. 3948 EnumValue *GoogleCloudContentwarehouseV1EnumValue `json:"enumValue,omitempty"` 3949 // FloatValue: Represents a float value. 3950 FloatValue float64 `json:"floatValue,omitempty"` 3951 // IntValue: Represents a integer value. 3952 IntValue int64 `json:"intValue,omitempty"` 3953 // StringValue: Represents a string value. 3954 StringValue string `json:"stringValue,omitempty"` 3955 // TimestampValue: Represents a timestamp value. 3956 TimestampValue *GoogleCloudContentwarehouseV1TimestampValue `json:"timestampValue,omitempty"` 3957 // ForceSendFields is a list of field names (e.g. "BooleanValue") to 3958 // unconditionally include in API requests. By default, fields with empty or 3959 // default values are omitted from API requests. See 3960 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 3961 // details. 3962 ForceSendFields []string `json:"-"` 3963 // NullFields is a list of field names (e.g. "BooleanValue") to include in API 3964 // requests with the JSON null value. By default, fields with empty values are 3965 // omitted from API requests. See 3966 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 3967 NullFields []string `json:"-"` 3968 } 3969 3970 func (s *GoogleCloudContentwarehouseV1Value) MarshalJSON() ([]byte, error) { 3971 type NoMethod GoogleCloudContentwarehouseV1Value 3972 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 3973 } 3974 3975 func (s *GoogleCloudContentwarehouseV1Value) UnmarshalJSON(data []byte) error { 3976 type NoMethod GoogleCloudContentwarehouseV1Value 3977 var s1 struct { 3978 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 3979 *NoMethod 3980 } 3981 s1.NoMethod = (*NoMethod)(s) 3982 if err := json.Unmarshal(data, &s1); err != nil { 3983 return err 3984 } 3985 s.FloatValue = float64(s1.FloatValue) 3986 return nil 3987 } 3988 3989 // GoogleCloudContentwarehouseV1WeightedSchemaProperty: Specifies the schema 3990 // property name. 3991 type GoogleCloudContentwarehouseV1WeightedSchemaProperty struct { 3992 // DocumentSchemaName: The document schema name. 3993 DocumentSchemaName string `json:"documentSchemaName,omitempty"` 3994 // PropertyNames: The property definition names in the schema. 3995 PropertyNames []string `json:"propertyNames,omitempty"` 3996 // ForceSendFields is a list of field names (e.g. "DocumentSchemaName") to 3997 // unconditionally include in API requests. By default, fields with empty or 3998 // default values are omitted from API requests. See 3999 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4000 // details. 4001 ForceSendFields []string `json:"-"` 4002 // NullFields is a list of field names (e.g. "DocumentSchemaName") to include 4003 // in API requests with the JSON null value. By default, fields with empty 4004 // values are omitted from API requests. See 4005 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4006 NullFields []string `json:"-"` 4007 } 4008 4009 func (s *GoogleCloudContentwarehouseV1WeightedSchemaProperty) MarshalJSON() ([]byte, error) { 4010 type NoMethod GoogleCloudContentwarehouseV1WeightedSchemaProperty 4011 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4012 } 4013 4014 // GoogleCloudContentwarehouseV1beta1CreateDocumentMetadata: Metadata object 4015 // for CreateDocument request (currently empty). 4016 type GoogleCloudContentwarehouseV1beta1CreateDocumentMetadata struct { 4017 } 4018 4019 // GoogleCloudContentwarehouseV1beta1InitializeProjectResponse: Response 4020 // message for projectService.InitializeProject 4021 type GoogleCloudContentwarehouseV1beta1InitializeProjectResponse struct { 4022 // Message: The message of the project initialization process. 4023 Message string `json:"message,omitempty"` 4024 // State: The state of the project initialization process. 4025 // 4026 // Possible values: 4027 // "STATE_UNSPECIFIED" - Clients should never see this. 4028 // "SUCCEEDED" - Finished project initialization without error. 4029 // "FAILED" - Finished project initialization with an error. 4030 // "CANCELLED" - Client canceled the LRO. 4031 // "RUNNING" - Ask the customer to check the operation for results. 4032 State string `json:"state,omitempty"` 4033 // ForceSendFields is a list of field names (e.g. "Message") to unconditionally 4034 // include in API requests. By default, fields with empty or default values are 4035 // omitted from API requests. See 4036 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4037 // details. 4038 ForceSendFields []string `json:"-"` 4039 // NullFields is a list of field names (e.g. "Message") to include in API 4040 // requests with the JSON null value. By default, fields with empty values are 4041 // omitted from API requests. See 4042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4043 NullFields []string `json:"-"` 4044 } 4045 4046 func (s *GoogleCloudContentwarehouseV1beta1InitializeProjectResponse) MarshalJSON() ([]byte, error) { 4047 type NoMethod GoogleCloudContentwarehouseV1beta1InitializeProjectResponse 4048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4049 } 4050 4051 // GoogleCloudContentwarehouseV1beta1UpdateDocumentMetadata: Metadata object 4052 // for UpdateDocument request (currently empty). 4053 type GoogleCloudContentwarehouseV1beta1UpdateDocumentMetadata struct { 4054 } 4055 4056 // GoogleCloudDocumentaiV1Barcode: Encodes the detailed information of a 4057 // barcode. 4058 type GoogleCloudDocumentaiV1Barcode struct { 4059 // Format: Format of a barcode. The supported formats are: - `CODE_128`: Code 4060 // 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: 4061 // Codabar type. - `DATA_MATRIX`: 2D Data Matrix type. - `ITF`: ITF type. - 4062 // `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. 4063 // - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417 type. - 4064 // `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type. 4065 Format string `json:"format,omitempty"` 4066 // RawValue: Raw value encoded in the barcode. For example: 4067 // `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. 4068 RawValue string `json:"rawValue,omitempty"` 4069 // ValueFormat: Value format describes the format of the value that a barcode 4070 // encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - 4071 // `EMAIL`: Email address. - `ISBN`: ISBN identifier. - `PHONE`: Phone number. 4072 // - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: 4073 // URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization. - 4074 // `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license. 4075 ValueFormat string `json:"valueFormat,omitempty"` 4076 // ForceSendFields is a list of field names (e.g. "Format") to unconditionally 4077 // include in API requests. By default, fields with empty or default values are 4078 // omitted from API requests. See 4079 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4080 // details. 4081 ForceSendFields []string `json:"-"` 4082 // NullFields is a list of field names (e.g. "Format") to include in API 4083 // requests with the JSON null value. By default, fields with empty values are 4084 // omitted from API requests. See 4085 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4086 NullFields []string `json:"-"` 4087 } 4088 4089 func (s *GoogleCloudDocumentaiV1Barcode) MarshalJSON() ([]byte, error) { 4090 type NoMethod GoogleCloudDocumentaiV1Barcode 4091 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4092 } 4093 4094 // GoogleCloudDocumentaiV1BoundingPoly: A bounding polygon for the detected 4095 // image annotation. 4096 type GoogleCloudDocumentaiV1BoundingPoly struct { 4097 // NormalizedVertices: The bounding polygon normalized vertices. 4098 NormalizedVertices []*GoogleCloudDocumentaiV1NormalizedVertex `json:"normalizedVertices,omitempty"` 4099 // Vertices: The bounding polygon vertices. 4100 Vertices []*GoogleCloudDocumentaiV1Vertex `json:"vertices,omitempty"` 4101 // ForceSendFields is a list of field names (e.g. "NormalizedVertices") to 4102 // unconditionally include in API requests. By default, fields with empty or 4103 // default values are omitted from API requests. See 4104 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4105 // details. 4106 ForceSendFields []string `json:"-"` 4107 // NullFields is a list of field names (e.g. "NormalizedVertices") to include 4108 // in API requests with the JSON null value. By default, fields with empty 4109 // values are omitted from API requests. See 4110 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4111 NullFields []string `json:"-"` 4112 } 4113 4114 func (s *GoogleCloudDocumentaiV1BoundingPoly) MarshalJSON() ([]byte, error) { 4115 type NoMethod GoogleCloudDocumentaiV1BoundingPoly 4116 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4117 } 4118 4119 // GoogleCloudDocumentaiV1Document: Document represents the canonical document 4120 // resource in Document AI. It is an interchange format that provides insights 4121 // into documents and allows for collaboration between users and Document AI to 4122 // iterate and optimize for quality. 4123 type GoogleCloudDocumentaiV1Document struct { 4124 // Content: Optional. Inline document content, represented as a stream of 4125 // bytes. Note: As with all `bytes` fields, protobuffers use a pure binary 4126 // representation, whereas JSON representations use base64. 4127 Content string `json:"content,omitempty"` 4128 // Entities: A list of entities detected on Document.text. For document shards, 4129 // entities in this list may cross shard boundaries. 4130 Entities []*GoogleCloudDocumentaiV1DocumentEntity `json:"entities,omitempty"` 4131 // EntityRelations: Placeholder. Relationship among Document.entities. 4132 EntityRelations []*GoogleCloudDocumentaiV1DocumentEntityRelation `json:"entityRelations,omitempty"` 4133 // Error: Any error that occurred while processing this document. 4134 Error *GoogleRpcStatus `json:"error,omitempty"` 4135 // MimeType: An IANA published media type (MIME type) 4136 // (https://www.iana.org/assignments/media-types/media-types.xhtml). 4137 MimeType string `json:"mimeType,omitempty"` 4138 // Pages: Visual page layout for the Document. 4139 Pages []*GoogleCloudDocumentaiV1DocumentPage `json:"pages,omitempty"` 4140 // Revisions: Placeholder. Revision history of this document. 4141 Revisions []*GoogleCloudDocumentaiV1DocumentRevision `json:"revisions,omitempty"` 4142 // ShardInfo: Information about the sharding if this document is sharded part 4143 // of a larger document. If the document is not sharded, this message is not 4144 // specified. 4145 ShardInfo *GoogleCloudDocumentaiV1DocumentShardInfo `json:"shardInfo,omitempty"` 4146 // Text: Optional. UTF-8 encoded text in reading order from the document. 4147 Text string `json:"text,omitempty"` 4148 // TextChanges: Placeholder. A list of text corrections made to Document.text. 4149 // This is usually used for annotating corrections to OCR mistakes. Text 4150 // changes for a given revision may not overlap with each other. 4151 TextChanges []*GoogleCloudDocumentaiV1DocumentTextChange `json:"textChanges,omitempty"` 4152 // TextStyles: Styles for the Document.text. 4153 TextStyles []*GoogleCloudDocumentaiV1DocumentStyle `json:"textStyles,omitempty"` 4154 // Uri: Optional. Currently supports Google Cloud Storage URI of the form 4155 // `gs://bucket_name/object_name`. Object versioning is not supported. For more 4156 // information, refer to Google Cloud Storage Request URIs 4157 // (https://cloud.google.com/storage/docs/reference-uris). 4158 Uri string `json:"uri,omitempty"` 4159 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 4160 // include in API requests. By default, fields with empty or default values are 4161 // omitted from API requests. See 4162 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4163 // details. 4164 ForceSendFields []string `json:"-"` 4165 // NullFields is a list of field names (e.g. "Content") to include in API 4166 // requests with the JSON null value. By default, fields with empty values are 4167 // omitted from API requests. See 4168 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4169 NullFields []string `json:"-"` 4170 } 4171 4172 func (s *GoogleCloudDocumentaiV1Document) MarshalJSON() ([]byte, error) { 4173 type NoMethod GoogleCloudDocumentaiV1Document 4174 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4175 } 4176 4177 // GoogleCloudDocumentaiV1DocumentEntity: An entity that could be a phrase in 4178 // the text or a property that belongs to the document. It is a known entity 4179 // type, such as a person, an organization, or location. 4180 type GoogleCloudDocumentaiV1DocumentEntity struct { 4181 // Confidence: Optional. Confidence of detected Schema entity. Range `[0, 1]`. 4182 Confidence float64 `json:"confidence,omitempty"` 4183 // Id: Optional. Canonical id. This will be a unique value in the entity list 4184 // for this document. 4185 Id string `json:"id,omitempty"` 4186 // MentionId: Optional. Deprecated. Use `id` field instead. 4187 MentionId string `json:"mentionId,omitempty"` 4188 // MentionText: Optional. Text value of the entity e.g. `1600 Amphitheatre 4189 // Pkwy`. 4190 MentionText string `json:"mentionText,omitempty"` 4191 // NormalizedValue: Optional. Normalized entity value. Absent if the extracted 4192 // value could not be converted or the type (e.g. address) is not supported for 4193 // certain parsers. This field is also only populated for certain supported 4194 // document types. 4195 NormalizedValue *GoogleCloudDocumentaiV1DocumentEntityNormalizedValue `json:"normalizedValue,omitempty"` 4196 // PageAnchor: Optional. Represents the provenance of this entity wrt. the 4197 // location on the page where it was found. 4198 PageAnchor *GoogleCloudDocumentaiV1DocumentPageAnchor `json:"pageAnchor,omitempty"` 4199 // Properties: Optional. Entities can be nested to form a hierarchical data 4200 // structure representing the content in the document. 4201 Properties []*GoogleCloudDocumentaiV1DocumentEntity `json:"properties,omitempty"` 4202 // Provenance: Optional. The history of this annotation. 4203 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 4204 // Redacted: Optional. Whether the entity will be redacted for 4205 // de-identification purposes. 4206 Redacted bool `json:"redacted,omitempty"` 4207 // TextAnchor: Optional. Provenance of the entity. Text anchor indexing into 4208 // the Document.text. 4209 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 4210 // Type: Required. Entity type from a schema e.g. `Address`. 4211 Type string `json:"type,omitempty"` 4212 // ForceSendFields is a list of field names (e.g. "Confidence") to 4213 // unconditionally include in API requests. By default, fields with empty or 4214 // default values are omitted from API requests. See 4215 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4216 // details. 4217 ForceSendFields []string `json:"-"` 4218 // NullFields is a list of field names (e.g. "Confidence") to include in API 4219 // requests with the JSON null value. By default, fields with empty values are 4220 // omitted from API requests. See 4221 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4222 NullFields []string `json:"-"` 4223 } 4224 4225 func (s *GoogleCloudDocumentaiV1DocumentEntity) MarshalJSON() ([]byte, error) { 4226 type NoMethod GoogleCloudDocumentaiV1DocumentEntity 4227 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4228 } 4229 4230 func (s *GoogleCloudDocumentaiV1DocumentEntity) UnmarshalJSON(data []byte) error { 4231 type NoMethod GoogleCloudDocumentaiV1DocumentEntity 4232 var s1 struct { 4233 Confidence gensupport.JSONFloat64 `json:"confidence"` 4234 *NoMethod 4235 } 4236 s1.NoMethod = (*NoMethod)(s) 4237 if err := json.Unmarshal(data, &s1); err != nil { 4238 return err 4239 } 4240 s.Confidence = float64(s1.Confidence) 4241 return nil 4242 } 4243 4244 // GoogleCloudDocumentaiV1DocumentEntityNormalizedValue: Parsed and normalized 4245 // entity value. 4246 type GoogleCloudDocumentaiV1DocumentEntityNormalizedValue struct { 4247 // AddressValue: Postal address. See also: 4248 // https://github.com/googleapis/googleapis/blob/master/google/type/postal_address.proto 4249 AddressValue *GoogleTypePostalAddress `json:"addressValue,omitempty"` 4250 // BooleanValue: Boolean value. Can be used for entities with binary values, or 4251 // for checkboxes. 4252 BooleanValue bool `json:"booleanValue,omitempty"` 4253 // DateValue: Date value. Includes year, month, day. See also: 4254 // https://github.com/googleapis/googleapis/blob/master/google/type/date.proto 4255 DateValue *GoogleTypeDate `json:"dateValue,omitempty"` 4256 // DatetimeValue: DateTime value. Includes date, time, and timezone. See also: 4257 // https://github.com/googleapis/googleapis/blob/master/google/type/datetime.proto 4258 DatetimeValue *GoogleTypeDateTime `json:"datetimeValue,omitempty"` 4259 // FloatValue: Float value. 4260 FloatValue float64 `json:"floatValue,omitempty"` 4261 // IntegerValue: Integer value. 4262 IntegerValue int64 `json:"integerValue,omitempty"` 4263 // MoneyValue: Money value. See also: 4264 // https://github.com/googleapis/googleapis/blob/master/google/type/money.proto 4265 MoneyValue *GoogleTypeMoney `json:"moneyValue,omitempty"` 4266 // Text: Optional. An optional field to store a normalized string. For some 4267 // entity types, one of respective `structured_value` fields may also be 4268 // populated. Also not all the types of `structured_value` will be normalized. 4269 // For example, some processors may not generate `float` or `integer` 4270 // normalized text by default. Below are sample formats mapped to structured 4271 // values. - Money/Currency type (`money_value`) is in the ISO 4217 text 4272 // format. - Date type (`date_value`) is in the ISO 8601 text format. - 4273 // Datetime type (`datetime_value`) is in the ISO 8601 text format. 4274 Text string `json:"text,omitempty"` 4275 // ForceSendFields is a list of field names (e.g. "AddressValue") to 4276 // unconditionally include in API requests. By default, fields with empty or 4277 // default values are omitted from API requests. See 4278 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4279 // details. 4280 ForceSendFields []string `json:"-"` 4281 // NullFields is a list of field names (e.g. "AddressValue") to include in API 4282 // requests with the JSON null value. By default, fields with empty values are 4283 // omitted from API requests. See 4284 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4285 NullFields []string `json:"-"` 4286 } 4287 4288 func (s *GoogleCloudDocumentaiV1DocumentEntityNormalizedValue) MarshalJSON() ([]byte, error) { 4289 type NoMethod GoogleCloudDocumentaiV1DocumentEntityNormalizedValue 4290 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4291 } 4292 4293 func (s *GoogleCloudDocumentaiV1DocumentEntityNormalizedValue) UnmarshalJSON(data []byte) error { 4294 type NoMethod GoogleCloudDocumentaiV1DocumentEntityNormalizedValue 4295 var s1 struct { 4296 FloatValue gensupport.JSONFloat64 `json:"floatValue"` 4297 *NoMethod 4298 } 4299 s1.NoMethod = (*NoMethod)(s) 4300 if err := json.Unmarshal(data, &s1); err != nil { 4301 return err 4302 } 4303 s.FloatValue = float64(s1.FloatValue) 4304 return nil 4305 } 4306 4307 // GoogleCloudDocumentaiV1DocumentEntityRelation: Relationship between 4308 // Entities. 4309 type GoogleCloudDocumentaiV1DocumentEntityRelation struct { 4310 // ObjectId: Object entity id. 4311 ObjectId string `json:"objectId,omitempty"` 4312 // Relation: Relationship description. 4313 Relation string `json:"relation,omitempty"` 4314 // SubjectId: Subject entity id. 4315 SubjectId string `json:"subjectId,omitempty"` 4316 // ForceSendFields is a list of field names (e.g. "ObjectId") to 4317 // unconditionally include in API requests. By default, fields with empty or 4318 // default values are omitted from API requests. See 4319 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4320 // details. 4321 ForceSendFields []string `json:"-"` 4322 // NullFields is a list of field names (e.g. "ObjectId") to include in API 4323 // requests with the JSON null value. By default, fields with empty values are 4324 // omitted from API requests. See 4325 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4326 NullFields []string `json:"-"` 4327 } 4328 4329 func (s *GoogleCloudDocumentaiV1DocumentEntityRelation) MarshalJSON() ([]byte, error) { 4330 type NoMethod GoogleCloudDocumentaiV1DocumentEntityRelation 4331 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4332 } 4333 4334 // GoogleCloudDocumentaiV1DocumentPage: A page in a Document. 4335 type GoogleCloudDocumentaiV1DocumentPage struct { 4336 // Blocks: A list of visually detected text blocks on the page. A block has a 4337 // set of lines (collected into paragraphs) that have a common line-spacing and 4338 // orientation. 4339 Blocks []*GoogleCloudDocumentaiV1DocumentPageBlock `json:"blocks,omitempty"` 4340 // DetectedBarcodes: A list of detected barcodes. 4341 DetectedBarcodes []*GoogleCloudDocumentaiV1DocumentPageDetectedBarcode `json:"detectedBarcodes,omitempty"` 4342 // DetectedLanguages: A list of detected languages together with confidence. 4343 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 4344 // Dimension: Physical dimension of the page. 4345 Dimension *GoogleCloudDocumentaiV1DocumentPageDimension `json:"dimension,omitempty"` 4346 // FormFields: A list of visually detected form fields on the page. 4347 FormFields []*GoogleCloudDocumentaiV1DocumentPageFormField `json:"formFields,omitempty"` 4348 // Image: Rendered image for this page. This image is preprocessed to remove 4349 // any skew, rotation, and distortions such that the annotation bounding boxes 4350 // can be upright and axis-aligned. 4351 Image *GoogleCloudDocumentaiV1DocumentPageImage `json:"image,omitempty"` 4352 // ImageQualityScores: Image quality scores. 4353 ImageQualityScores *GoogleCloudDocumentaiV1DocumentPageImageQualityScores `json:"imageQualityScores,omitempty"` 4354 // Layout: Layout for the page. 4355 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4356 // Lines: A list of visually detected text lines on the page. A collection of 4357 // tokens that a human would perceive as a line. 4358 Lines []*GoogleCloudDocumentaiV1DocumentPageLine `json:"lines,omitempty"` 4359 // PageNumber: 1-based index for current Page in a parent Document. Useful when 4360 // a page is taken out of a Document for individual processing. 4361 PageNumber int64 `json:"pageNumber,omitempty"` 4362 // Paragraphs: A list of visually detected text paragraphs on the page. A 4363 // collection of lines that a human would perceive as a paragraph. 4364 Paragraphs []*GoogleCloudDocumentaiV1DocumentPageParagraph `json:"paragraphs,omitempty"` 4365 // Provenance: The history of this page. 4366 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 4367 // Symbols: A list of visually detected symbols on the page. 4368 Symbols []*GoogleCloudDocumentaiV1DocumentPageSymbol `json:"symbols,omitempty"` 4369 // Tables: A list of visually detected tables on the page. 4370 Tables []*GoogleCloudDocumentaiV1DocumentPageTable `json:"tables,omitempty"` 4371 // Tokens: A list of visually detected tokens on the page. 4372 Tokens []*GoogleCloudDocumentaiV1DocumentPageToken `json:"tokens,omitempty"` 4373 // Transforms: Transformation matrices that were applied to the original 4374 // document image to produce Page.image. 4375 Transforms []*GoogleCloudDocumentaiV1DocumentPageMatrix `json:"transforms,omitempty"` 4376 // VisualElements: A list of detected non-text visual elements e.g. checkbox, 4377 // signature etc. on the page. 4378 VisualElements []*GoogleCloudDocumentaiV1DocumentPageVisualElement `json:"visualElements,omitempty"` 4379 // ForceSendFields is a list of field names (e.g. "Blocks") to unconditionally 4380 // include in API requests. By default, fields with empty or default values are 4381 // omitted from API requests. See 4382 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4383 // details. 4384 ForceSendFields []string `json:"-"` 4385 // NullFields is a list of field names (e.g. "Blocks") to include in API 4386 // requests with the JSON null value. By default, fields with empty values are 4387 // omitted from API requests. See 4388 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4389 NullFields []string `json:"-"` 4390 } 4391 4392 func (s *GoogleCloudDocumentaiV1DocumentPage) MarshalJSON() ([]byte, error) { 4393 type NoMethod GoogleCloudDocumentaiV1DocumentPage 4394 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4395 } 4396 4397 // GoogleCloudDocumentaiV1DocumentPageAnchor: Referencing the visual context of 4398 // the entity in the Document.pages. Page anchors can be cross-page, consist of 4399 // multiple bounding polygons and optionally reference specific layout element 4400 // types. 4401 type GoogleCloudDocumentaiV1DocumentPageAnchor struct { 4402 // PageRefs: One or more references to visual page elements 4403 PageRefs []*GoogleCloudDocumentaiV1DocumentPageAnchorPageRef `json:"pageRefs,omitempty"` 4404 // ForceSendFields is a list of field names (e.g. "PageRefs") to 4405 // unconditionally include in API requests. By default, fields with empty or 4406 // default values are omitted from API requests. See 4407 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4408 // details. 4409 ForceSendFields []string `json:"-"` 4410 // NullFields is a list of field names (e.g. "PageRefs") to include in API 4411 // requests with the JSON null value. By default, fields with empty values are 4412 // omitted from API requests. See 4413 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4414 NullFields []string `json:"-"` 4415 } 4416 4417 func (s *GoogleCloudDocumentaiV1DocumentPageAnchor) MarshalJSON() ([]byte, error) { 4418 type NoMethod GoogleCloudDocumentaiV1DocumentPageAnchor 4419 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4420 } 4421 4422 // GoogleCloudDocumentaiV1DocumentPageAnchorPageRef: Represents a weak 4423 // reference to a page element within a document. 4424 type GoogleCloudDocumentaiV1DocumentPageAnchorPageRef struct { 4425 // BoundingPoly: Optional. Identifies the bounding polygon of a layout element 4426 // on the page. If `layout_type` is set, the bounding polygon must be exactly 4427 // the same to the layout element it's referring to. 4428 BoundingPoly *GoogleCloudDocumentaiV1BoundingPoly `json:"boundingPoly,omitempty"` 4429 // Confidence: Optional. Confidence of detected page element, if applicable. 4430 // Range `[0, 1]`. 4431 Confidence float64 `json:"confidence,omitempty"` 4432 // LayoutId: Optional. Deprecated. Use PageRef.bounding_poly instead. 4433 LayoutId string `json:"layoutId,omitempty"` 4434 // LayoutType: Optional. The type of the layout element that is being 4435 // referenced if any. 4436 // 4437 // Possible values: 4438 // "LAYOUT_TYPE_UNSPECIFIED" - Layout Unspecified. 4439 // "BLOCK" - References a Page.blocks element. 4440 // "PARAGRAPH" - References a Page.paragraphs element. 4441 // "LINE" - References a Page.lines element. 4442 // "TOKEN" - References a Page.tokens element. 4443 // "VISUAL_ELEMENT" - References a Page.visual_elements element. 4444 // "TABLE" - Refrrences a Page.tables element. 4445 // "FORM_FIELD" - References a Page.form_fields element. 4446 LayoutType string `json:"layoutType,omitempty"` 4447 // Page: Required. Index into the Document.pages element, for example using 4448 // `Document.pages` to locate the related page element. This field is skipped 4449 // when its value is the default `0`. See 4450 // https://developers.google.com/protocol-buffers/docs/proto3#json. 4451 Page int64 `json:"page,omitempty,string"` 4452 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 4453 // unconditionally include in API requests. By default, fields with empty or 4454 // default values are omitted from API requests. See 4455 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4456 // details. 4457 ForceSendFields []string `json:"-"` 4458 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 4459 // requests with the JSON null value. By default, fields with empty values are 4460 // omitted from API requests. See 4461 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4462 NullFields []string `json:"-"` 4463 } 4464 4465 func (s *GoogleCloudDocumentaiV1DocumentPageAnchorPageRef) MarshalJSON() ([]byte, error) { 4466 type NoMethod GoogleCloudDocumentaiV1DocumentPageAnchorPageRef 4467 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4468 } 4469 4470 func (s *GoogleCloudDocumentaiV1DocumentPageAnchorPageRef) UnmarshalJSON(data []byte) error { 4471 type NoMethod GoogleCloudDocumentaiV1DocumentPageAnchorPageRef 4472 var s1 struct { 4473 Confidence gensupport.JSONFloat64 `json:"confidence"` 4474 *NoMethod 4475 } 4476 s1.NoMethod = (*NoMethod)(s) 4477 if err := json.Unmarshal(data, &s1); err != nil { 4478 return err 4479 } 4480 s.Confidence = float64(s1.Confidence) 4481 return nil 4482 } 4483 4484 // GoogleCloudDocumentaiV1DocumentPageBlock: A block has a set of lines 4485 // (collected into paragraphs) that have a common line-spacing and orientation. 4486 type GoogleCloudDocumentaiV1DocumentPageBlock struct { 4487 // DetectedLanguages: A list of detected languages together with confidence. 4488 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 4489 // Layout: Layout for Block. 4490 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4491 // Provenance: The history of this annotation. 4492 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 4493 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 4494 // unconditionally include in API requests. By default, fields with empty or 4495 // default values are omitted from API requests. See 4496 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4497 // details. 4498 ForceSendFields []string `json:"-"` 4499 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 4500 // API requests with the JSON null value. By default, fields with empty values 4501 // are omitted from API requests. See 4502 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4503 NullFields []string `json:"-"` 4504 } 4505 4506 func (s *GoogleCloudDocumentaiV1DocumentPageBlock) MarshalJSON() ([]byte, error) { 4507 type NoMethod GoogleCloudDocumentaiV1DocumentPageBlock 4508 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4509 } 4510 4511 // GoogleCloudDocumentaiV1DocumentPageDetectedBarcode: A detected barcode. 4512 type GoogleCloudDocumentaiV1DocumentPageDetectedBarcode struct { 4513 // Barcode: Detailed barcode information of the DetectedBarcode. 4514 Barcode *GoogleCloudDocumentaiV1Barcode `json:"barcode,omitempty"` 4515 // Layout: Layout for DetectedBarcode. 4516 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4517 // ForceSendFields is a list of field names (e.g. "Barcode") to unconditionally 4518 // include in API requests. By default, fields with empty or default values are 4519 // omitted from API requests. See 4520 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4521 // details. 4522 ForceSendFields []string `json:"-"` 4523 // NullFields is a list of field names (e.g. "Barcode") to include in API 4524 // requests with the JSON null value. By default, fields with empty values are 4525 // omitted from API requests. See 4526 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4527 NullFields []string `json:"-"` 4528 } 4529 4530 func (s *GoogleCloudDocumentaiV1DocumentPageDetectedBarcode) MarshalJSON() ([]byte, error) { 4531 type NoMethod GoogleCloudDocumentaiV1DocumentPageDetectedBarcode 4532 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4533 } 4534 4535 // GoogleCloudDocumentaiV1DocumentPageDetectedLanguage: Detected language for a 4536 // structural component. 4537 type GoogleCloudDocumentaiV1DocumentPageDetectedLanguage struct { 4538 // Confidence: Confidence of detected language. Range `[0, 1]`. 4539 Confidence float64 `json:"confidence,omitempty"` 4540 // LanguageCode: The BCP-47 language code 4541 // (https://www.unicode.org/reports/tr35/#Unicode_locale_identifier), such as 4542 // `en-US` or `sr-Latn`. 4543 LanguageCode string `json:"languageCode,omitempty"` 4544 // ForceSendFields is a list of field names (e.g. "Confidence") to 4545 // unconditionally include in API requests. By default, fields with empty or 4546 // default values are omitted from API requests. See 4547 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4548 // details. 4549 ForceSendFields []string `json:"-"` 4550 // NullFields is a list of field names (e.g. "Confidence") to include in API 4551 // requests with the JSON null value. By default, fields with empty values are 4552 // omitted from API requests. See 4553 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4554 NullFields []string `json:"-"` 4555 } 4556 4557 func (s *GoogleCloudDocumentaiV1DocumentPageDetectedLanguage) MarshalJSON() ([]byte, error) { 4558 type NoMethod GoogleCloudDocumentaiV1DocumentPageDetectedLanguage 4559 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4560 } 4561 4562 func (s *GoogleCloudDocumentaiV1DocumentPageDetectedLanguage) UnmarshalJSON(data []byte) error { 4563 type NoMethod GoogleCloudDocumentaiV1DocumentPageDetectedLanguage 4564 var s1 struct { 4565 Confidence gensupport.JSONFloat64 `json:"confidence"` 4566 *NoMethod 4567 } 4568 s1.NoMethod = (*NoMethod)(s) 4569 if err := json.Unmarshal(data, &s1); err != nil { 4570 return err 4571 } 4572 s.Confidence = float64(s1.Confidence) 4573 return nil 4574 } 4575 4576 // GoogleCloudDocumentaiV1DocumentPageDimension: Dimension for the page. 4577 type GoogleCloudDocumentaiV1DocumentPageDimension struct { 4578 // Height: Page height. 4579 Height float64 `json:"height,omitempty"` 4580 // Unit: Dimension unit. 4581 Unit string `json:"unit,omitempty"` 4582 // Width: Page width. 4583 Width float64 `json:"width,omitempty"` 4584 // ForceSendFields is a list of field names (e.g. "Height") to unconditionally 4585 // include in API requests. By default, fields with empty or default values are 4586 // omitted from API requests. See 4587 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4588 // details. 4589 ForceSendFields []string `json:"-"` 4590 // NullFields is a list of field names (e.g. "Height") to include in API 4591 // requests with the JSON null value. By default, fields with empty values are 4592 // omitted from API requests. See 4593 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4594 NullFields []string `json:"-"` 4595 } 4596 4597 func (s *GoogleCloudDocumentaiV1DocumentPageDimension) MarshalJSON() ([]byte, error) { 4598 type NoMethod GoogleCloudDocumentaiV1DocumentPageDimension 4599 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4600 } 4601 4602 func (s *GoogleCloudDocumentaiV1DocumentPageDimension) UnmarshalJSON(data []byte) error { 4603 type NoMethod GoogleCloudDocumentaiV1DocumentPageDimension 4604 var s1 struct { 4605 Height gensupport.JSONFloat64 `json:"height"` 4606 Width gensupport.JSONFloat64 `json:"width"` 4607 *NoMethod 4608 } 4609 s1.NoMethod = (*NoMethod)(s) 4610 if err := json.Unmarshal(data, &s1); err != nil { 4611 return err 4612 } 4613 s.Height = float64(s1.Height) 4614 s.Width = float64(s1.Width) 4615 return nil 4616 } 4617 4618 // GoogleCloudDocumentaiV1DocumentPageFormField: A form field detected on the 4619 // page. 4620 type GoogleCloudDocumentaiV1DocumentPageFormField struct { 4621 // CorrectedKeyText: Created for Labeling UI to export key text. If corrections 4622 // were made to the text identified by the `field_name.text_anchor`, this field 4623 // will contain the correction. 4624 CorrectedKeyText string `json:"correctedKeyText,omitempty"` 4625 // CorrectedValueText: Created for Labeling UI to export value text. If 4626 // corrections were made to the text identified by the 4627 // `field_value.text_anchor`, this field will contain the correction. 4628 CorrectedValueText string `json:"correctedValueText,omitempty"` 4629 // FieldName: Layout for the FormField name. e.g. `Address`, `Email`, `Grand 4630 // total`, `Phone number`, etc. 4631 FieldName *GoogleCloudDocumentaiV1DocumentPageLayout `json:"fieldName,omitempty"` 4632 // FieldValue: Layout for the FormField value. 4633 FieldValue *GoogleCloudDocumentaiV1DocumentPageLayout `json:"fieldValue,omitempty"` 4634 // NameDetectedLanguages: A list of detected languages for name together with 4635 // confidence. 4636 NameDetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"nameDetectedLanguages,omitempty"` 4637 // Provenance: The history of this annotation. 4638 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 4639 // ValueDetectedLanguages: A list of detected languages for value together with 4640 // confidence. 4641 ValueDetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"valueDetectedLanguages,omitempty"` 4642 // ValueType: If the value is non-textual, this field represents the type. 4643 // Current valid values are: - blank (this indicates the `field_value` is 4644 // normal text) - `unfilled_checkbox` - `filled_checkbox` 4645 ValueType string `json:"valueType,omitempty"` 4646 // ForceSendFields is a list of field names (e.g. "CorrectedKeyText") to 4647 // unconditionally include in API requests. By default, fields with empty or 4648 // default values are omitted from API requests. See 4649 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4650 // details. 4651 ForceSendFields []string `json:"-"` 4652 // NullFields is a list of field names (e.g. "CorrectedKeyText") to include in 4653 // API requests with the JSON null value. By default, fields with empty values 4654 // are omitted from API requests. See 4655 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4656 NullFields []string `json:"-"` 4657 } 4658 4659 func (s *GoogleCloudDocumentaiV1DocumentPageFormField) MarshalJSON() ([]byte, error) { 4660 type NoMethod GoogleCloudDocumentaiV1DocumentPageFormField 4661 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4662 } 4663 4664 // GoogleCloudDocumentaiV1DocumentPageImage: Rendered image contents for this 4665 // page. 4666 type GoogleCloudDocumentaiV1DocumentPageImage struct { 4667 // Content: Raw byte content of the image. 4668 Content string `json:"content,omitempty"` 4669 // Height: Height of the image in pixels. 4670 Height int64 `json:"height,omitempty"` 4671 // MimeType: Encoding media type (MIME type) 4672 // (https://www.iana.org/assignments/media-types/media-types.xhtml) for the 4673 // image. 4674 MimeType string `json:"mimeType,omitempty"` 4675 // Width: Width of the image in pixels. 4676 Width int64 `json:"width,omitempty"` 4677 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 4678 // include in API requests. By default, fields with empty or default values are 4679 // omitted from API requests. See 4680 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4681 // details. 4682 ForceSendFields []string `json:"-"` 4683 // NullFields is a list of field names (e.g. "Content") to include in API 4684 // requests with the JSON null value. By default, fields with empty values are 4685 // omitted from API requests. See 4686 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4687 NullFields []string `json:"-"` 4688 } 4689 4690 func (s *GoogleCloudDocumentaiV1DocumentPageImage) MarshalJSON() ([]byte, error) { 4691 type NoMethod GoogleCloudDocumentaiV1DocumentPageImage 4692 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4693 } 4694 4695 // GoogleCloudDocumentaiV1DocumentPageImageQualityScores: Image quality scores 4696 // for the page image. 4697 type GoogleCloudDocumentaiV1DocumentPageImageQualityScores struct { 4698 // DetectedDefects: A list of detected defects. 4699 DetectedDefects []*GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect `json:"detectedDefects,omitempty"` 4700 // QualityScore: The overall quality score. Range `[0, 1]` where `1` is perfect 4701 // quality. 4702 QualityScore float64 `json:"qualityScore,omitempty"` 4703 // ForceSendFields is a list of field names (e.g. "DetectedDefects") to 4704 // unconditionally include in API requests. By default, fields with empty or 4705 // default values are omitted from API requests. See 4706 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4707 // details. 4708 ForceSendFields []string `json:"-"` 4709 // NullFields is a list of field names (e.g. "DetectedDefects") to include in 4710 // API requests with the JSON null value. By default, fields with empty values 4711 // are omitted from API requests. See 4712 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4713 NullFields []string `json:"-"` 4714 } 4715 4716 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScores) MarshalJSON() ([]byte, error) { 4717 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScores 4718 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4719 } 4720 4721 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScores) UnmarshalJSON(data []byte) error { 4722 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScores 4723 var s1 struct { 4724 QualityScore gensupport.JSONFloat64 `json:"qualityScore"` 4725 *NoMethod 4726 } 4727 s1.NoMethod = (*NoMethod)(s) 4728 if err := json.Unmarshal(data, &s1); err != nil { 4729 return err 4730 } 4731 s.QualityScore = float64(s1.QualityScore) 4732 return nil 4733 } 4734 4735 // GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect: Image 4736 // Quality Defects 4737 type GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect struct { 4738 // Confidence: Confidence of detected defect. Range `[0, 1]` where `1` 4739 // indicates strong confidence that the defect exists. 4740 Confidence float64 `json:"confidence,omitempty"` 4741 // Type: Name of the defect type. Supported values are: - 4742 // `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - 4743 // `quality/defect_faint` - `quality/defect_text_too_small` - 4744 // `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - 4745 // `quality/defect_glare` 4746 Type string `json:"type,omitempty"` 4747 // ForceSendFields is a list of field names (e.g. "Confidence") to 4748 // unconditionally include in API requests. By default, fields with empty or 4749 // default values are omitted from API requests. See 4750 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4751 // details. 4752 ForceSendFields []string `json:"-"` 4753 // NullFields is a list of field names (e.g. "Confidence") to include in API 4754 // requests with the JSON null value. By default, fields with empty values are 4755 // omitted from API requests. See 4756 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4757 NullFields []string `json:"-"` 4758 } 4759 4760 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect) MarshalJSON() ([]byte, error) { 4761 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect 4762 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4763 } 4764 4765 func (s *GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect) UnmarshalJSON(data []byte) error { 4766 type NoMethod GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect 4767 var s1 struct { 4768 Confidence gensupport.JSONFloat64 `json:"confidence"` 4769 *NoMethod 4770 } 4771 s1.NoMethod = (*NoMethod)(s) 4772 if err := json.Unmarshal(data, &s1); err != nil { 4773 return err 4774 } 4775 s.Confidence = float64(s1.Confidence) 4776 return nil 4777 } 4778 4779 // GoogleCloudDocumentaiV1DocumentPageLayout: Visual element describing a 4780 // layout unit on a page. 4781 type GoogleCloudDocumentaiV1DocumentPageLayout struct { 4782 // BoundingPoly: The bounding polygon for the Layout. 4783 BoundingPoly *GoogleCloudDocumentaiV1BoundingPoly `json:"boundingPoly,omitempty"` 4784 // Confidence: Confidence of the current Layout within context of the object 4785 // this layout is for. e.g. confidence can be for a single token, a table, a 4786 // visual element, etc. depending on context. Range `[0, 1]`. 4787 Confidence float64 `json:"confidence,omitempty"` 4788 // Orientation: Detected orientation for the Layout. 4789 // 4790 // Possible values: 4791 // "ORIENTATION_UNSPECIFIED" - Unspecified orientation. 4792 // "PAGE_UP" - Orientation is aligned with page up. 4793 // "PAGE_RIGHT" - Orientation is aligned with page right. Turn the head 90 4794 // degrees clockwise from upright to read. 4795 // "PAGE_DOWN" - Orientation is aligned with page down. Turn the head 180 4796 // degrees from upright to read. 4797 // "PAGE_LEFT" - Orientation is aligned with page left. Turn the head 90 4798 // degrees counterclockwise from upright to read. 4799 Orientation string `json:"orientation,omitempty"` 4800 // TextAnchor: Text anchor indexing into the Document.text. 4801 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 4802 // ForceSendFields is a list of field names (e.g. "BoundingPoly") to 4803 // unconditionally include in API requests. By default, fields with empty or 4804 // default values are omitted from API requests. See 4805 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4806 // details. 4807 ForceSendFields []string `json:"-"` 4808 // NullFields is a list of field names (e.g. "BoundingPoly") to include in API 4809 // requests with the JSON null value. By default, fields with empty values are 4810 // omitted from API requests. See 4811 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4812 NullFields []string `json:"-"` 4813 } 4814 4815 func (s *GoogleCloudDocumentaiV1DocumentPageLayout) MarshalJSON() ([]byte, error) { 4816 type NoMethod GoogleCloudDocumentaiV1DocumentPageLayout 4817 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4818 } 4819 4820 func (s *GoogleCloudDocumentaiV1DocumentPageLayout) UnmarshalJSON(data []byte) error { 4821 type NoMethod GoogleCloudDocumentaiV1DocumentPageLayout 4822 var s1 struct { 4823 Confidence gensupport.JSONFloat64 `json:"confidence"` 4824 *NoMethod 4825 } 4826 s1.NoMethod = (*NoMethod)(s) 4827 if err := json.Unmarshal(data, &s1); err != nil { 4828 return err 4829 } 4830 s.Confidence = float64(s1.Confidence) 4831 return nil 4832 } 4833 4834 // GoogleCloudDocumentaiV1DocumentPageLine: A collection of tokens that a human 4835 // would perceive as a line. Does not cross column boundaries, can be 4836 // horizontal, vertical, etc. 4837 type GoogleCloudDocumentaiV1DocumentPageLine struct { 4838 // DetectedLanguages: A list of detected languages together with confidence. 4839 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 4840 // Layout: Layout for Line. 4841 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4842 // Provenance: The history of this annotation. 4843 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 4844 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 4845 // unconditionally include in API requests. By default, fields with empty or 4846 // default values are omitted from API requests. See 4847 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4848 // details. 4849 ForceSendFields []string `json:"-"` 4850 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 4851 // API requests with the JSON null value. By default, fields with empty values 4852 // are omitted from API requests. See 4853 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4854 NullFields []string `json:"-"` 4855 } 4856 4857 func (s *GoogleCloudDocumentaiV1DocumentPageLine) MarshalJSON() ([]byte, error) { 4858 type NoMethod GoogleCloudDocumentaiV1DocumentPageLine 4859 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4860 } 4861 4862 // GoogleCloudDocumentaiV1DocumentPageMatrix: Representation for transformation 4863 // matrix, intended to be compatible and used with OpenCV format for image 4864 // manipulation. 4865 type GoogleCloudDocumentaiV1DocumentPageMatrix struct { 4866 // Cols: Number of columns in the matrix. 4867 Cols int64 `json:"cols,omitempty"` 4868 // Data: The matrix data. 4869 Data string `json:"data,omitempty"` 4870 // Rows: Number of rows in the matrix. 4871 Rows int64 `json:"rows,omitempty"` 4872 // Type: This encodes information about what data type the matrix uses. For 4873 // example, 0 (CV_8U) is an unsigned 8-bit image. For the full list of OpenCV 4874 // primitive data types, please refer to 4875 // https://docs.opencv.org/4.3.0/d1/d1b/group__core__hal__interface.html 4876 Type int64 `json:"type,omitempty"` 4877 // ForceSendFields is a list of field names (e.g. "Cols") to unconditionally 4878 // include in API requests. By default, fields with empty or default values are 4879 // omitted from API requests. See 4880 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4881 // details. 4882 ForceSendFields []string `json:"-"` 4883 // NullFields is a list of field names (e.g. "Cols") to include in API requests 4884 // with the JSON null value. By default, fields with empty values are omitted 4885 // from API requests. See 4886 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4887 NullFields []string `json:"-"` 4888 } 4889 4890 func (s *GoogleCloudDocumentaiV1DocumentPageMatrix) MarshalJSON() ([]byte, error) { 4891 type NoMethod GoogleCloudDocumentaiV1DocumentPageMatrix 4892 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4893 } 4894 4895 // GoogleCloudDocumentaiV1DocumentPageParagraph: A collection of lines that a 4896 // human would perceive as a paragraph. 4897 type GoogleCloudDocumentaiV1DocumentPageParagraph struct { 4898 // DetectedLanguages: A list of detected languages together with confidence. 4899 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 4900 // Layout: Layout for Paragraph. 4901 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4902 // Provenance: The history of this annotation. 4903 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 4904 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 4905 // unconditionally include in API requests. By default, fields with empty or 4906 // default values are omitted from API requests. See 4907 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4908 // details. 4909 ForceSendFields []string `json:"-"` 4910 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 4911 // API requests with the JSON null value. By default, fields with empty values 4912 // are omitted from API requests. See 4913 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4914 NullFields []string `json:"-"` 4915 } 4916 4917 func (s *GoogleCloudDocumentaiV1DocumentPageParagraph) MarshalJSON() ([]byte, error) { 4918 type NoMethod GoogleCloudDocumentaiV1DocumentPageParagraph 4919 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4920 } 4921 4922 // GoogleCloudDocumentaiV1DocumentPageSymbol: A detected symbol. 4923 type GoogleCloudDocumentaiV1DocumentPageSymbol struct { 4924 // DetectedLanguages: A list of detected languages together with confidence. 4925 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 4926 // Layout: Layout for Symbol. 4927 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4928 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 4929 // unconditionally include in API requests. By default, fields with empty or 4930 // default values are omitted from API requests. See 4931 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4932 // details. 4933 ForceSendFields []string `json:"-"` 4934 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 4935 // API requests with the JSON null value. By default, fields with empty values 4936 // are omitted from API requests. See 4937 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4938 NullFields []string `json:"-"` 4939 } 4940 4941 func (s *GoogleCloudDocumentaiV1DocumentPageSymbol) MarshalJSON() ([]byte, error) { 4942 type NoMethod GoogleCloudDocumentaiV1DocumentPageSymbol 4943 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4944 } 4945 4946 // GoogleCloudDocumentaiV1DocumentPageTable: A table representation similar to 4947 // HTML table structure. 4948 type GoogleCloudDocumentaiV1DocumentPageTable struct { 4949 // BodyRows: Body rows of the table. 4950 BodyRows []*GoogleCloudDocumentaiV1DocumentPageTableTableRow `json:"bodyRows,omitempty"` 4951 // DetectedLanguages: A list of detected languages together with confidence. 4952 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 4953 // HeaderRows: Header rows of the table. 4954 HeaderRows []*GoogleCloudDocumentaiV1DocumentPageTableTableRow `json:"headerRows,omitempty"` 4955 // Layout: Layout for Table. 4956 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4957 // Provenance: The history of this table. 4958 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 4959 // ForceSendFields is a list of field names (e.g. "BodyRows") to 4960 // unconditionally include in API requests. By default, fields with empty or 4961 // default values are omitted from API requests. See 4962 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4963 // details. 4964 ForceSendFields []string `json:"-"` 4965 // NullFields is a list of field names (e.g. "BodyRows") to include in API 4966 // requests with the JSON null value. By default, fields with empty values are 4967 // omitted from API requests. See 4968 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4969 NullFields []string `json:"-"` 4970 } 4971 4972 func (s *GoogleCloudDocumentaiV1DocumentPageTable) MarshalJSON() ([]byte, error) { 4973 type NoMethod GoogleCloudDocumentaiV1DocumentPageTable 4974 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 4975 } 4976 4977 // GoogleCloudDocumentaiV1DocumentPageTableTableCell: A cell representation 4978 // inside the table. 4979 type GoogleCloudDocumentaiV1DocumentPageTableTableCell struct { 4980 // ColSpan: How many columns this cell spans. 4981 ColSpan int64 `json:"colSpan,omitempty"` 4982 // DetectedLanguages: A list of detected languages together with confidence. 4983 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 4984 // Layout: Layout for TableCell. 4985 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 4986 // RowSpan: How many rows this cell spans. 4987 RowSpan int64 `json:"rowSpan,omitempty"` 4988 // ForceSendFields is a list of field names (e.g. "ColSpan") to unconditionally 4989 // include in API requests. By default, fields with empty or default values are 4990 // omitted from API requests. See 4991 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 4992 // details. 4993 ForceSendFields []string `json:"-"` 4994 // NullFields is a list of field names (e.g. "ColSpan") to include in API 4995 // requests with the JSON null value. By default, fields with empty values are 4996 // omitted from API requests. See 4997 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 4998 NullFields []string `json:"-"` 4999 } 5000 5001 func (s *GoogleCloudDocumentaiV1DocumentPageTableTableCell) MarshalJSON() ([]byte, error) { 5002 type NoMethod GoogleCloudDocumentaiV1DocumentPageTableTableCell 5003 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5004 } 5005 5006 // GoogleCloudDocumentaiV1DocumentPageTableTableRow: A row of table cells. 5007 type GoogleCloudDocumentaiV1DocumentPageTableTableRow struct { 5008 // Cells: Cells that make up this row. 5009 Cells []*GoogleCloudDocumentaiV1DocumentPageTableTableCell `json:"cells,omitempty"` 5010 // ForceSendFields is a list of field names (e.g. "Cells") to unconditionally 5011 // include in API requests. By default, fields with empty or default values are 5012 // omitted from API requests. See 5013 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5014 // details. 5015 ForceSendFields []string `json:"-"` 5016 // NullFields is a list of field names (e.g. "Cells") to include in API 5017 // requests with the JSON null value. By default, fields with empty values are 5018 // omitted from API requests. See 5019 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5020 NullFields []string `json:"-"` 5021 } 5022 5023 func (s *GoogleCloudDocumentaiV1DocumentPageTableTableRow) MarshalJSON() ([]byte, error) { 5024 type NoMethod GoogleCloudDocumentaiV1DocumentPageTableTableRow 5025 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5026 } 5027 5028 // GoogleCloudDocumentaiV1DocumentPageToken: A detected token. 5029 type GoogleCloudDocumentaiV1DocumentPageToken struct { 5030 // DetectedBreak: Detected break at the end of a Token. 5031 DetectedBreak *GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak `json:"detectedBreak,omitempty"` 5032 // DetectedLanguages: A list of detected languages together with confidence. 5033 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 5034 // Layout: Layout for Token. 5035 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 5036 // Provenance: The history of this annotation. 5037 Provenance *GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 5038 // StyleInfo: Text style attributes. 5039 StyleInfo *GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo `json:"styleInfo,omitempty"` 5040 // ForceSendFields is a list of field names (e.g. "DetectedBreak") to 5041 // unconditionally include in API requests. By default, fields with empty or 5042 // default values are omitted from API requests. See 5043 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5044 // details. 5045 ForceSendFields []string `json:"-"` 5046 // NullFields is a list of field names (e.g. "DetectedBreak") to include in API 5047 // requests with the JSON null value. By default, fields with empty values are 5048 // omitted from API requests. See 5049 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5050 NullFields []string `json:"-"` 5051 } 5052 5053 func (s *GoogleCloudDocumentaiV1DocumentPageToken) MarshalJSON() ([]byte, error) { 5054 type NoMethod GoogleCloudDocumentaiV1DocumentPageToken 5055 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5056 } 5057 5058 // GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak: Detected break at the 5059 // end of a Token. 5060 type GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak struct { 5061 // Type: Detected break type. 5062 // 5063 // Possible values: 5064 // "TYPE_UNSPECIFIED" - Unspecified break type. 5065 // "SPACE" - A single whitespace. 5066 // "WIDE_SPACE" - A wider whitespace. 5067 // "HYPHEN" - A hyphen that indicates that a token has been split across 5068 // lines. 5069 Type string `json:"type,omitempty"` 5070 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 5071 // include in API requests. By default, fields with empty or default values are 5072 // omitted from API requests. See 5073 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5074 // details. 5075 ForceSendFields []string `json:"-"` 5076 // NullFields is a list of field names (e.g. "Type") to include in API requests 5077 // with the JSON null value. By default, fields with empty values are omitted 5078 // from API requests. See 5079 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5080 NullFields []string `json:"-"` 5081 } 5082 5083 func (s *GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak) MarshalJSON() ([]byte, error) { 5084 type NoMethod GoogleCloudDocumentaiV1DocumentPageTokenDetectedBreak 5085 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5086 } 5087 5088 // GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo: Font and other text style 5089 // attributes. 5090 type GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo struct { 5091 // BackgroundColor: Color of the background. 5092 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 5093 // Bold: Whether the text is bold (equivalent to font_weight is at least 5094 // `700`). 5095 Bold bool `json:"bold,omitempty"` 5096 // FontSize: Font size in points (`1` point is `¹⁄₇₂` inches). 5097 FontSize int64 `json:"fontSize,omitempty"` 5098 // FontType: Name or style of the font. 5099 FontType string `json:"fontType,omitempty"` 5100 // FontWeight: TrueType weight on a scale `100` (thin) to `1000` (ultra-heavy). 5101 // Normal is `400`, bold is `700`. 5102 FontWeight int64 `json:"fontWeight,omitempty"` 5103 // Handwritten: Whether the text is handwritten. 5104 Handwritten bool `json:"handwritten,omitempty"` 5105 // Italic: Whether the text is italic. 5106 Italic bool `json:"italic,omitempty"` 5107 // LetterSpacing: Letter spacing in points. 5108 LetterSpacing float64 `json:"letterSpacing,omitempty"` 5109 // PixelFontSize: Font size in pixels, equal to _unrounded font_size_ * 5110 // _resolution_ ÷ `72.0`. 5111 PixelFontSize float64 `json:"pixelFontSize,omitempty"` 5112 // Smallcaps: Whether the text is in small caps. This feature is not supported 5113 // yet. 5114 Smallcaps bool `json:"smallcaps,omitempty"` 5115 // Strikeout: Whether the text is strikethrough. This feature is not supported 5116 // yet. 5117 Strikeout bool `json:"strikeout,omitempty"` 5118 // Subscript: Whether the text is a subscript. This feature is not supported 5119 // yet. 5120 Subscript bool `json:"subscript,omitempty"` 5121 // Superscript: Whether the text is a superscript. This feature is not 5122 // supported yet. 5123 Superscript bool `json:"superscript,omitempty"` 5124 // TextColor: Color of the text. 5125 TextColor *GoogleTypeColor `json:"textColor,omitempty"` 5126 // Underlined: Whether the text is underlined. 5127 Underlined bool `json:"underlined,omitempty"` 5128 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 5129 // unconditionally include in API requests. By default, fields with empty or 5130 // default values are omitted from API requests. See 5131 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5132 // details. 5133 ForceSendFields []string `json:"-"` 5134 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 5135 // API requests with the JSON null value. By default, fields with empty values 5136 // are omitted from API requests. See 5137 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5138 NullFields []string `json:"-"` 5139 } 5140 5141 func (s *GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo) MarshalJSON() ([]byte, error) { 5142 type NoMethod GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo 5143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5144 } 5145 5146 func (s *GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo) UnmarshalJSON(data []byte) error { 5147 type NoMethod GoogleCloudDocumentaiV1DocumentPageTokenStyleInfo 5148 var s1 struct { 5149 LetterSpacing gensupport.JSONFloat64 `json:"letterSpacing"` 5150 PixelFontSize gensupport.JSONFloat64 `json:"pixelFontSize"` 5151 *NoMethod 5152 } 5153 s1.NoMethod = (*NoMethod)(s) 5154 if err := json.Unmarshal(data, &s1); err != nil { 5155 return err 5156 } 5157 s.LetterSpacing = float64(s1.LetterSpacing) 5158 s.PixelFontSize = float64(s1.PixelFontSize) 5159 return nil 5160 } 5161 5162 // GoogleCloudDocumentaiV1DocumentPageVisualElement: Detected non-text visual 5163 // elements e.g. checkbox, signature etc. on the page. 5164 type GoogleCloudDocumentaiV1DocumentPageVisualElement struct { 5165 // DetectedLanguages: A list of detected languages together with confidence. 5166 DetectedLanguages []*GoogleCloudDocumentaiV1DocumentPageDetectedLanguage `json:"detectedLanguages,omitempty"` 5167 // Layout: Layout for VisualElement. 5168 Layout *GoogleCloudDocumentaiV1DocumentPageLayout `json:"layout,omitempty"` 5169 // Type: Type of the VisualElement. 5170 Type string `json:"type,omitempty"` 5171 // ForceSendFields is a list of field names (e.g. "DetectedLanguages") to 5172 // unconditionally include in API requests. By default, fields with empty or 5173 // default values are omitted from API requests. See 5174 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5175 // details. 5176 ForceSendFields []string `json:"-"` 5177 // NullFields is a list of field names (e.g. "DetectedLanguages") to include in 5178 // API requests with the JSON null value. By default, fields with empty values 5179 // are omitted from API requests. See 5180 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5181 NullFields []string `json:"-"` 5182 } 5183 5184 func (s *GoogleCloudDocumentaiV1DocumentPageVisualElement) MarshalJSON() ([]byte, error) { 5185 type NoMethod GoogleCloudDocumentaiV1DocumentPageVisualElement 5186 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5187 } 5188 5189 // GoogleCloudDocumentaiV1DocumentProvenance: Structure to identify provenance 5190 // relationships between annotations in different revisions. 5191 type GoogleCloudDocumentaiV1DocumentProvenance struct { 5192 // Id: The Id of this operation. Needs to be unique within the scope of the 5193 // revision. 5194 Id int64 `json:"id,omitempty"` 5195 // Parents: References to the original elements that are replaced. 5196 Parents []*GoogleCloudDocumentaiV1DocumentProvenanceParent `json:"parents,omitempty"` 5197 // Revision: The index of the revision that produced this element. 5198 Revision int64 `json:"revision,omitempty"` 5199 // Type: The type of provenance operation. 5200 // 5201 // Possible values: 5202 // "OPERATION_TYPE_UNSPECIFIED" - Operation type unspecified. If no operation 5203 // is specified a provenance entry is simply used to match against a `parent`. 5204 // "ADD" - Add an element. 5205 // "REMOVE" - Remove an element identified by `parent`. 5206 // "UPDATE" - Updates any fields within the given provenance scope of the 5207 // message. It overwrites the fields rather than replacing them. Use this when 5208 // you want to update a field value of an entity without also updating all the 5209 // child properties. 5210 // "REPLACE" - Currently unused. Replace an element identified by `parent`. 5211 // "EVAL_REQUESTED" - Deprecated. Request human review for the element 5212 // identified by `parent`. 5213 // "EVAL_APPROVED" - Deprecated. Element is reviewed and approved at human 5214 // review, confidence will be set to 1.0. 5215 // "EVAL_SKIPPED" - Deprecated. Element is skipped in the validation process. 5216 Type string `json:"type,omitempty"` 5217 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 5218 // include in API requests. By default, fields with empty or default values are 5219 // omitted from API requests. See 5220 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5221 // details. 5222 ForceSendFields []string `json:"-"` 5223 // NullFields is a list of field names (e.g. "Id") to include in API requests 5224 // with the JSON null value. By default, fields with empty values are omitted 5225 // from API requests. See 5226 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5227 NullFields []string `json:"-"` 5228 } 5229 5230 func (s *GoogleCloudDocumentaiV1DocumentProvenance) MarshalJSON() ([]byte, error) { 5231 type NoMethod GoogleCloudDocumentaiV1DocumentProvenance 5232 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5233 } 5234 5235 // GoogleCloudDocumentaiV1DocumentProvenanceParent: The parent element the 5236 // current element is based on. Used for referencing/aligning, removal and 5237 // replacement operations. 5238 type GoogleCloudDocumentaiV1DocumentProvenanceParent struct { 5239 // Id: The id of the parent provenance. 5240 Id int64 `json:"id,omitempty"` 5241 // Index: The index of the parent item in the corresponding item list (eg. list 5242 // of entities, properties within entities, etc.) in the parent revision. 5243 Index int64 `json:"index,omitempty"` 5244 // Revision: The index of the index into current revision's parent_ids list. 5245 Revision int64 `json:"revision,omitempty"` 5246 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 5247 // include in API requests. By default, fields with empty or default values are 5248 // omitted from API requests. See 5249 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5250 // details. 5251 ForceSendFields []string `json:"-"` 5252 // NullFields is a list of field names (e.g. "Id") to include in API requests 5253 // with the JSON null value. By default, fields with empty values are omitted 5254 // from API requests. See 5255 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5256 NullFields []string `json:"-"` 5257 } 5258 5259 func (s *GoogleCloudDocumentaiV1DocumentProvenanceParent) MarshalJSON() ([]byte, error) { 5260 type NoMethod GoogleCloudDocumentaiV1DocumentProvenanceParent 5261 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5262 } 5263 5264 // GoogleCloudDocumentaiV1DocumentRevision: Contains past or forward revisions 5265 // of this document. 5266 type GoogleCloudDocumentaiV1DocumentRevision struct { 5267 // Agent: If the change was made by a person specify the name or id of that 5268 // person. 5269 Agent string `json:"agent,omitempty"` 5270 // CreateTime: The time that the revision was created, internally generated by 5271 // doc proto storage at the time of create. 5272 CreateTime string `json:"createTime,omitempty"` 5273 // HumanReview: Human Review information of this revision. 5274 HumanReview *GoogleCloudDocumentaiV1DocumentRevisionHumanReview `json:"humanReview,omitempty"` 5275 // Id: Id of the revision, internally generated by doc proto storage. Unique 5276 // within the context of the document. 5277 Id string `json:"id,omitempty"` 5278 // Parent: The revisions that this revision is based on. This can include one 5279 // or more parent (when documents are merged.) This field represents the index 5280 // into the `revisions` field. 5281 Parent []int64 `json:"parent,omitempty"` 5282 // ParentIds: The revisions that this revision is based on. Must include all 5283 // the ids that have anything to do with this revision - eg. there are 5284 // `provenance.parent.revision` fields that index into this field. 5285 ParentIds []string `json:"parentIds,omitempty"` 5286 // Processor: If the annotation was made by processor identify the processor by 5287 // its resource name. 5288 Processor string `json:"processor,omitempty"` 5289 // ForceSendFields is a list of field names (e.g. "Agent") to unconditionally 5290 // include in API requests. By default, fields with empty or default values are 5291 // omitted from API requests. See 5292 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5293 // details. 5294 ForceSendFields []string `json:"-"` 5295 // NullFields is a list of field names (e.g. "Agent") to include in API 5296 // requests with the JSON null value. By default, fields with empty values are 5297 // omitted from API requests. See 5298 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5299 NullFields []string `json:"-"` 5300 } 5301 5302 func (s *GoogleCloudDocumentaiV1DocumentRevision) MarshalJSON() ([]byte, error) { 5303 type NoMethod GoogleCloudDocumentaiV1DocumentRevision 5304 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5305 } 5306 5307 // GoogleCloudDocumentaiV1DocumentRevisionHumanReview: Human Review information 5308 // of the document. 5309 type GoogleCloudDocumentaiV1DocumentRevisionHumanReview struct { 5310 // State: Human review state. e.g. `requested`, `succeeded`, `rejected`. 5311 State string `json:"state,omitempty"` 5312 // StateMessage: A message providing more details about the current state of 5313 // processing. For example, the rejection reason when the state is `rejected`. 5314 StateMessage string `json:"stateMessage,omitempty"` 5315 // ForceSendFields is a list of field names (e.g. "State") to unconditionally 5316 // include in API requests. By default, fields with empty or default values are 5317 // omitted from API requests. See 5318 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5319 // details. 5320 ForceSendFields []string `json:"-"` 5321 // NullFields is a list of field names (e.g. "State") to include in API 5322 // requests with the JSON null value. By default, fields with empty values are 5323 // omitted from API requests. See 5324 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5325 NullFields []string `json:"-"` 5326 } 5327 5328 func (s *GoogleCloudDocumentaiV1DocumentRevisionHumanReview) MarshalJSON() ([]byte, error) { 5329 type NoMethod GoogleCloudDocumentaiV1DocumentRevisionHumanReview 5330 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5331 } 5332 5333 // GoogleCloudDocumentaiV1DocumentShardInfo: For a large document, sharding may 5334 // be performed to produce several document shards. Each document shard 5335 // contains this field to detail which shard it is. 5336 type GoogleCloudDocumentaiV1DocumentShardInfo struct { 5337 // ShardCount: Total number of shards. 5338 ShardCount int64 `json:"shardCount,omitempty,string"` 5339 // ShardIndex: The 0-based index of this shard. 5340 ShardIndex int64 `json:"shardIndex,omitempty,string"` 5341 // TextOffset: The index of the first character in Document.text in the overall 5342 // document global text. 5343 TextOffset int64 `json:"textOffset,omitempty,string"` 5344 // ForceSendFields is a list of field names (e.g. "ShardCount") to 5345 // unconditionally include in API requests. By default, fields with empty or 5346 // default values are omitted from API requests. See 5347 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5348 // details. 5349 ForceSendFields []string `json:"-"` 5350 // NullFields is a list of field names (e.g. "ShardCount") to include in API 5351 // requests with the JSON null value. By default, fields with empty values are 5352 // omitted from API requests. See 5353 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5354 NullFields []string `json:"-"` 5355 } 5356 5357 func (s *GoogleCloudDocumentaiV1DocumentShardInfo) MarshalJSON() ([]byte, error) { 5358 type NoMethod GoogleCloudDocumentaiV1DocumentShardInfo 5359 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5360 } 5361 5362 // GoogleCloudDocumentaiV1DocumentStyle: Annotation for common text style 5363 // attributes. This adheres to CSS conventions as much as possible. 5364 type GoogleCloudDocumentaiV1DocumentStyle struct { 5365 // BackgroundColor: Text background color. 5366 BackgroundColor *GoogleTypeColor `json:"backgroundColor,omitempty"` 5367 // Color: Text color. 5368 Color *GoogleTypeColor `json:"color,omitempty"` 5369 // FontFamily: Font family such as `Arial`, `Times New Roman`. 5370 // https://www.w3schools.com/cssref/pr_font_font-family.asp 5371 FontFamily string `json:"fontFamily,omitempty"` 5372 // FontSize: Font size. 5373 FontSize *GoogleCloudDocumentaiV1DocumentStyleFontSize `json:"fontSize,omitempty"` 5374 // FontWeight: Font weight 5375 // (https://www.w3schools.com/cssref/pr_font_weight.asp). Possible values are 5376 // `normal`, `bold`, `bolder`, and `lighter`. 5377 FontWeight string `json:"fontWeight,omitempty"` 5378 // TextAnchor: Text anchor indexing into the Document.text. 5379 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 5380 // TextDecoration: Text decoration 5381 // (https://www.w3schools.com/cssref/pr_text_text-decoration.asp). Follows CSS 5382 // standard. 5383 TextDecoration string `json:"textDecoration,omitempty"` 5384 // TextStyle: Text style 5385 // (https://www.w3schools.com/cssref/pr_font_font-style.asp). Possible values 5386 // are `normal`, `italic`, and `oblique`. 5387 TextStyle string `json:"textStyle,omitempty"` 5388 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 5389 // unconditionally include in API requests. By default, fields with empty or 5390 // default values are omitted from API requests. See 5391 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5392 // details. 5393 ForceSendFields []string `json:"-"` 5394 // NullFields is a list of field names (e.g. "BackgroundColor") to include in 5395 // API requests with the JSON null value. By default, fields with empty values 5396 // are omitted from API requests. See 5397 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5398 NullFields []string `json:"-"` 5399 } 5400 5401 func (s *GoogleCloudDocumentaiV1DocumentStyle) MarshalJSON() ([]byte, error) { 5402 type NoMethod GoogleCloudDocumentaiV1DocumentStyle 5403 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5404 } 5405 5406 // GoogleCloudDocumentaiV1DocumentStyleFontSize: Font size with unit. 5407 type GoogleCloudDocumentaiV1DocumentStyleFontSize struct { 5408 // Size: Font size for the text. 5409 Size float64 `json:"size,omitempty"` 5410 // Unit: Unit for the font size. Follows CSS naming (such as `in`, `px`, and 5411 // `pt`). 5412 Unit string `json:"unit,omitempty"` 5413 // ForceSendFields is a list of field names (e.g. "Size") to unconditionally 5414 // include in API requests. By default, fields with empty or default values are 5415 // omitted from API requests. See 5416 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5417 // details. 5418 ForceSendFields []string `json:"-"` 5419 // NullFields is a list of field names (e.g. "Size") to include in API requests 5420 // with the JSON null value. By default, fields with empty values are omitted 5421 // from API requests. See 5422 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5423 NullFields []string `json:"-"` 5424 } 5425 5426 func (s *GoogleCloudDocumentaiV1DocumentStyleFontSize) MarshalJSON() ([]byte, error) { 5427 type NoMethod GoogleCloudDocumentaiV1DocumentStyleFontSize 5428 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5429 } 5430 5431 func (s *GoogleCloudDocumentaiV1DocumentStyleFontSize) UnmarshalJSON(data []byte) error { 5432 type NoMethod GoogleCloudDocumentaiV1DocumentStyleFontSize 5433 var s1 struct { 5434 Size gensupport.JSONFloat64 `json:"size"` 5435 *NoMethod 5436 } 5437 s1.NoMethod = (*NoMethod)(s) 5438 if err := json.Unmarshal(data, &s1); err != nil { 5439 return err 5440 } 5441 s.Size = float64(s1.Size) 5442 return nil 5443 } 5444 5445 // GoogleCloudDocumentaiV1DocumentTextAnchor: Text reference indexing into the 5446 // Document.text. 5447 type GoogleCloudDocumentaiV1DocumentTextAnchor struct { 5448 // Content: Contains the content of the text span so that users do not have to 5449 // look it up in the text_segments. It is always populated for formFields. 5450 Content string `json:"content,omitempty"` 5451 // TextSegments: The text segments from the Document.text. 5452 TextSegments []*GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment `json:"textSegments,omitempty"` 5453 // ForceSendFields is a list of field names (e.g. "Content") to unconditionally 5454 // include in API requests. By default, fields with empty or default values are 5455 // omitted from API requests. See 5456 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5457 // details. 5458 ForceSendFields []string `json:"-"` 5459 // NullFields is a list of field names (e.g. "Content") to include in API 5460 // requests with the JSON null value. By default, fields with empty values are 5461 // omitted from API requests. See 5462 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5463 NullFields []string `json:"-"` 5464 } 5465 5466 func (s *GoogleCloudDocumentaiV1DocumentTextAnchor) MarshalJSON() ([]byte, error) { 5467 type NoMethod GoogleCloudDocumentaiV1DocumentTextAnchor 5468 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5469 } 5470 5471 // GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment: A text segment in the 5472 // Document.text. The indices may be out of bounds which indicate that the text 5473 // extends into another document shard for large sharded documents. See 5474 // ShardInfo.text_offset 5475 type GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment struct { 5476 // EndIndex: TextSegment half open end UTF-8 char index in the Document.text. 5477 EndIndex int64 `json:"endIndex,omitempty,string"` 5478 // StartIndex: TextSegment start UTF-8 char index in the Document.text. 5479 StartIndex int64 `json:"startIndex,omitempty,string"` 5480 // ForceSendFields is a list of field names (e.g. "EndIndex") to 5481 // unconditionally include in API requests. By default, fields with empty or 5482 // default values are omitted from API requests. See 5483 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5484 // details. 5485 ForceSendFields []string `json:"-"` 5486 // NullFields is a list of field names (e.g. "EndIndex") to include in API 5487 // requests with the JSON null value. By default, fields with empty values are 5488 // omitted from API requests. See 5489 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5490 NullFields []string `json:"-"` 5491 } 5492 5493 func (s *GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment) MarshalJSON() ([]byte, error) { 5494 type NoMethod GoogleCloudDocumentaiV1DocumentTextAnchorTextSegment 5495 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5496 } 5497 5498 // GoogleCloudDocumentaiV1DocumentTextChange: This message is used for text 5499 // changes aka. OCR corrections. 5500 type GoogleCloudDocumentaiV1DocumentTextChange struct { 5501 // ChangedText: The text that replaces the text identified in the 5502 // `text_anchor`. 5503 ChangedText string `json:"changedText,omitempty"` 5504 // Provenance: The history of this annotation. 5505 Provenance []*GoogleCloudDocumentaiV1DocumentProvenance `json:"provenance,omitempty"` 5506 // TextAnchor: Provenance of the correction. Text anchor indexing into the 5507 // Document.text. There can only be a single `TextAnchor.text_segments` 5508 // element. If the start and end index of the text segment are the same, the 5509 // text change is inserted before that index. 5510 TextAnchor *GoogleCloudDocumentaiV1DocumentTextAnchor `json:"textAnchor,omitempty"` 5511 // ForceSendFields is a list of field names (e.g. "ChangedText") to 5512 // unconditionally include in API requests. By default, fields with empty or 5513 // default values are omitted from API requests. See 5514 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5515 // details. 5516 ForceSendFields []string `json:"-"` 5517 // NullFields is a list of field names (e.g. "ChangedText") to include in API 5518 // requests with the JSON null value. By default, fields with empty values are 5519 // omitted from API requests. See 5520 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5521 NullFields []string `json:"-"` 5522 } 5523 5524 func (s *GoogleCloudDocumentaiV1DocumentTextChange) MarshalJSON() ([]byte, error) { 5525 type NoMethod GoogleCloudDocumentaiV1DocumentTextChange 5526 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5527 } 5528 5529 // GoogleCloudDocumentaiV1NormalizedVertex: A vertex represents a 2D point in 5530 // the image. NOTE: the normalized vertex coordinates are relative to the 5531 // original image and range from 0 to 1. 5532 type GoogleCloudDocumentaiV1NormalizedVertex struct { 5533 // X: X coordinate. 5534 X float64 `json:"x,omitempty"` 5535 // Y: Y coordinate (starts from the top of the image). 5536 Y float64 `json:"y,omitempty"` 5537 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 5538 // include in API requests. By default, fields with empty or default values are 5539 // omitted from API requests. See 5540 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5541 // details. 5542 ForceSendFields []string `json:"-"` 5543 // NullFields is a list of field names (e.g. "X") to include in API requests 5544 // with the JSON null value. By default, fields with empty values are omitted 5545 // from API requests. See 5546 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5547 NullFields []string `json:"-"` 5548 } 5549 5550 func (s *GoogleCloudDocumentaiV1NormalizedVertex) MarshalJSON() ([]byte, error) { 5551 type NoMethod GoogleCloudDocumentaiV1NormalizedVertex 5552 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5553 } 5554 5555 func (s *GoogleCloudDocumentaiV1NormalizedVertex) UnmarshalJSON(data []byte) error { 5556 type NoMethod GoogleCloudDocumentaiV1NormalizedVertex 5557 var s1 struct { 5558 X gensupport.JSONFloat64 `json:"x"` 5559 Y gensupport.JSONFloat64 `json:"y"` 5560 *NoMethod 5561 } 5562 s1.NoMethod = (*NoMethod)(s) 5563 if err := json.Unmarshal(data, &s1); err != nil { 5564 return err 5565 } 5566 s.X = float64(s1.X) 5567 s.Y = float64(s1.Y) 5568 return nil 5569 } 5570 5571 // GoogleCloudDocumentaiV1Vertex: A vertex represents a 2D point in the image. 5572 // NOTE: the vertex coordinates are in the same scale as the original image. 5573 type GoogleCloudDocumentaiV1Vertex struct { 5574 // X: X coordinate. 5575 X int64 `json:"x,omitempty"` 5576 // Y: Y coordinate (starts from the top of the image). 5577 Y int64 `json:"y,omitempty"` 5578 // ForceSendFields is a list of field names (e.g. "X") to unconditionally 5579 // include in API requests. By default, fields with empty or default values are 5580 // omitted from API requests. See 5581 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5582 // details. 5583 ForceSendFields []string `json:"-"` 5584 // NullFields is a list of field names (e.g. "X") to include in API requests 5585 // with the JSON null value. By default, fields with empty values are omitted 5586 // from API requests. See 5587 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5588 NullFields []string `json:"-"` 5589 } 5590 5591 func (s *GoogleCloudDocumentaiV1Vertex) MarshalJSON() ([]byte, error) { 5592 type NoMethod GoogleCloudDocumentaiV1Vertex 5593 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5594 } 5595 5596 // GoogleIamV1AuditConfig: Specifies the audit configuration for a service. The 5597 // configuration determines which permission types are logged, and what 5598 // identities, if any, are exempted from logging. An AuditConfig must have one 5599 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices` 5600 // and a specific service, the union of the two AuditConfigs is used for that 5601 // service: the log_types specified in each AuditConfig are enabled, and the 5602 // exempted_members in each AuditLogConfig are exempted. Example Policy with 5603 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", 5604 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ 5605 // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": 5606 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", 5607 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": 5608 // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For 5609 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ 5610 // logging. It also exempts `jose@example.com` from DATA_READ logging, and 5611 // `aliya@example.com` from DATA_WRITE logging. 5612 type GoogleIamV1AuditConfig struct { 5613 // AuditLogConfigs: The configuration for logging of each type of permission. 5614 AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` 5615 // Service: Specifies a service that will be enabled for audit logging. For 5616 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` 5617 // is a special value that covers all services. 5618 Service string `json:"service,omitempty"` 5619 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 5620 // unconditionally include in API requests. By default, fields with empty or 5621 // default values are omitted from API requests. See 5622 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5623 // details. 5624 ForceSendFields []string `json:"-"` 5625 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in 5626 // API requests with the JSON null value. By default, fields with empty values 5627 // are omitted from API requests. See 5628 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5629 NullFields []string `json:"-"` 5630 } 5631 5632 func (s *GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { 5633 type NoMethod GoogleIamV1AuditConfig 5634 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5635 } 5636 5637 // GoogleIamV1AuditLogConfig: Provides the configuration for logging a type of 5638 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", 5639 // "exempted_members": [ "user:jose@example.com" ] }, { "log_type": 5640 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while 5641 // exempting jose@example.com from DATA_READ logging. 5642 type GoogleIamV1AuditLogConfig struct { 5643 // ExemptedMembers: Specifies the identities that do not cause logging for this 5644 // type of permission. Follows the same format of Binding.members. 5645 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 5646 // LogType: The log type that this config enables. 5647 // 5648 // Possible values: 5649 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 5650 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 5651 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 5652 // "DATA_READ" - Data reads. Example: CloudSQL Users list 5653 LogType string `json:"logType,omitempty"` 5654 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 5655 // unconditionally include in API requests. By default, fields with empty or 5656 // default values are omitted from API requests. See 5657 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5658 // details. 5659 ForceSendFields []string `json:"-"` 5660 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in 5661 // API requests with the JSON null value. By default, fields with empty values 5662 // are omitted from API requests. See 5663 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5664 NullFields []string `json:"-"` 5665 } 5666 5667 func (s *GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { 5668 type NoMethod GoogleIamV1AuditLogConfig 5669 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5670 } 5671 5672 // GoogleIamV1Binding: Associates `members`, or principals, with a `role`. 5673 type GoogleIamV1Binding struct { 5674 // Condition: The condition that is associated with this binding. If the 5675 // condition evaluates to `true`, then this binding applies to the current 5676 // request. If the condition evaluates to `false`, then this binding does not 5677 // apply to the current request. However, a different role binding might grant 5678 // the same role to one or more of the principals in this binding. To learn 5679 // which resources support conditions in their IAM policies, see the IAM 5680 // documentation 5681 // (https://cloud.google.com/iam/help/conditions/resource-policies). 5682 Condition *GoogleTypeExpr `json:"condition,omitempty"` 5683 // Members: Specifies the principals requesting access for a Google Cloud 5684 // resource. `members` can have the following values: * `allUsers`: A special 5685 // identifier that represents anyone who is on the internet; with or without a 5686 // Google account. * `allAuthenticatedUsers`: A special identifier that 5687 // represents anyone who is authenticated with a Google account or a service 5688 // account. Does not include identities that come from external identity 5689 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 5690 // address that represents a specific Google account. For example, 5691 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 5692 // represents a Google service account. For example, 5693 // `my-other-app@appspot.gserviceaccount.com`. * 5694 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 5695 // identifier for a Kubernetes service account 5696 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 5697 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 5698 // `group:{emailid}`: An email address that represents a Google group. For 5699 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 5700 // (primary) that represents all the users of that domain. For example, 5701 // `google.com` or `example.com`. * 5702 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 5703 // ject/{subject_attribute_value}`: A single identity in a workforce identity 5704 // pool. * 5705 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 5706 // group/{group_id}`: All workforce identities in a group. * 5707 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 5708 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 5709 // a specific attribute value. * 5710 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 5711 // *`: All identities in a workforce identity pool. * 5712 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 5713 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 5714 // identity in a workload identity pool. * 5715 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 5716 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 5717 // group. * 5718 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 5719 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 5720 // `: All identities in a workload identity pool with a certain attribute. * 5721 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 5722 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 5723 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 5724 // unique identifier) representing a user that has been recently deleted. For 5725 // example, `alice@example.com?uid=123456789012345678901`. If the user is 5726 // recovered, this value reverts to `user:{emailid}` and the recovered user 5727 // retains the role in the binding. * 5728 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 5729 // unique identifier) representing a service account that has been recently 5730 // deleted. For example, 5731 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 5732 // service account is undeleted, this value reverts to 5733 // `serviceAccount:{emailid}` and the undeleted service account retains the 5734 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 5735 // address (plus unique identifier) representing a Google group that has been 5736 // recently deleted. For example, 5737 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 5738 // this value reverts to `group:{emailid}` and the recovered group retains the 5739 // role in the binding. * 5740 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 5741 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 5742 // workforce identity pool. For example, 5743 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 5744 // ol-id/subject/my-subject-attribute-value`. 5745 Members []string `json:"members,omitempty"` 5746 // Role: Role that is assigned to the list of `members`, or principals. For 5747 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 5748 // of the IAM roles and permissions, see the IAM documentation 5749 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 5750 // available pre-defined roles, see here 5751 // (https://cloud.google.com/iam/docs/understanding-roles). 5752 Role string `json:"role,omitempty"` 5753 // ForceSendFields is a list of field names (e.g. "Condition") to 5754 // unconditionally include in API requests. By default, fields with empty or 5755 // default values are omitted from API requests. See 5756 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5757 // details. 5758 ForceSendFields []string `json:"-"` 5759 // NullFields is a list of field names (e.g. "Condition") to include in API 5760 // requests with the JSON null value. By default, fields with empty values are 5761 // omitted from API requests. See 5762 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5763 NullFields []string `json:"-"` 5764 } 5765 5766 func (s *GoogleIamV1Binding) MarshalJSON() ([]byte, error) { 5767 type NoMethod GoogleIamV1Binding 5768 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5769 } 5770 5771 // GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which 5772 // specifies access controls for Google Cloud resources. A `Policy` is a 5773 // collection of `bindings`. A `binding` binds one or more `members`, or 5774 // principals, to a single `role`. Principals can be user accounts, service 5775 // accounts, Google groups, and domains (such as G Suite). A `role` is a named 5776 // list of permissions; each `role` can be an IAM predefined role or a 5777 // user-created custom role. For some types of Google Cloud resources, a 5778 // `binding` can also specify a `condition`, which is a logical expression that 5779 // allows access to a resource only if the expression evaluates to `true`. A 5780 // condition can add constraints based on attributes of the request, the 5781 // resource, or both. To learn which resources support conditions in their IAM 5782 // policies, see the IAM documentation 5783 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 5784 // example:** ``` { "bindings": [ { "role": 5785 // "roles/resourcemanager.organizationAdmin", "members": [ 5786 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 5787 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 5788 // "roles/resourcemanager.organizationViewer", "members": [ 5789 // "user:eve@example.com" ], "condition": { "title": "expirable access", 5790 // "description": "Does not grant access after Sep 2020", "expression": 5791 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 5792 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 5793 // members: - user:mike@example.com - group:admins@example.com - 5794 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 5795 // role: roles/resourcemanager.organizationAdmin - members: - 5796 // user:eve@example.com role: roles/resourcemanager.organizationViewer 5797 // condition: title: expirable access description: Does not grant access after 5798 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 5799 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 5800 // see the IAM documentation (https://cloud.google.com/iam/docs/). 5801 type GoogleIamV1Policy struct { 5802 // AuditConfigs: Specifies cloud audit logging configuration for this policy. 5803 AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` 5804 // Bindings: Associates a list of `members`, or principals, with a `role`. 5805 // Optionally, may specify a `condition` that determines how and when the 5806 // `bindings` are applied. Each of the `bindings` must contain at least one 5807 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 5808 // up to 250 of these principals can be Google groups. Each occurrence of a 5809 // principal counts towards these limits. For example, if the `bindings` grant 5810 // 50 different roles to `user:alice@example.com`, and not to any other 5811 // principal, then you can add another 1,450 principals to the `bindings` in 5812 // the `Policy`. 5813 Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` 5814 // Etag: `etag` is used for optimistic concurrency control as a way to help 5815 // prevent simultaneous updates of a policy from overwriting each other. It is 5816 // strongly suggested that systems make use of the `etag` in the 5817 // read-modify-write cycle to perform policy updates in order to avoid race 5818 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 5819 // systems are expected to put that etag in the request to `setIamPolicy` to 5820 // ensure that their change will be applied to the same version of the policy. 5821 // **Important:** If you use IAM Conditions, you must include the `etag` field 5822 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 5823 // you to overwrite a version `3` policy with a version `1` policy, and all of 5824 // the conditions in the version `3` policy are lost. 5825 Etag string `json:"etag,omitempty"` 5826 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 5827 // `3`. Requests that specify an invalid value are rejected. Any operation that 5828 // affects conditional role bindings must specify version `3`. This requirement 5829 // applies to the following operations: * Getting a policy that includes a 5830 // conditional role binding * Adding a conditional role binding to a policy * 5831 // Changing a conditional role binding in a policy * Removing any role binding, 5832 // with or without a condition, from a policy that includes conditions 5833 // **Important:** If you use IAM Conditions, you must include the `etag` field 5834 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 5835 // you to overwrite a version `3` policy with a version `1` policy, and all of 5836 // the conditions in the version `3` policy are lost. If a policy does not 5837 // include any conditions, operations on that policy may specify any valid 5838 // version or leave the field unset. To learn which resources support 5839 // conditions in their IAM policies, see the IAM documentation 5840 // (https://cloud.google.com/iam/help/conditions/resource-policies). 5841 Version int64 `json:"version,omitempty"` 5842 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 5843 // unconditionally include in API requests. By default, fields with empty or 5844 // default values are omitted from API requests. See 5845 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5846 // details. 5847 ForceSendFields []string `json:"-"` 5848 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API 5849 // requests with the JSON null value. By default, fields with empty values are 5850 // omitted from API requests. See 5851 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5852 NullFields []string `json:"-"` 5853 } 5854 5855 func (s *GoogleIamV1Policy) MarshalJSON() ([]byte, error) { 5856 type NoMethod GoogleIamV1Policy 5857 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5858 } 5859 5860 // GoogleLongrunningOperation: This resource represents a long-running 5861 // operation that is the result of a network API call. 5862 type GoogleLongrunningOperation struct { 5863 // Done: If the value is `false`, it means the operation is still in progress. 5864 // If `true`, the operation is completed, and either `error` or `response` is 5865 // available. 5866 Done bool `json:"done,omitempty"` 5867 // Error: The error result of the operation in case of failure or cancellation. 5868 Error *GoogleRpcStatus `json:"error,omitempty"` 5869 // Metadata: Service-specific metadata associated with the operation. It 5870 // typically contains progress information and common metadata such as create 5871 // time. Some services might not provide such metadata. Any method that returns 5872 // a long-running operation should document the metadata type, if any. 5873 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 5874 // Name: The server-assigned name, which is only unique within the same service 5875 // that originally returns it. If you use the default HTTP mapping, the `name` 5876 // should be a resource name ending with `operations/{unique_id}`. 5877 Name string `json:"name,omitempty"` 5878 // Response: The normal, successful response of the operation. If the original 5879 // method returns no data on success, such as `Delete`, the response is 5880 // `google.protobuf.Empty`. If the original method is standard 5881 // `Get`/`Create`/`Update`, the response should be the resource. For other 5882 // methods, the response should have the type `XxxResponse`, where `Xxx` is the 5883 // original method name. For example, if the original method name is 5884 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 5885 Response googleapi.RawMessage `json:"response,omitempty"` 5886 5887 // ServerResponse contains the HTTP response code and headers from the server. 5888 googleapi.ServerResponse `json:"-"` 5889 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 5890 // include in API requests. By default, fields with empty or default values are 5891 // omitted from API requests. See 5892 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5893 // details. 5894 ForceSendFields []string `json:"-"` 5895 // NullFields is a list of field names (e.g. "Done") to include in API requests 5896 // with the JSON null value. By default, fields with empty values are omitted 5897 // from API requests. See 5898 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5899 NullFields []string `json:"-"` 5900 } 5901 5902 func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 5903 type NoMethod GoogleLongrunningOperation 5904 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5905 } 5906 5907 // GoogleProtobufEmpty: A generic empty message that you can re-use to avoid 5908 // defining duplicated empty messages in your APIs. A typical example is to use 5909 // it as the request or the response type of an API method. For instance: 5910 // service Foo { rpc Bar(google.protobuf.Empty) returns 5911 // (google.protobuf.Empty); } 5912 type GoogleProtobufEmpty struct { 5913 // ServerResponse contains the HTTP response code and headers from the server. 5914 googleapi.ServerResponse `json:"-"` 5915 } 5916 5917 // GoogleRpcStatus: The `Status` type defines a logical error model that is 5918 // suitable for different programming environments, including REST APIs and RPC 5919 // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message 5920 // contains three pieces of data: error code, error message, and error details. 5921 // You can find out more about this error model and how to work with it in the 5922 // API Design Guide (https://cloud.google.com/apis/design/errors). 5923 type GoogleRpcStatus struct { 5924 // Code: The status code, which should be an enum value of google.rpc.Code. 5925 Code int64 `json:"code,omitempty"` 5926 // Details: A list of messages that carry the error details. There is a common 5927 // set of message types for APIs to use. 5928 Details []googleapi.RawMessage `json:"details,omitempty"` 5929 // Message: A developer-facing error message, which should be in English. Any 5930 // user-facing error message should be localized and sent in the 5931 // google.rpc.Status.details field, or localized by the client. 5932 Message string `json:"message,omitempty"` 5933 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 5934 // include in API requests. By default, fields with empty or default values are 5935 // omitted from API requests. See 5936 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 5937 // details. 5938 ForceSendFields []string `json:"-"` 5939 // NullFields is a list of field names (e.g. "Code") to include in API requests 5940 // with the JSON null value. By default, fields with empty values are omitted 5941 // from API requests. See 5942 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 5943 NullFields []string `json:"-"` 5944 } 5945 5946 func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 5947 type NoMethod GoogleRpcStatus 5948 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 5949 } 5950 5951 // GoogleTypeColor: Represents a color in the RGBA color space. This 5952 // representation is designed for simplicity of conversion to and from color 5953 // representations in various languages over compactness. For example, the 5954 // fields of this representation can be trivially provided to the constructor 5955 // of `java.awt.Color` in Java; it can also be trivially provided to UIColor's 5956 // `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little 5957 // work, it can be easily formatted into a CSS `rgba()` string in JavaScript. 5958 // This reference page doesn't have information about the absolute color space 5959 // that should be used to interpret the RGB value—for example, sRGB, Adobe 5960 // RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB 5961 // color space. When color equality needs to be decided, implementations, 5962 // unless documented otherwise, treat two colors as equal if all their red, 5963 // green, blue, and alpha values each differ by at most `1e-5`. Example (Java): 5964 // import com.google.type.Color; // ... public static java.awt.Color 5965 // fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? 5966 // protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( 5967 // protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } 5968 // public static Color toProto(java.awt.Color color) { float red = (float) 5969 // color.getRed(); float green = (float) color.getGreen(); float blue = (float) 5970 // color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = 5971 // Color .newBuilder() .setRed(red / denominator) .setGreen(green / 5972 // denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if 5973 // (alpha != 255) { result.setAlpha( FloatValue .newBuilder() 5974 // .setValue(((float) alpha) / denominator) .build()); } return 5975 // resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static 5976 // UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float 5977 // green = [protocolor green]; float blue = [protocolor blue]; FloatValue* 5978 // alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != 5979 // nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red 5980 // green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) 5981 // { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green 5982 // blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] 5983 // init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; 5984 // if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } 5985 // [result autorelease]; return result; } // ... Example (JavaScript): // ... 5986 // var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 5987 // 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue 5988 // || 0.0; var red = Math.floor(redFrac * 255); var green = 5989 // Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if 5990 // (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var 5991 // alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, 5992 // blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); 5993 // }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new 5994 // Number((red << 16) | (green << 8) | blue); var hexString = 5995 // rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var 5996 // resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { 5997 // resultBuilder.push('0'); } resultBuilder.push(hexString); return 5998 // resultBuilder.join(”); }; // ... 5999 type GoogleTypeColor struct { 6000 // Alpha: The fraction of this color that should be applied to the pixel. That 6001 // is, the final pixel color is defined by the equation: `pixel color = alpha * 6002 // (this color) + (1.0 - alpha) * (background color)` This means that a value 6003 // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a 6004 // completely transparent color. This uses a wrapper message rather than a 6005 // simple float scalar so that it is possible to distinguish between a default 6006 // value and the value being unset. If omitted, this color object is rendered 6007 // as a solid color (as if the alpha value had been explicitly given a value of 6008 // 1.0). 6009 Alpha float64 `json:"alpha,omitempty"` 6010 // Blue: The amount of blue in the color as a value in the interval [0, 1]. 6011 Blue float64 `json:"blue,omitempty"` 6012 // Green: The amount of green in the color as a value in the interval [0, 1]. 6013 Green float64 `json:"green,omitempty"` 6014 // Red: The amount of red in the color as a value in the interval [0, 1]. 6015 Red float64 `json:"red,omitempty"` 6016 // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally 6017 // include in API requests. By default, fields with empty or default values are 6018 // omitted from API requests. See 6019 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6020 // details. 6021 ForceSendFields []string `json:"-"` 6022 // NullFields is a list of field names (e.g. "Alpha") to include in API 6023 // requests with the JSON null value. By default, fields with empty values are 6024 // omitted from API requests. See 6025 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6026 NullFields []string `json:"-"` 6027 } 6028 6029 func (s *GoogleTypeColor) MarshalJSON() ([]byte, error) { 6030 type NoMethod GoogleTypeColor 6031 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6032 } 6033 6034 func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { 6035 type NoMethod GoogleTypeColor 6036 var s1 struct { 6037 Alpha gensupport.JSONFloat64 `json:"alpha"` 6038 Blue gensupport.JSONFloat64 `json:"blue"` 6039 Green gensupport.JSONFloat64 `json:"green"` 6040 Red gensupport.JSONFloat64 `json:"red"` 6041 *NoMethod 6042 } 6043 s1.NoMethod = (*NoMethod)(s) 6044 if err := json.Unmarshal(data, &s1); err != nil { 6045 return err 6046 } 6047 s.Alpha = float64(s1.Alpha) 6048 s.Blue = float64(s1.Blue) 6049 s.Green = float64(s1.Green) 6050 s.Red = float64(s1.Red) 6051 return nil 6052 } 6053 6054 // GoogleTypeDate: Represents a whole or partial calendar date, such as a 6055 // birthday. The time of day and time zone are either specified elsewhere or 6056 // are insignificant. The date is relative to the Gregorian Calendar. This can 6057 // represent one of the following: * A full date, with non-zero year, month, 6058 // and day values. * A month and day, with a zero year (for example, an 6059 // anniversary). * A year on its own, with a zero month and a zero day. * A 6060 // year and month, with a zero day (for example, a credit card expiration 6061 // date). Related types: * google.type.TimeOfDay * google.type.DateTime * 6062 // google.protobuf.Timestamp 6063 type GoogleTypeDate struct { 6064 // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, 6065 // or 0 to specify a year by itself or a year and month where the day isn't 6066 // significant. 6067 Day int64 `json:"day,omitempty"` 6068 // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without 6069 // a month and day. 6070 Month int64 `json:"month,omitempty"` 6071 // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date 6072 // without a year. 6073 Year int64 `json:"year,omitempty"` 6074 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally 6075 // include in API requests. By default, fields with empty or default values are 6076 // omitted from API requests. See 6077 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6078 // details. 6079 ForceSendFields []string `json:"-"` 6080 // NullFields is a list of field names (e.g. "Day") to include in API requests 6081 // with the JSON null value. By default, fields with empty values are omitted 6082 // from API requests. See 6083 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6084 NullFields []string `json:"-"` 6085 } 6086 6087 func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { 6088 type NoMethod GoogleTypeDate 6089 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6090 } 6091 6092 // GoogleTypeDateTime: Represents civil time (or occasionally physical time). 6093 // This type can represent a civil time in one of a few possible ways: * When 6094 // utc_offset is set and time_zone is unset: a civil time on a calendar day 6095 // with a particular offset from UTC. * When time_zone is set and utc_offset is 6096 // unset: a civil time on a calendar day in a particular time zone. * When 6097 // neither time_zone nor utc_offset is set: a civil time on a calendar day in 6098 // local time. The date is relative to the Proleptic Gregorian Calendar. If 6099 // year, month, or day are 0, the DateTime is considered not to have a specific 6100 // year, month, or day respectively. This type may also be used to represent a 6101 // physical time if all the date and time fields are set and either case of the 6102 // `time_offset` oneof is set. Consider using `Timestamp` message for physical 6103 // time instead. If your use case also would like to store the user's timezone, 6104 // that can be done in another field. This type is more flexible than some 6105 // applications may want. Make sure to document and validate your application's 6106 // limitations. 6107 type GoogleTypeDateTime struct { 6108 // Day: Optional. Day of month. Must be from 1 to 31 and valid for the year and 6109 // month, or 0 if specifying a datetime without a day. 6110 Day int64 `json:"day,omitempty"` 6111 // Hours: Optional. Hours of day in 24 hour format. Should be from 0 to 23, 6112 // defaults to 0 (midnight). An API may choose to allow the value "24:00:00" 6113 // for scenarios like business closing time. 6114 Hours int64 `json:"hours,omitempty"` 6115 // Minutes: Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 6116 // 0. 6117 Minutes int64 `json:"minutes,omitempty"` 6118 // Month: Optional. Month of year. Must be from 1 to 12, or 0 if specifying a 6119 // datetime without a month. 6120 Month int64 `json:"month,omitempty"` 6121 // Nanos: Optional. Fractions of seconds in nanoseconds. Must be from 0 to 6122 // 999,999,999, defaults to 0. 6123 Nanos int64 `json:"nanos,omitempty"` 6124 // Seconds: Optional. Seconds of minutes of the time. Must normally be from 0 6125 // to 59, defaults to 0. An API may allow the value 60 if it allows 6126 // leap-seconds. 6127 Seconds int64 `json:"seconds,omitempty"` 6128 // TimeZone: Time zone. 6129 TimeZone *GoogleTypeTimeZone `json:"timeZone,omitempty"` 6130 // UtcOffset: UTC offset. Must be whole seconds, between -18 hours and +18 6131 // hours. For example, a UTC offset of -4:00 would be represented as { seconds: 6132 // -14400 }. 6133 UtcOffset string `json:"utcOffset,omitempty"` 6134 // Year: Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a 6135 // datetime without a year. 6136 Year int64 `json:"year,omitempty"` 6137 // ForceSendFields is a list of field names (e.g. "Day") to unconditionally 6138 // include in API requests. By default, fields with empty or default values are 6139 // omitted from API requests. See 6140 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6141 // details. 6142 ForceSendFields []string `json:"-"` 6143 // NullFields is a list of field names (e.g. "Day") to include in API requests 6144 // with the JSON null value. By default, fields with empty values are omitted 6145 // from API requests. See 6146 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6147 NullFields []string `json:"-"` 6148 } 6149 6150 func (s *GoogleTypeDateTime) MarshalJSON() ([]byte, error) { 6151 type NoMethod GoogleTypeDateTime 6152 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6153 } 6154 6155 // GoogleTypeExpr: Represents a textual expression in the Common Expression 6156 // Language (CEL) syntax. CEL is a C-like expression language. The syntax and 6157 // semantics of CEL are documented at https://github.com/google/cel-spec. 6158 // Example (Comparison): title: "Summary size limit" description: "Determines 6159 // if a summary is less than 100 chars" expression: "document.summary.size() < 6160 // 100" Example (Equality): title: "Requestor is owner" description: 6161 // "Determines if requestor is the document owner" expression: "document.owner 6162 // == request.auth.claims.email" Example (Logic): title: "Public documents" 6163 // description: "Determine whether the document should be publicly visible" 6164 // expression: "document.type != 'private' && document.type != 'internal'" 6165 // Example (Data Manipulation): title: "Notification string" description: 6166 // "Create a notification string with a timestamp." expression: "'New message 6167 // received at ' + string(document.create_time)" The exact variables and 6168 // functions that may be referenced within an expression are determined by the 6169 // service that evaluates it. See the service documentation for additional 6170 // information. 6171 type GoogleTypeExpr struct { 6172 // Description: Optional. Description of the expression. This is a longer text 6173 // which describes the expression, e.g. when hovered over it in a UI. 6174 Description string `json:"description,omitempty"` 6175 // Expression: Textual representation of an expression in Common Expression 6176 // Language syntax. 6177 Expression string `json:"expression,omitempty"` 6178 // Location: Optional. String indicating the location of the expression for 6179 // error reporting, e.g. a file name and a position in the file. 6180 Location string `json:"location,omitempty"` 6181 // Title: Optional. Title for the expression, i.e. a short string describing 6182 // its purpose. This can be used e.g. in UIs which allow to enter the 6183 // expression. 6184 Title string `json:"title,omitempty"` 6185 // ForceSendFields is a list of field names (e.g. "Description") to 6186 // unconditionally include in API requests. By default, fields with empty or 6187 // default values are omitted from API requests. See 6188 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6189 // details. 6190 ForceSendFields []string `json:"-"` 6191 // NullFields is a list of field names (e.g. "Description") to include in API 6192 // requests with the JSON null value. By default, fields with empty values are 6193 // omitted from API requests. See 6194 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6195 NullFields []string `json:"-"` 6196 } 6197 6198 func (s *GoogleTypeExpr) MarshalJSON() ([]byte, error) { 6199 type NoMethod GoogleTypeExpr 6200 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6201 } 6202 6203 // GoogleTypeInterval: Represents a time interval, encoded as a Timestamp start 6204 // (inclusive) and a Timestamp end (exclusive). The start must be less than or 6205 // equal to the end. When the start equals the end, the interval is empty 6206 // (matches no time). When both start and end are unspecified, the interval 6207 // matches any time. 6208 type GoogleTypeInterval struct { 6209 // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp 6210 // matching this interval will have to be before the end. 6211 EndTime string `json:"endTime,omitempty"` 6212 // StartTime: Optional. Inclusive start of the interval. If specified, a 6213 // Timestamp matching this interval will have to be the same or after the 6214 // start. 6215 StartTime string `json:"startTime,omitempty"` 6216 // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally 6217 // include in API requests. By default, fields with empty or default values are 6218 // omitted from API requests. See 6219 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6220 // details. 6221 ForceSendFields []string `json:"-"` 6222 // NullFields is a list of field names (e.g. "EndTime") to include in API 6223 // requests with the JSON null value. By default, fields with empty values are 6224 // omitted from API requests. See 6225 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6226 NullFields []string `json:"-"` 6227 } 6228 6229 func (s *GoogleTypeInterval) MarshalJSON() ([]byte, error) { 6230 type NoMethod GoogleTypeInterval 6231 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6232 } 6233 6234 // GoogleTypeMoney: Represents an amount of money with its currency type. 6235 type GoogleTypeMoney struct { 6236 // CurrencyCode: The three-letter currency code defined in ISO 4217. 6237 CurrencyCode string `json:"currencyCode,omitempty"` 6238 // Nanos: Number of nano (10^-9) units of the amount. The value must be between 6239 // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` 6240 // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, 6241 // or negative. If `units` is negative, `nanos` must be negative or zero. For 6242 // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. 6243 Nanos int64 `json:"nanos,omitempty"` 6244 // Units: The whole units of the amount. For example if `currencyCode` is 6245 // "USD", then 1 unit is one US dollar. 6246 Units int64 `json:"units,omitempty,string"` 6247 // ForceSendFields is a list of field names (e.g. "CurrencyCode") to 6248 // unconditionally include in API requests. By default, fields with empty or 6249 // default values are omitted from API requests. See 6250 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6251 // details. 6252 ForceSendFields []string `json:"-"` 6253 // NullFields is a list of field names (e.g. "CurrencyCode") to include in API 6254 // requests with the JSON null value. By default, fields with empty values are 6255 // omitted from API requests. See 6256 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6257 NullFields []string `json:"-"` 6258 } 6259 6260 func (s *GoogleTypeMoney) MarshalJSON() ([]byte, error) { 6261 type NoMethod GoogleTypeMoney 6262 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6263 } 6264 6265 // GoogleTypePostalAddress: Represents a postal address, e.g. for postal 6266 // delivery or payments addresses. Given a postal address, a postal service can 6267 // deliver items to a premise, P.O. Box or similar. It is not intended to model 6268 // geographical locations (roads, towns, mountains). In typical usage an 6269 // address would be created via user input or from importing existing data, 6270 // depending on the type of process. Advice on address input / editing: - Use 6271 // an internationalization-ready address widget such as 6272 // https://github.com/google/libaddressinput) - Users should not be presented 6273 // with UI elements for input or editing of fields outside countries where that 6274 // field is used. For more guidance on how to use this schema, please see: 6275 // https://support.google.com/business/answer/6397478 6276 type GoogleTypePostalAddress struct { 6277 // AddressLines: Unstructured address lines describing the lower levels of an 6278 // address. Because values in address_lines do not have type information and 6279 // may sometimes contain multiple values in a single field (e.g. "Austin, TX"), 6280 // it is important that the line order is clear. The order of address lines 6281 // should be "envelope order" for the country/region of the address. In places 6282 // where this can vary (e.g. Japan), address_language is used to make it 6283 // explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for 6284 // small-to-large). This way, the most specific line of an address can be 6285 // selected based on the language. The minimum permitted structural 6286 // representation of an address consists of a region_code with all remaining 6287 // information placed in the address_lines. It would be possible to format such 6288 // an address very approximately without geocoding, but no semantic reasoning 6289 // could be made about any of the address components until it was at least 6290 // partially resolved. Creating an address only containing a region_code and 6291 // address_lines, and then geocoding is the recommended way to handle 6292 // completely unstructured addresses (as opposed to guessing which parts of the 6293 // address should be localities or administrative areas). 6294 AddressLines []string `json:"addressLines,omitempty"` 6295 // AdministrativeArea: Optional. Highest administrative subdivision which is 6296 // used for postal addresses of a country or region. For example, this can be a 6297 // state, a province, an oblast, or a prefecture. Specifically, for Spain this 6298 // is the province and not the autonomous community (e.g. "Barcelona" and not 6299 // "Catalonia"). Many countries don't use an administrative area in postal 6300 // addresses. E.g. in Switzerland this should be left unpopulated. 6301 AdministrativeArea string `json:"administrativeArea,omitempty"` 6302 // LanguageCode: Optional. BCP-47 language code of the contents of this address 6303 // (if known). This is often the UI language of the input form or is expected 6304 // to match one of the languages used in the address' country/region, or their 6305 // transliterated equivalents. This can affect formatting in certain countries, 6306 // but is not critical to the correctness of the data and will never affect any 6307 // validation or other non-formatting related operations. If this value is not 6308 // known, it should be omitted (rather than specifying a possibly incorrect 6309 // default). Examples: "zh-Hant", "ja", "ja-Latn", "en". 6310 LanguageCode string `json:"languageCode,omitempty"` 6311 // Locality: Optional. Generally refers to the city/town portion of the 6312 // address. Examples: US city, IT comune, UK post town. In regions of the world 6313 // where localities are not well defined or do not fit into this structure 6314 // well, leave locality empty and use address_lines. 6315 Locality string `json:"locality,omitempty"` 6316 // Organization: Optional. The name of the organization at the address. 6317 Organization string `json:"organization,omitempty"` 6318 // PostalCode: Optional. Postal code of the address. Not all countries use or 6319 // require postal codes to be present, but where they are used, they may 6320 // trigger additional validation with other parts of the address (e.g. 6321 // state/zip validation in the U.S.A.). 6322 PostalCode string `json:"postalCode,omitempty"` 6323 // Recipients: Optional. The recipient at the address. This field may, under 6324 // certain circumstances, contain multiline information. For example, it might 6325 // contain "care of" information. 6326 Recipients []string `json:"recipients,omitempty"` 6327 // RegionCode: Required. CLDR region code of the country/region of the address. 6328 // This is never inferred and it is up to the user to ensure the value is 6329 // correct. See https://cldr.unicode.org/ and 6330 // https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html 6331 // for details. Example: "CH" for Switzerland. 6332 RegionCode string `json:"regionCode,omitempty"` 6333 // Revision: The schema revision of the `PostalAddress`. This must be set to 0, 6334 // which is the latest revision. All new revisions **must** be backward 6335 // compatible with old revisions. 6336 Revision int64 `json:"revision,omitempty"` 6337 // SortingCode: Optional. Additional, country-specific, sorting code. This is 6338 // not used in most regions. Where it is used, the value is either a string 6339 // like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a 6340 // number alone, representing the "sector code" (Jamaica), "delivery area 6341 // indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). 6342 SortingCode string `json:"sortingCode,omitempty"` 6343 // Sublocality: Optional. Sublocality of the address. For example, this can be 6344 // neighborhoods, boroughs, districts. 6345 Sublocality string `json:"sublocality,omitempty"` 6346 // ForceSendFields is a list of field names (e.g. "AddressLines") to 6347 // unconditionally include in API requests. By default, fields with empty or 6348 // default values are omitted from API requests. See 6349 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6350 // details. 6351 ForceSendFields []string `json:"-"` 6352 // NullFields is a list of field names (e.g. "AddressLines") to include in API 6353 // requests with the JSON null value. By default, fields with empty values are 6354 // omitted from API requests. See 6355 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6356 NullFields []string `json:"-"` 6357 } 6358 6359 func (s *GoogleTypePostalAddress) MarshalJSON() ([]byte, error) { 6360 type NoMethod GoogleTypePostalAddress 6361 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6362 } 6363 6364 // GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone Database 6365 // (https://www.iana.org/time-zones). 6366 type GoogleTypeTimeZone struct { 6367 // Id: IANA Time Zone Database time zone, e.g. "America/New_York". 6368 Id string `json:"id,omitempty"` 6369 // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". 6370 Version string `json:"version,omitempty"` 6371 // ForceSendFields is a list of field names (e.g. "Id") to unconditionally 6372 // include in API requests. By default, fields with empty or default values are 6373 // omitted from API requests. See 6374 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 6375 // details. 6376 ForceSendFields []string `json:"-"` 6377 // NullFields is a list of field names (e.g. "Id") to include in API requests 6378 // with the JSON null value. By default, fields with empty values are omitted 6379 // from API requests. See 6380 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 6381 NullFields []string `json:"-"` 6382 } 6383 6384 func (s *GoogleTypeTimeZone) MarshalJSON() ([]byte, error) { 6385 type NoMethod GoogleTypeTimeZone 6386 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 6387 } 6388 6389 type ProjectsFetchAclCall struct { 6390 s *Service 6391 resource string 6392 googlecloudcontentwarehousev1fetchaclrequest *GoogleCloudContentwarehouseV1FetchAclRequest 6393 urlParams_ gensupport.URLParams 6394 ctx_ context.Context 6395 header_ http.Header 6396 } 6397 6398 // FetchAcl: Gets the access control policy for a resource. Returns NOT_FOUND 6399 // error if the resource does not exist. Returns an empty policy if the 6400 // resource exists but does not have a policy set. 6401 // 6402 // - resource: REQUIRED: The resource for which the policy is being requested. 6403 // Format for document: 6404 // projects/{project_number}/locations/{location}/documents/{document_id}. 6405 // Format for collection: 6406 // projects/{project_number}/locations/{location}/collections/{collection_id}. 6407 // Format for project: projects/{project_number}. 6408 func (r *ProjectsService) FetchAcl(resource string, googlecloudcontentwarehousev1fetchaclrequest *GoogleCloudContentwarehouseV1FetchAclRequest) *ProjectsFetchAclCall { 6409 c := &ProjectsFetchAclCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6410 c.resource = resource 6411 c.googlecloudcontentwarehousev1fetchaclrequest = googlecloudcontentwarehousev1fetchaclrequest 6412 return c 6413 } 6414 6415 // Fields allows partial responses to be retrieved. See 6416 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6417 // details. 6418 func (c *ProjectsFetchAclCall) Fields(s ...googleapi.Field) *ProjectsFetchAclCall { 6419 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6420 return c 6421 } 6422 6423 // Context sets the context to be used in this call's Do method. 6424 func (c *ProjectsFetchAclCall) Context(ctx context.Context) *ProjectsFetchAclCall { 6425 c.ctx_ = ctx 6426 return c 6427 } 6428 6429 // Header returns a http.Header that can be modified by the caller to add 6430 // headers to the request. 6431 func (c *ProjectsFetchAclCall) Header() http.Header { 6432 if c.header_ == nil { 6433 c.header_ = make(http.Header) 6434 } 6435 return c.header_ 6436 } 6437 6438 func (c *ProjectsFetchAclCall) doRequest(alt string) (*http.Response, error) { 6439 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6440 var body io.Reader = nil 6441 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1fetchaclrequest) 6442 if err != nil { 6443 return nil, err 6444 } 6445 c.urlParams_.Set("alt", alt) 6446 c.urlParams_.Set("prettyPrint", "false") 6447 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:fetchAcl") 6448 urls += "?" + c.urlParams_.Encode() 6449 req, err := http.NewRequest("POST", urls, body) 6450 if err != nil { 6451 return nil, err 6452 } 6453 req.Header = reqHeaders 6454 googleapi.Expand(req.URL, map[string]string{ 6455 "resource": c.resource, 6456 }) 6457 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6458 } 6459 6460 // Do executes the "contentwarehouse.projects.fetchAcl" call. 6461 // Any non-2xx status code is an error. Response headers are in either 6462 // *GoogleCloudContentwarehouseV1FetchAclResponse.ServerResponse.Header or (if 6463 // a response was returned at all) in error.(*googleapi.Error).Header. Use 6464 // googleapi.IsNotModified to check whether the returned error was because 6465 // http.StatusNotModified was returned. 6466 func (c *ProjectsFetchAclCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1FetchAclResponse, error) { 6467 gensupport.SetOptions(c.urlParams_, opts...) 6468 res, err := c.doRequest("json") 6469 if res != nil && res.StatusCode == http.StatusNotModified { 6470 if res.Body != nil { 6471 res.Body.Close() 6472 } 6473 return nil, gensupport.WrapError(&googleapi.Error{ 6474 Code: res.StatusCode, 6475 Header: res.Header, 6476 }) 6477 } 6478 if err != nil { 6479 return nil, err 6480 } 6481 defer googleapi.CloseBody(res) 6482 if err := googleapi.CheckResponse(res); err != nil { 6483 return nil, gensupport.WrapError(err) 6484 } 6485 ret := &GoogleCloudContentwarehouseV1FetchAclResponse{ 6486 ServerResponse: googleapi.ServerResponse{ 6487 Header: res.Header, 6488 HTTPStatusCode: res.StatusCode, 6489 }, 6490 } 6491 target := &ret 6492 if err := gensupport.DecodeResponse(target, res); err != nil { 6493 return nil, err 6494 } 6495 return ret, nil 6496 } 6497 6498 type ProjectsSetAclCall struct { 6499 s *Service 6500 resource string 6501 googlecloudcontentwarehousev1setaclrequest *GoogleCloudContentwarehouseV1SetAclRequest 6502 urlParams_ gensupport.URLParams 6503 ctx_ context.Context 6504 header_ http.Header 6505 } 6506 6507 // SetAcl: Sets the access control policy for a resource. Replaces any existing 6508 // policy. 6509 // 6510 // - resource: REQUIRED: The resource for which the policy is being requested. 6511 // Format for document: 6512 // projects/{project_number}/locations/{location}/documents/{document_id}. 6513 // Format for collection: 6514 // projects/{project_number}/locations/{location}/collections/{collection_id}. 6515 // Format for project: projects/{project_number}. 6516 func (r *ProjectsService) SetAcl(resource string, googlecloudcontentwarehousev1setaclrequest *GoogleCloudContentwarehouseV1SetAclRequest) *ProjectsSetAclCall { 6517 c := &ProjectsSetAclCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6518 c.resource = resource 6519 c.googlecloudcontentwarehousev1setaclrequest = googlecloudcontentwarehousev1setaclrequest 6520 return c 6521 } 6522 6523 // Fields allows partial responses to be retrieved. See 6524 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6525 // details. 6526 func (c *ProjectsSetAclCall) Fields(s ...googleapi.Field) *ProjectsSetAclCall { 6527 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6528 return c 6529 } 6530 6531 // Context sets the context to be used in this call's Do method. 6532 func (c *ProjectsSetAclCall) Context(ctx context.Context) *ProjectsSetAclCall { 6533 c.ctx_ = ctx 6534 return c 6535 } 6536 6537 // Header returns a http.Header that can be modified by the caller to add 6538 // headers to the request. 6539 func (c *ProjectsSetAclCall) Header() http.Header { 6540 if c.header_ == nil { 6541 c.header_ = make(http.Header) 6542 } 6543 return c.header_ 6544 } 6545 6546 func (c *ProjectsSetAclCall) doRequest(alt string) (*http.Response, error) { 6547 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6548 var body io.Reader = nil 6549 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1setaclrequest) 6550 if err != nil { 6551 return nil, err 6552 } 6553 c.urlParams_.Set("alt", alt) 6554 c.urlParams_.Set("prettyPrint", "false") 6555 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setAcl") 6556 urls += "?" + c.urlParams_.Encode() 6557 req, err := http.NewRequest("POST", urls, body) 6558 if err != nil { 6559 return nil, err 6560 } 6561 req.Header = reqHeaders 6562 googleapi.Expand(req.URL, map[string]string{ 6563 "resource": c.resource, 6564 }) 6565 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6566 } 6567 6568 // Do executes the "contentwarehouse.projects.setAcl" call. 6569 // Any non-2xx status code is an error. Response headers are in either 6570 // *GoogleCloudContentwarehouseV1SetAclResponse.ServerResponse.Header or (if a 6571 // response was returned at all) in error.(*googleapi.Error).Header. Use 6572 // googleapi.IsNotModified to check whether the returned error was because 6573 // http.StatusNotModified was returned. 6574 func (c *ProjectsSetAclCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1SetAclResponse, error) { 6575 gensupport.SetOptions(c.urlParams_, opts...) 6576 res, err := c.doRequest("json") 6577 if res != nil && res.StatusCode == http.StatusNotModified { 6578 if res.Body != nil { 6579 res.Body.Close() 6580 } 6581 return nil, gensupport.WrapError(&googleapi.Error{ 6582 Code: res.StatusCode, 6583 Header: res.Header, 6584 }) 6585 } 6586 if err != nil { 6587 return nil, err 6588 } 6589 defer googleapi.CloseBody(res) 6590 if err := googleapi.CheckResponse(res); err != nil { 6591 return nil, gensupport.WrapError(err) 6592 } 6593 ret := &GoogleCloudContentwarehouseV1SetAclResponse{ 6594 ServerResponse: googleapi.ServerResponse{ 6595 Header: res.Header, 6596 HTTPStatusCode: res.StatusCode, 6597 }, 6598 } 6599 target := &ret 6600 if err := gensupport.DecodeResponse(target, res); err != nil { 6601 return nil, err 6602 } 6603 return ret, nil 6604 } 6605 6606 type ProjectsLocationsGetStatusCall struct { 6607 s *Service 6608 location string 6609 urlParams_ gensupport.URLParams 6610 ifNoneMatch_ string 6611 ctx_ context.Context 6612 header_ http.Header 6613 } 6614 6615 // GetStatus: Get the project status. 6616 // 6617 // - location: The location to be queried Format: 6618 // projects/{project_number}/locations/{location}. 6619 func (r *ProjectsLocationsService) GetStatus(location string) *ProjectsLocationsGetStatusCall { 6620 c := &ProjectsLocationsGetStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6621 c.location = location 6622 return c 6623 } 6624 6625 // Fields allows partial responses to be retrieved. See 6626 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6627 // details. 6628 func (c *ProjectsLocationsGetStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetStatusCall { 6629 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6630 return c 6631 } 6632 6633 // IfNoneMatch sets an optional parameter which makes the operation fail if the 6634 // object's ETag matches the given value. This is useful for getting updates 6635 // only after the object has changed since the last request. 6636 func (c *ProjectsLocationsGetStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetStatusCall { 6637 c.ifNoneMatch_ = entityTag 6638 return c 6639 } 6640 6641 // Context sets the context to be used in this call's Do method. 6642 func (c *ProjectsLocationsGetStatusCall) Context(ctx context.Context) *ProjectsLocationsGetStatusCall { 6643 c.ctx_ = ctx 6644 return c 6645 } 6646 6647 // Header returns a http.Header that can be modified by the caller to add 6648 // headers to the request. 6649 func (c *ProjectsLocationsGetStatusCall) Header() http.Header { 6650 if c.header_ == nil { 6651 c.header_ = make(http.Header) 6652 } 6653 return c.header_ 6654 } 6655 6656 func (c *ProjectsLocationsGetStatusCall) doRequest(alt string) (*http.Response, error) { 6657 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 6658 if c.ifNoneMatch_ != "" { 6659 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6660 } 6661 var body io.Reader = nil 6662 c.urlParams_.Set("alt", alt) 6663 c.urlParams_.Set("prettyPrint", "false") 6664 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:getStatus") 6665 urls += "?" + c.urlParams_.Encode() 6666 req, err := http.NewRequest("GET", urls, body) 6667 if err != nil { 6668 return nil, err 6669 } 6670 req.Header = reqHeaders 6671 googleapi.Expand(req.URL, map[string]string{ 6672 "location": c.location, 6673 }) 6674 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6675 } 6676 6677 // Do executes the "contentwarehouse.projects.locations.getStatus" call. 6678 // Any non-2xx status code is an error. Response headers are in either 6679 // *GoogleCloudContentwarehouseV1ProjectStatus.ServerResponse.Header or (if a 6680 // response was returned at all) in error.(*googleapi.Error).Header. Use 6681 // googleapi.IsNotModified to check whether the returned error was because 6682 // http.StatusNotModified was returned. 6683 func (c *ProjectsLocationsGetStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1ProjectStatus, error) { 6684 gensupport.SetOptions(c.urlParams_, opts...) 6685 res, err := c.doRequest("json") 6686 if res != nil && res.StatusCode == http.StatusNotModified { 6687 if res.Body != nil { 6688 res.Body.Close() 6689 } 6690 return nil, gensupport.WrapError(&googleapi.Error{ 6691 Code: res.StatusCode, 6692 Header: res.Header, 6693 }) 6694 } 6695 if err != nil { 6696 return nil, err 6697 } 6698 defer googleapi.CloseBody(res) 6699 if err := googleapi.CheckResponse(res); err != nil { 6700 return nil, gensupport.WrapError(err) 6701 } 6702 ret := &GoogleCloudContentwarehouseV1ProjectStatus{ 6703 ServerResponse: googleapi.ServerResponse{ 6704 Header: res.Header, 6705 HTTPStatusCode: res.StatusCode, 6706 }, 6707 } 6708 target := &ret 6709 if err := gensupport.DecodeResponse(target, res); err != nil { 6710 return nil, err 6711 } 6712 return ret, nil 6713 } 6714 6715 type ProjectsLocationsInitializeCall struct { 6716 s *Service 6717 location string 6718 googlecloudcontentwarehousev1initializeprojectrequest *GoogleCloudContentwarehouseV1InitializeProjectRequest 6719 urlParams_ gensupport.URLParams 6720 ctx_ context.Context 6721 header_ http.Header 6722 } 6723 6724 // Initialize: Provisions resources for given tenant project. Returns a long 6725 // running operation. 6726 // 6727 // - location: The location to be initialized Format: 6728 // projects/{project_number}/locations/{location}. 6729 func (r *ProjectsLocationsService) Initialize(location string, googlecloudcontentwarehousev1initializeprojectrequest *GoogleCloudContentwarehouseV1InitializeProjectRequest) *ProjectsLocationsInitializeCall { 6730 c := &ProjectsLocationsInitializeCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6731 c.location = location 6732 c.googlecloudcontentwarehousev1initializeprojectrequest = googlecloudcontentwarehousev1initializeprojectrequest 6733 return c 6734 } 6735 6736 // Fields allows partial responses to be retrieved. See 6737 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6738 // details. 6739 func (c *ProjectsLocationsInitializeCall) Fields(s ...googleapi.Field) *ProjectsLocationsInitializeCall { 6740 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6741 return c 6742 } 6743 6744 // Context sets the context to be used in this call's Do method. 6745 func (c *ProjectsLocationsInitializeCall) Context(ctx context.Context) *ProjectsLocationsInitializeCall { 6746 c.ctx_ = ctx 6747 return c 6748 } 6749 6750 // Header returns a http.Header that can be modified by the caller to add 6751 // headers to the request. 6752 func (c *ProjectsLocationsInitializeCall) Header() http.Header { 6753 if c.header_ == nil { 6754 c.header_ = make(http.Header) 6755 } 6756 return c.header_ 6757 } 6758 6759 func (c *ProjectsLocationsInitializeCall) doRequest(alt string) (*http.Response, error) { 6760 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6761 var body io.Reader = nil 6762 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1initializeprojectrequest) 6763 if err != nil { 6764 return nil, err 6765 } 6766 c.urlParams_.Set("alt", alt) 6767 c.urlParams_.Set("prettyPrint", "false") 6768 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:initialize") 6769 urls += "?" + c.urlParams_.Encode() 6770 req, err := http.NewRequest("POST", urls, body) 6771 if err != nil { 6772 return nil, err 6773 } 6774 req.Header = reqHeaders 6775 googleapi.Expand(req.URL, map[string]string{ 6776 "location": c.location, 6777 }) 6778 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6779 } 6780 6781 // Do executes the "contentwarehouse.projects.locations.initialize" call. 6782 // Any non-2xx status code is an error. Response headers are in either 6783 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 6784 // returned at all) in error.(*googleapi.Error).Header. Use 6785 // googleapi.IsNotModified to check whether the returned error was because 6786 // http.StatusNotModified was returned. 6787 func (c *ProjectsLocationsInitializeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 6788 gensupport.SetOptions(c.urlParams_, opts...) 6789 res, err := c.doRequest("json") 6790 if res != nil && res.StatusCode == http.StatusNotModified { 6791 if res.Body != nil { 6792 res.Body.Close() 6793 } 6794 return nil, gensupport.WrapError(&googleapi.Error{ 6795 Code: res.StatusCode, 6796 Header: res.Header, 6797 }) 6798 } 6799 if err != nil { 6800 return nil, err 6801 } 6802 defer googleapi.CloseBody(res) 6803 if err := googleapi.CheckResponse(res); err != nil { 6804 return nil, gensupport.WrapError(err) 6805 } 6806 ret := &GoogleLongrunningOperation{ 6807 ServerResponse: googleapi.ServerResponse{ 6808 Header: res.Header, 6809 HTTPStatusCode: res.StatusCode, 6810 }, 6811 } 6812 target := &ret 6813 if err := gensupport.DecodeResponse(target, res); err != nil { 6814 return nil, err 6815 } 6816 return ret, nil 6817 } 6818 6819 type ProjectsLocationsRunPipelineCall struct { 6820 s *Service 6821 name string 6822 googlecloudcontentwarehousev1runpipelinerequest *GoogleCloudContentwarehouseV1RunPipelineRequest 6823 urlParams_ gensupport.URLParams 6824 ctx_ context.Context 6825 header_ http.Header 6826 } 6827 6828 // RunPipeline: Run a predefined pipeline. 6829 // 6830 // - name: The resource name which owns the resources of the pipeline. Format: 6831 // projects/{project_number}/locations/{location}. 6832 func (r *ProjectsLocationsService) RunPipeline(name string, googlecloudcontentwarehousev1runpipelinerequest *GoogleCloudContentwarehouseV1RunPipelineRequest) *ProjectsLocationsRunPipelineCall { 6833 c := &ProjectsLocationsRunPipelineCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6834 c.name = name 6835 c.googlecloudcontentwarehousev1runpipelinerequest = googlecloudcontentwarehousev1runpipelinerequest 6836 return c 6837 } 6838 6839 // Fields allows partial responses to be retrieved. See 6840 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6841 // details. 6842 func (c *ProjectsLocationsRunPipelineCall) Fields(s ...googleapi.Field) *ProjectsLocationsRunPipelineCall { 6843 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6844 return c 6845 } 6846 6847 // Context sets the context to be used in this call's Do method. 6848 func (c *ProjectsLocationsRunPipelineCall) Context(ctx context.Context) *ProjectsLocationsRunPipelineCall { 6849 c.ctx_ = ctx 6850 return c 6851 } 6852 6853 // Header returns a http.Header that can be modified by the caller to add 6854 // headers to the request. 6855 func (c *ProjectsLocationsRunPipelineCall) Header() http.Header { 6856 if c.header_ == nil { 6857 c.header_ = make(http.Header) 6858 } 6859 return c.header_ 6860 } 6861 6862 func (c *ProjectsLocationsRunPipelineCall) doRequest(alt string) (*http.Response, error) { 6863 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6864 var body io.Reader = nil 6865 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1runpipelinerequest) 6866 if err != nil { 6867 return nil, err 6868 } 6869 c.urlParams_.Set("alt", alt) 6870 c.urlParams_.Set("prettyPrint", "false") 6871 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:runPipeline") 6872 urls += "?" + c.urlParams_.Encode() 6873 req, err := http.NewRequest("POST", urls, body) 6874 if err != nil { 6875 return nil, err 6876 } 6877 req.Header = reqHeaders 6878 googleapi.Expand(req.URL, map[string]string{ 6879 "name": c.name, 6880 }) 6881 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6882 } 6883 6884 // Do executes the "contentwarehouse.projects.locations.runPipeline" call. 6885 // Any non-2xx status code is an error. Response headers are in either 6886 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 6887 // returned at all) in error.(*googleapi.Error).Header. Use 6888 // googleapi.IsNotModified to check whether the returned error was because 6889 // http.StatusNotModified was returned. 6890 func (c *ProjectsLocationsRunPipelineCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 6891 gensupport.SetOptions(c.urlParams_, opts...) 6892 res, err := c.doRequest("json") 6893 if res != nil && res.StatusCode == http.StatusNotModified { 6894 if res.Body != nil { 6895 res.Body.Close() 6896 } 6897 return nil, gensupport.WrapError(&googleapi.Error{ 6898 Code: res.StatusCode, 6899 Header: res.Header, 6900 }) 6901 } 6902 if err != nil { 6903 return nil, err 6904 } 6905 defer googleapi.CloseBody(res) 6906 if err := googleapi.CheckResponse(res); err != nil { 6907 return nil, gensupport.WrapError(err) 6908 } 6909 ret := &GoogleLongrunningOperation{ 6910 ServerResponse: googleapi.ServerResponse{ 6911 Header: res.Header, 6912 HTTPStatusCode: res.StatusCode, 6913 }, 6914 } 6915 target := &ret 6916 if err := gensupport.DecodeResponse(target, res); err != nil { 6917 return nil, err 6918 } 6919 return ret, nil 6920 } 6921 6922 type ProjectsLocationsDocumentSchemasCreateCall struct { 6923 s *Service 6924 parent string 6925 googlecloudcontentwarehousev1documentschema *GoogleCloudContentwarehouseV1DocumentSchema 6926 urlParams_ gensupport.URLParams 6927 ctx_ context.Context 6928 header_ http.Header 6929 } 6930 6931 // Create: Creates a document schema. 6932 // 6933 // - parent: The parent name. 6934 func (r *ProjectsLocationsDocumentSchemasService) Create(parent string, googlecloudcontentwarehousev1documentschema *GoogleCloudContentwarehouseV1DocumentSchema) *ProjectsLocationsDocumentSchemasCreateCall { 6935 c := &ProjectsLocationsDocumentSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6936 c.parent = parent 6937 c.googlecloudcontentwarehousev1documentschema = googlecloudcontentwarehousev1documentschema 6938 return c 6939 } 6940 6941 // Fields allows partial responses to be retrieved. See 6942 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 6943 // details. 6944 func (c *ProjectsLocationsDocumentSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentSchemasCreateCall { 6945 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6946 return c 6947 } 6948 6949 // Context sets the context to be used in this call's Do method. 6950 func (c *ProjectsLocationsDocumentSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDocumentSchemasCreateCall { 6951 c.ctx_ = ctx 6952 return c 6953 } 6954 6955 // Header returns a http.Header that can be modified by the caller to add 6956 // headers to the request. 6957 func (c *ProjectsLocationsDocumentSchemasCreateCall) Header() http.Header { 6958 if c.header_ == nil { 6959 c.header_ = make(http.Header) 6960 } 6961 return c.header_ 6962 } 6963 6964 func (c *ProjectsLocationsDocumentSchemasCreateCall) doRequest(alt string) (*http.Response, error) { 6965 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 6966 var body io.Reader = nil 6967 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1documentschema) 6968 if err != nil { 6969 return nil, err 6970 } 6971 c.urlParams_.Set("alt", alt) 6972 c.urlParams_.Set("prettyPrint", "false") 6973 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documentSchemas") 6974 urls += "?" + c.urlParams_.Encode() 6975 req, err := http.NewRequest("POST", urls, body) 6976 if err != nil { 6977 return nil, err 6978 } 6979 req.Header = reqHeaders 6980 googleapi.Expand(req.URL, map[string]string{ 6981 "parent": c.parent, 6982 }) 6983 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6984 } 6985 6986 // Do executes the "contentwarehouse.projects.locations.documentSchemas.create" call. 6987 // Any non-2xx status code is an error. Response headers are in either 6988 // *GoogleCloudContentwarehouseV1DocumentSchema.ServerResponse.Header or (if a 6989 // response was returned at all) in error.(*googleapi.Error).Header. Use 6990 // googleapi.IsNotModified to check whether the returned error was because 6991 // http.StatusNotModified was returned. 6992 func (c *ProjectsLocationsDocumentSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1DocumentSchema, error) { 6993 gensupport.SetOptions(c.urlParams_, opts...) 6994 res, err := c.doRequest("json") 6995 if res != nil && res.StatusCode == http.StatusNotModified { 6996 if res.Body != nil { 6997 res.Body.Close() 6998 } 6999 return nil, gensupport.WrapError(&googleapi.Error{ 7000 Code: res.StatusCode, 7001 Header: res.Header, 7002 }) 7003 } 7004 if err != nil { 7005 return nil, err 7006 } 7007 defer googleapi.CloseBody(res) 7008 if err := googleapi.CheckResponse(res); err != nil { 7009 return nil, gensupport.WrapError(err) 7010 } 7011 ret := &GoogleCloudContentwarehouseV1DocumentSchema{ 7012 ServerResponse: googleapi.ServerResponse{ 7013 Header: res.Header, 7014 HTTPStatusCode: res.StatusCode, 7015 }, 7016 } 7017 target := &ret 7018 if err := gensupport.DecodeResponse(target, res); err != nil { 7019 return nil, err 7020 } 7021 return ret, nil 7022 } 7023 7024 type ProjectsLocationsDocumentSchemasDeleteCall struct { 7025 s *Service 7026 name string 7027 urlParams_ gensupport.URLParams 7028 ctx_ context.Context 7029 header_ http.Header 7030 } 7031 7032 // Delete: Deletes a document schema. Returns NOT_FOUND if the document schema 7033 // does not exist. Returns BAD_REQUEST if the document schema has documents 7034 // depending on it. 7035 // 7036 // - name: The name of the document schema to delete. 7037 func (r *ProjectsLocationsDocumentSchemasService) Delete(name string) *ProjectsLocationsDocumentSchemasDeleteCall { 7038 c := &ProjectsLocationsDocumentSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7039 c.name = name 7040 return c 7041 } 7042 7043 // Fields allows partial responses to be retrieved. See 7044 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7045 // details. 7046 func (c *ProjectsLocationsDocumentSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentSchemasDeleteCall { 7047 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7048 return c 7049 } 7050 7051 // Context sets the context to be used in this call's Do method. 7052 func (c *ProjectsLocationsDocumentSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDocumentSchemasDeleteCall { 7053 c.ctx_ = ctx 7054 return c 7055 } 7056 7057 // Header returns a http.Header that can be modified by the caller to add 7058 // headers to the request. 7059 func (c *ProjectsLocationsDocumentSchemasDeleteCall) Header() http.Header { 7060 if c.header_ == nil { 7061 c.header_ = make(http.Header) 7062 } 7063 return c.header_ 7064 } 7065 7066 func (c *ProjectsLocationsDocumentSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { 7067 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7068 var body io.Reader = nil 7069 c.urlParams_.Set("alt", alt) 7070 c.urlParams_.Set("prettyPrint", "false") 7071 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7072 urls += "?" + c.urlParams_.Encode() 7073 req, err := http.NewRequest("DELETE", urls, body) 7074 if err != nil { 7075 return nil, err 7076 } 7077 req.Header = reqHeaders 7078 googleapi.Expand(req.URL, map[string]string{ 7079 "name": c.name, 7080 }) 7081 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7082 } 7083 7084 // Do executes the "contentwarehouse.projects.locations.documentSchemas.delete" call. 7085 // Any non-2xx status code is an error. Response headers are in either 7086 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 7087 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7088 // check whether the returned error was because http.StatusNotModified was 7089 // returned. 7090 func (c *ProjectsLocationsDocumentSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 7091 gensupport.SetOptions(c.urlParams_, opts...) 7092 res, err := c.doRequest("json") 7093 if res != nil && res.StatusCode == http.StatusNotModified { 7094 if res.Body != nil { 7095 res.Body.Close() 7096 } 7097 return nil, gensupport.WrapError(&googleapi.Error{ 7098 Code: res.StatusCode, 7099 Header: res.Header, 7100 }) 7101 } 7102 if err != nil { 7103 return nil, err 7104 } 7105 defer googleapi.CloseBody(res) 7106 if err := googleapi.CheckResponse(res); err != nil { 7107 return nil, gensupport.WrapError(err) 7108 } 7109 ret := &GoogleProtobufEmpty{ 7110 ServerResponse: googleapi.ServerResponse{ 7111 Header: res.Header, 7112 HTTPStatusCode: res.StatusCode, 7113 }, 7114 } 7115 target := &ret 7116 if err := gensupport.DecodeResponse(target, res); err != nil { 7117 return nil, err 7118 } 7119 return ret, nil 7120 } 7121 7122 type ProjectsLocationsDocumentSchemasGetCall struct { 7123 s *Service 7124 name string 7125 urlParams_ gensupport.URLParams 7126 ifNoneMatch_ string 7127 ctx_ context.Context 7128 header_ http.Header 7129 } 7130 7131 // Get: Gets a document schema. Returns NOT_FOUND if the document schema does 7132 // not exist. 7133 // 7134 // - name: The name of the document schema to retrieve. 7135 func (r *ProjectsLocationsDocumentSchemasService) Get(name string) *ProjectsLocationsDocumentSchemasGetCall { 7136 c := &ProjectsLocationsDocumentSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7137 c.name = name 7138 return c 7139 } 7140 7141 // Fields allows partial responses to be retrieved. See 7142 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7143 // details. 7144 func (c *ProjectsLocationsDocumentSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentSchemasGetCall { 7145 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7146 return c 7147 } 7148 7149 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7150 // object's ETag matches the given value. This is useful for getting updates 7151 // only after the object has changed since the last request. 7152 func (c *ProjectsLocationsDocumentSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDocumentSchemasGetCall { 7153 c.ifNoneMatch_ = entityTag 7154 return c 7155 } 7156 7157 // Context sets the context to be used in this call's Do method. 7158 func (c *ProjectsLocationsDocumentSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDocumentSchemasGetCall { 7159 c.ctx_ = ctx 7160 return c 7161 } 7162 7163 // Header returns a http.Header that can be modified by the caller to add 7164 // headers to the request. 7165 func (c *ProjectsLocationsDocumentSchemasGetCall) Header() http.Header { 7166 if c.header_ == nil { 7167 c.header_ = make(http.Header) 7168 } 7169 return c.header_ 7170 } 7171 7172 func (c *ProjectsLocationsDocumentSchemasGetCall) doRequest(alt string) (*http.Response, error) { 7173 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7174 if c.ifNoneMatch_ != "" { 7175 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7176 } 7177 var body io.Reader = nil 7178 c.urlParams_.Set("alt", alt) 7179 c.urlParams_.Set("prettyPrint", "false") 7180 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7181 urls += "?" + c.urlParams_.Encode() 7182 req, err := http.NewRequest("GET", urls, body) 7183 if err != nil { 7184 return nil, err 7185 } 7186 req.Header = reqHeaders 7187 googleapi.Expand(req.URL, map[string]string{ 7188 "name": c.name, 7189 }) 7190 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7191 } 7192 7193 // Do executes the "contentwarehouse.projects.locations.documentSchemas.get" call. 7194 // Any non-2xx status code is an error. Response headers are in either 7195 // *GoogleCloudContentwarehouseV1DocumentSchema.ServerResponse.Header or (if a 7196 // response was returned at all) in error.(*googleapi.Error).Header. Use 7197 // googleapi.IsNotModified to check whether the returned error was because 7198 // http.StatusNotModified was returned. 7199 func (c *ProjectsLocationsDocumentSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1DocumentSchema, error) { 7200 gensupport.SetOptions(c.urlParams_, opts...) 7201 res, err := c.doRequest("json") 7202 if res != nil && res.StatusCode == http.StatusNotModified { 7203 if res.Body != nil { 7204 res.Body.Close() 7205 } 7206 return nil, gensupport.WrapError(&googleapi.Error{ 7207 Code: res.StatusCode, 7208 Header: res.Header, 7209 }) 7210 } 7211 if err != nil { 7212 return nil, err 7213 } 7214 defer googleapi.CloseBody(res) 7215 if err := googleapi.CheckResponse(res); err != nil { 7216 return nil, gensupport.WrapError(err) 7217 } 7218 ret := &GoogleCloudContentwarehouseV1DocumentSchema{ 7219 ServerResponse: googleapi.ServerResponse{ 7220 Header: res.Header, 7221 HTTPStatusCode: res.StatusCode, 7222 }, 7223 } 7224 target := &ret 7225 if err := gensupport.DecodeResponse(target, res); err != nil { 7226 return nil, err 7227 } 7228 return ret, nil 7229 } 7230 7231 type ProjectsLocationsDocumentSchemasListCall struct { 7232 s *Service 7233 parent string 7234 urlParams_ gensupport.URLParams 7235 ifNoneMatch_ string 7236 ctx_ context.Context 7237 header_ http.Header 7238 } 7239 7240 // List: Lists document schemas. 7241 // 7242 // - parent: The parent, which owns this collection of document schemas. 7243 // Format: projects/{project_number}/locations/{location}. 7244 func (r *ProjectsLocationsDocumentSchemasService) List(parent string) *ProjectsLocationsDocumentSchemasListCall { 7245 c := &ProjectsLocationsDocumentSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7246 c.parent = parent 7247 return c 7248 } 7249 7250 // PageSize sets the optional parameter "pageSize": The maximum number of 7251 // document schemas to return. The service may return fewer than this value. If 7252 // unspecified, at most 50 document schemas will be returned. The maximum value 7253 // is 1000; values above 1000 will be coerced to 1000. 7254 func (c *ProjectsLocationsDocumentSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDocumentSchemasListCall { 7255 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 7256 return c 7257 } 7258 7259 // PageToken sets the optional parameter "pageToken": A page token, received 7260 // from a previous `ListDocumentSchemas` call. Provide this to retrieve the 7261 // subsequent page. When paginating, all other parameters provided to 7262 // `ListDocumentSchemas` must match the call that provided the page token. 7263 func (c *ProjectsLocationsDocumentSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDocumentSchemasListCall { 7264 c.urlParams_.Set("pageToken", pageToken) 7265 return c 7266 } 7267 7268 // Fields allows partial responses to be retrieved. See 7269 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7270 // details. 7271 func (c *ProjectsLocationsDocumentSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentSchemasListCall { 7272 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7273 return c 7274 } 7275 7276 // IfNoneMatch sets an optional parameter which makes the operation fail if the 7277 // object's ETag matches the given value. This is useful for getting updates 7278 // only after the object has changed since the last request. 7279 func (c *ProjectsLocationsDocumentSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDocumentSchemasListCall { 7280 c.ifNoneMatch_ = entityTag 7281 return c 7282 } 7283 7284 // Context sets the context to be used in this call's Do method. 7285 func (c *ProjectsLocationsDocumentSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDocumentSchemasListCall { 7286 c.ctx_ = ctx 7287 return c 7288 } 7289 7290 // Header returns a http.Header that can be modified by the caller to add 7291 // headers to the request. 7292 func (c *ProjectsLocationsDocumentSchemasListCall) Header() http.Header { 7293 if c.header_ == nil { 7294 c.header_ = make(http.Header) 7295 } 7296 return c.header_ 7297 } 7298 7299 func (c *ProjectsLocationsDocumentSchemasListCall) doRequest(alt string) (*http.Response, error) { 7300 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 7301 if c.ifNoneMatch_ != "" { 7302 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 7303 } 7304 var body io.Reader = nil 7305 c.urlParams_.Set("alt", alt) 7306 c.urlParams_.Set("prettyPrint", "false") 7307 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documentSchemas") 7308 urls += "?" + c.urlParams_.Encode() 7309 req, err := http.NewRequest("GET", urls, body) 7310 if err != nil { 7311 return nil, err 7312 } 7313 req.Header = reqHeaders 7314 googleapi.Expand(req.URL, map[string]string{ 7315 "parent": c.parent, 7316 }) 7317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7318 } 7319 7320 // Do executes the "contentwarehouse.projects.locations.documentSchemas.list" call. 7321 // Any non-2xx status code is an error. Response headers are in either 7322 // *GoogleCloudContentwarehouseV1ListDocumentSchemasResponse.ServerResponse.Head 7323 // er or (if a response was returned at all) in 7324 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 7325 // whether the returned error was because http.StatusNotModified was returned. 7326 func (c *ProjectsLocationsDocumentSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1ListDocumentSchemasResponse, error) { 7327 gensupport.SetOptions(c.urlParams_, opts...) 7328 res, err := c.doRequest("json") 7329 if res != nil && res.StatusCode == http.StatusNotModified { 7330 if res.Body != nil { 7331 res.Body.Close() 7332 } 7333 return nil, gensupport.WrapError(&googleapi.Error{ 7334 Code: res.StatusCode, 7335 Header: res.Header, 7336 }) 7337 } 7338 if err != nil { 7339 return nil, err 7340 } 7341 defer googleapi.CloseBody(res) 7342 if err := googleapi.CheckResponse(res); err != nil { 7343 return nil, gensupport.WrapError(err) 7344 } 7345 ret := &GoogleCloudContentwarehouseV1ListDocumentSchemasResponse{ 7346 ServerResponse: googleapi.ServerResponse{ 7347 Header: res.Header, 7348 HTTPStatusCode: res.StatusCode, 7349 }, 7350 } 7351 target := &ret 7352 if err := gensupport.DecodeResponse(target, res); err != nil { 7353 return nil, err 7354 } 7355 return ret, nil 7356 } 7357 7358 // Pages invokes f for each page of results. 7359 // A non-nil error returned from f will halt the iteration. 7360 // The provided context supersedes any context provided to the Context method. 7361 func (c *ProjectsLocationsDocumentSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudContentwarehouseV1ListDocumentSchemasResponse) error) error { 7362 c.ctx_ = ctx 7363 defer c.PageToken(c.urlParams_.Get("pageToken")) 7364 for { 7365 x, err := c.Do() 7366 if err != nil { 7367 return err 7368 } 7369 if err := f(x); err != nil { 7370 return err 7371 } 7372 if x.NextPageToken == "" { 7373 return nil 7374 } 7375 c.PageToken(x.NextPageToken) 7376 } 7377 } 7378 7379 type ProjectsLocationsDocumentSchemasPatchCall struct { 7380 s *Service 7381 name string 7382 googlecloudcontentwarehousev1updatedocumentschemarequest *GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest 7383 urlParams_ gensupport.URLParams 7384 ctx_ context.Context 7385 header_ http.Header 7386 } 7387 7388 // Patch: Updates a Document Schema. Returns INVALID_ARGUMENT if the name of 7389 // the Document Schema is non-empty and does not equal the existing name. 7390 // Supports only appending new properties, adding new ENUM possible values, and 7391 // updating the EnumTypeOptions.validation_check_disabled flag for ENUM 7392 // possible values. Updating existing properties will result into 7393 // INVALID_ARGUMENT. 7394 // 7395 // - name: The name of the document schema to update. Format: 7396 // projects/{project_number}/locations/{location}/documentSchemas/{document_sc 7397 // hema_id}. 7398 func (r *ProjectsLocationsDocumentSchemasService) Patch(name string, googlecloudcontentwarehousev1updatedocumentschemarequest *GoogleCloudContentwarehouseV1UpdateDocumentSchemaRequest) *ProjectsLocationsDocumentSchemasPatchCall { 7399 c := &ProjectsLocationsDocumentSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7400 c.name = name 7401 c.googlecloudcontentwarehousev1updatedocumentschemarequest = googlecloudcontentwarehousev1updatedocumentschemarequest 7402 return c 7403 } 7404 7405 // Fields allows partial responses to be retrieved. See 7406 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7407 // details. 7408 func (c *ProjectsLocationsDocumentSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentSchemasPatchCall { 7409 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7410 return c 7411 } 7412 7413 // Context sets the context to be used in this call's Do method. 7414 func (c *ProjectsLocationsDocumentSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDocumentSchemasPatchCall { 7415 c.ctx_ = ctx 7416 return c 7417 } 7418 7419 // Header returns a http.Header that can be modified by the caller to add 7420 // headers to the request. 7421 func (c *ProjectsLocationsDocumentSchemasPatchCall) Header() http.Header { 7422 if c.header_ == nil { 7423 c.header_ = make(http.Header) 7424 } 7425 return c.header_ 7426 } 7427 7428 func (c *ProjectsLocationsDocumentSchemasPatchCall) doRequest(alt string) (*http.Response, error) { 7429 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7430 var body io.Reader = nil 7431 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1updatedocumentschemarequest) 7432 if err != nil { 7433 return nil, err 7434 } 7435 c.urlParams_.Set("alt", alt) 7436 c.urlParams_.Set("prettyPrint", "false") 7437 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 7438 urls += "?" + c.urlParams_.Encode() 7439 req, err := http.NewRequest("PATCH", urls, body) 7440 if err != nil { 7441 return nil, err 7442 } 7443 req.Header = reqHeaders 7444 googleapi.Expand(req.URL, map[string]string{ 7445 "name": c.name, 7446 }) 7447 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7448 } 7449 7450 // Do executes the "contentwarehouse.projects.locations.documentSchemas.patch" call. 7451 // Any non-2xx status code is an error. Response headers are in either 7452 // *GoogleCloudContentwarehouseV1DocumentSchema.ServerResponse.Header or (if a 7453 // response was returned at all) in error.(*googleapi.Error).Header. Use 7454 // googleapi.IsNotModified to check whether the returned error was because 7455 // http.StatusNotModified was returned. 7456 func (c *ProjectsLocationsDocumentSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1DocumentSchema, error) { 7457 gensupport.SetOptions(c.urlParams_, opts...) 7458 res, err := c.doRequest("json") 7459 if res != nil && res.StatusCode == http.StatusNotModified { 7460 if res.Body != nil { 7461 res.Body.Close() 7462 } 7463 return nil, gensupport.WrapError(&googleapi.Error{ 7464 Code: res.StatusCode, 7465 Header: res.Header, 7466 }) 7467 } 7468 if err != nil { 7469 return nil, err 7470 } 7471 defer googleapi.CloseBody(res) 7472 if err := googleapi.CheckResponse(res); err != nil { 7473 return nil, gensupport.WrapError(err) 7474 } 7475 ret := &GoogleCloudContentwarehouseV1DocumentSchema{ 7476 ServerResponse: googleapi.ServerResponse{ 7477 Header: res.Header, 7478 HTTPStatusCode: res.StatusCode, 7479 }, 7480 } 7481 target := &ret 7482 if err := gensupport.DecodeResponse(target, res); err != nil { 7483 return nil, err 7484 } 7485 return ret, nil 7486 } 7487 7488 type ProjectsLocationsDocumentsCreateCall struct { 7489 s *Service 7490 parent string 7491 googlecloudcontentwarehousev1createdocumentrequest *GoogleCloudContentwarehouseV1CreateDocumentRequest 7492 urlParams_ gensupport.URLParams 7493 ctx_ context.Context 7494 header_ http.Header 7495 } 7496 7497 // Create: Creates a document. 7498 // 7499 // - parent: The parent name. Format: 7500 // projects/{project_number}/locations/{location}. 7501 func (r *ProjectsLocationsDocumentsService) Create(parent string, googlecloudcontentwarehousev1createdocumentrequest *GoogleCloudContentwarehouseV1CreateDocumentRequest) *ProjectsLocationsDocumentsCreateCall { 7502 c := &ProjectsLocationsDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7503 c.parent = parent 7504 c.googlecloudcontentwarehousev1createdocumentrequest = googlecloudcontentwarehousev1createdocumentrequest 7505 return c 7506 } 7507 7508 // Fields allows partial responses to be retrieved. See 7509 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7510 // details. 7511 func (c *ProjectsLocationsDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsCreateCall { 7512 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7513 return c 7514 } 7515 7516 // Context sets the context to be used in this call's Do method. 7517 func (c *ProjectsLocationsDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDocumentsCreateCall { 7518 c.ctx_ = ctx 7519 return c 7520 } 7521 7522 // Header returns a http.Header that can be modified by the caller to add 7523 // headers to the request. 7524 func (c *ProjectsLocationsDocumentsCreateCall) Header() http.Header { 7525 if c.header_ == nil { 7526 c.header_ = make(http.Header) 7527 } 7528 return c.header_ 7529 } 7530 7531 func (c *ProjectsLocationsDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { 7532 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7533 var body io.Reader = nil 7534 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1createdocumentrequest) 7535 if err != nil { 7536 return nil, err 7537 } 7538 c.urlParams_.Set("alt", alt) 7539 c.urlParams_.Set("prettyPrint", "false") 7540 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documents") 7541 urls += "?" + c.urlParams_.Encode() 7542 req, err := http.NewRequest("POST", urls, body) 7543 if err != nil { 7544 return nil, err 7545 } 7546 req.Header = reqHeaders 7547 googleapi.Expand(req.URL, map[string]string{ 7548 "parent": c.parent, 7549 }) 7550 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7551 } 7552 7553 // Do executes the "contentwarehouse.projects.locations.documents.create" call. 7554 // Any non-2xx status code is an error. Response headers are in either 7555 // *GoogleCloudContentwarehouseV1CreateDocumentResponse.ServerResponse.Header 7556 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 7557 // Use googleapi.IsNotModified to check whether the returned error was because 7558 // http.StatusNotModified was returned. 7559 func (c *ProjectsLocationsDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1CreateDocumentResponse, error) { 7560 gensupport.SetOptions(c.urlParams_, opts...) 7561 res, err := c.doRequest("json") 7562 if res != nil && res.StatusCode == http.StatusNotModified { 7563 if res.Body != nil { 7564 res.Body.Close() 7565 } 7566 return nil, gensupport.WrapError(&googleapi.Error{ 7567 Code: res.StatusCode, 7568 Header: res.Header, 7569 }) 7570 } 7571 if err != nil { 7572 return nil, err 7573 } 7574 defer googleapi.CloseBody(res) 7575 if err := googleapi.CheckResponse(res); err != nil { 7576 return nil, gensupport.WrapError(err) 7577 } 7578 ret := &GoogleCloudContentwarehouseV1CreateDocumentResponse{ 7579 ServerResponse: googleapi.ServerResponse{ 7580 Header: res.Header, 7581 HTTPStatusCode: res.StatusCode, 7582 }, 7583 } 7584 target := &ret 7585 if err := gensupport.DecodeResponse(target, res); err != nil { 7586 return nil, err 7587 } 7588 return ret, nil 7589 } 7590 7591 type ProjectsLocationsDocumentsDeleteCall struct { 7592 s *Service 7593 name string 7594 googlecloudcontentwarehousev1deletedocumentrequest *GoogleCloudContentwarehouseV1DeleteDocumentRequest 7595 urlParams_ gensupport.URLParams 7596 ctx_ context.Context 7597 header_ http.Header 7598 } 7599 7600 // Delete: Deletes a document. Returns NOT_FOUND if the document does not 7601 // exist. 7602 // 7603 // - name: The name of the document to delete. Format: 7604 // projects/{project_number}/locations/{location}/documents/{document_id} or 7605 // projects/{project_number}/locations/{location}/documents/referenceId/{refer 7606 // ence_id}. 7607 func (r *ProjectsLocationsDocumentsService) Delete(name string, googlecloudcontentwarehousev1deletedocumentrequest *GoogleCloudContentwarehouseV1DeleteDocumentRequest) *ProjectsLocationsDocumentsDeleteCall { 7608 c := &ProjectsLocationsDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7609 c.name = name 7610 c.googlecloudcontentwarehousev1deletedocumentrequest = googlecloudcontentwarehousev1deletedocumentrequest 7611 return c 7612 } 7613 7614 // Fields allows partial responses to be retrieved. See 7615 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7616 // details. 7617 func (c *ProjectsLocationsDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsDeleteCall { 7618 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7619 return c 7620 } 7621 7622 // Context sets the context to be used in this call's Do method. 7623 func (c *ProjectsLocationsDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDocumentsDeleteCall { 7624 c.ctx_ = ctx 7625 return c 7626 } 7627 7628 // Header returns a http.Header that can be modified by the caller to add 7629 // headers to the request. 7630 func (c *ProjectsLocationsDocumentsDeleteCall) Header() http.Header { 7631 if c.header_ == nil { 7632 c.header_ = make(http.Header) 7633 } 7634 return c.header_ 7635 } 7636 7637 func (c *ProjectsLocationsDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { 7638 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7639 var body io.Reader = nil 7640 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1deletedocumentrequest) 7641 if err != nil { 7642 return nil, err 7643 } 7644 c.urlParams_.Set("alt", alt) 7645 c.urlParams_.Set("prettyPrint", "false") 7646 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:delete") 7647 urls += "?" + c.urlParams_.Encode() 7648 req, err := http.NewRequest("POST", urls, body) 7649 if err != nil { 7650 return nil, err 7651 } 7652 req.Header = reqHeaders 7653 googleapi.Expand(req.URL, map[string]string{ 7654 "name": c.name, 7655 }) 7656 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7657 } 7658 7659 // Do executes the "contentwarehouse.projects.locations.documents.delete" call. 7660 // Any non-2xx status code is an error. Response headers are in either 7661 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 7662 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7663 // check whether the returned error was because http.StatusNotModified was 7664 // returned. 7665 func (c *ProjectsLocationsDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 7666 gensupport.SetOptions(c.urlParams_, opts...) 7667 res, err := c.doRequest("json") 7668 if res != nil && res.StatusCode == http.StatusNotModified { 7669 if res.Body != nil { 7670 res.Body.Close() 7671 } 7672 return nil, gensupport.WrapError(&googleapi.Error{ 7673 Code: res.StatusCode, 7674 Header: res.Header, 7675 }) 7676 } 7677 if err != nil { 7678 return nil, err 7679 } 7680 defer googleapi.CloseBody(res) 7681 if err := googleapi.CheckResponse(res); err != nil { 7682 return nil, gensupport.WrapError(err) 7683 } 7684 ret := &GoogleProtobufEmpty{ 7685 ServerResponse: googleapi.ServerResponse{ 7686 Header: res.Header, 7687 HTTPStatusCode: res.StatusCode, 7688 }, 7689 } 7690 target := &ret 7691 if err := gensupport.DecodeResponse(target, res); err != nil { 7692 return nil, err 7693 } 7694 return ret, nil 7695 } 7696 7697 type ProjectsLocationsDocumentsFetchAclCall struct { 7698 s *Service 7699 resource string 7700 googlecloudcontentwarehousev1fetchaclrequest *GoogleCloudContentwarehouseV1FetchAclRequest 7701 urlParams_ gensupport.URLParams 7702 ctx_ context.Context 7703 header_ http.Header 7704 } 7705 7706 // FetchAcl: Gets the access control policy for a resource. Returns NOT_FOUND 7707 // error if the resource does not exist. Returns an empty policy if the 7708 // resource exists but does not have a policy set. 7709 // 7710 // - resource: REQUIRED: The resource for which the policy is being requested. 7711 // Format for document: 7712 // projects/{project_number}/locations/{location}/documents/{document_id}. 7713 // Format for collection: 7714 // projects/{project_number}/locations/{location}/collections/{collection_id}. 7715 // Format for project: projects/{project_number}. 7716 func (r *ProjectsLocationsDocumentsService) FetchAcl(resource string, googlecloudcontentwarehousev1fetchaclrequest *GoogleCloudContentwarehouseV1FetchAclRequest) *ProjectsLocationsDocumentsFetchAclCall { 7717 c := &ProjectsLocationsDocumentsFetchAclCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7718 c.resource = resource 7719 c.googlecloudcontentwarehousev1fetchaclrequest = googlecloudcontentwarehousev1fetchaclrequest 7720 return c 7721 } 7722 7723 // Fields allows partial responses to be retrieved. See 7724 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7725 // details. 7726 func (c *ProjectsLocationsDocumentsFetchAclCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsFetchAclCall { 7727 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7728 return c 7729 } 7730 7731 // Context sets the context to be used in this call's Do method. 7732 func (c *ProjectsLocationsDocumentsFetchAclCall) Context(ctx context.Context) *ProjectsLocationsDocumentsFetchAclCall { 7733 c.ctx_ = ctx 7734 return c 7735 } 7736 7737 // Header returns a http.Header that can be modified by the caller to add 7738 // headers to the request. 7739 func (c *ProjectsLocationsDocumentsFetchAclCall) Header() http.Header { 7740 if c.header_ == nil { 7741 c.header_ = make(http.Header) 7742 } 7743 return c.header_ 7744 } 7745 7746 func (c *ProjectsLocationsDocumentsFetchAclCall) doRequest(alt string) (*http.Response, error) { 7747 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7748 var body io.Reader = nil 7749 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1fetchaclrequest) 7750 if err != nil { 7751 return nil, err 7752 } 7753 c.urlParams_.Set("alt", alt) 7754 c.urlParams_.Set("prettyPrint", "false") 7755 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:fetchAcl") 7756 urls += "?" + c.urlParams_.Encode() 7757 req, err := http.NewRequest("POST", urls, body) 7758 if err != nil { 7759 return nil, err 7760 } 7761 req.Header = reqHeaders 7762 googleapi.Expand(req.URL, map[string]string{ 7763 "resource": c.resource, 7764 }) 7765 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7766 } 7767 7768 // Do executes the "contentwarehouse.projects.locations.documents.fetchAcl" call. 7769 // Any non-2xx status code is an error. Response headers are in either 7770 // *GoogleCloudContentwarehouseV1FetchAclResponse.ServerResponse.Header or (if 7771 // a response was returned at all) in error.(*googleapi.Error).Header. Use 7772 // googleapi.IsNotModified to check whether the returned error was because 7773 // http.StatusNotModified was returned. 7774 func (c *ProjectsLocationsDocumentsFetchAclCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1FetchAclResponse, error) { 7775 gensupport.SetOptions(c.urlParams_, opts...) 7776 res, err := c.doRequest("json") 7777 if res != nil && res.StatusCode == http.StatusNotModified { 7778 if res.Body != nil { 7779 res.Body.Close() 7780 } 7781 return nil, gensupport.WrapError(&googleapi.Error{ 7782 Code: res.StatusCode, 7783 Header: res.Header, 7784 }) 7785 } 7786 if err != nil { 7787 return nil, err 7788 } 7789 defer googleapi.CloseBody(res) 7790 if err := googleapi.CheckResponse(res); err != nil { 7791 return nil, gensupport.WrapError(err) 7792 } 7793 ret := &GoogleCloudContentwarehouseV1FetchAclResponse{ 7794 ServerResponse: googleapi.ServerResponse{ 7795 Header: res.Header, 7796 HTTPStatusCode: res.StatusCode, 7797 }, 7798 } 7799 target := &ret 7800 if err := gensupport.DecodeResponse(target, res); err != nil { 7801 return nil, err 7802 } 7803 return ret, nil 7804 } 7805 7806 type ProjectsLocationsDocumentsGetCall struct { 7807 s *Service 7808 name string 7809 googlecloudcontentwarehousev1getdocumentrequest *GoogleCloudContentwarehouseV1GetDocumentRequest 7810 urlParams_ gensupport.URLParams 7811 ctx_ context.Context 7812 header_ http.Header 7813 } 7814 7815 // Get: Gets a document. Returns NOT_FOUND if the document does not exist. 7816 // 7817 // - name: The name of the document to retrieve. Format: 7818 // projects/{project_number}/locations/{location}/documents/{document_id} or 7819 // projects/{project_number}/locations/{location}/documents/referenceId/{refer 7820 // ence_id}. 7821 func (r *ProjectsLocationsDocumentsService) Get(name string, googlecloudcontentwarehousev1getdocumentrequest *GoogleCloudContentwarehouseV1GetDocumentRequest) *ProjectsLocationsDocumentsGetCall { 7822 c := &ProjectsLocationsDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7823 c.name = name 7824 c.googlecloudcontentwarehousev1getdocumentrequest = googlecloudcontentwarehousev1getdocumentrequest 7825 return c 7826 } 7827 7828 // Fields allows partial responses to be retrieved. See 7829 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7830 // details. 7831 func (c *ProjectsLocationsDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsGetCall { 7832 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7833 return c 7834 } 7835 7836 // Context sets the context to be used in this call's Do method. 7837 func (c *ProjectsLocationsDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDocumentsGetCall { 7838 c.ctx_ = ctx 7839 return c 7840 } 7841 7842 // Header returns a http.Header that can be modified by the caller to add 7843 // headers to the request. 7844 func (c *ProjectsLocationsDocumentsGetCall) Header() http.Header { 7845 if c.header_ == nil { 7846 c.header_ = make(http.Header) 7847 } 7848 return c.header_ 7849 } 7850 7851 func (c *ProjectsLocationsDocumentsGetCall) doRequest(alt string) (*http.Response, error) { 7852 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7853 var body io.Reader = nil 7854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1getdocumentrequest) 7855 if err != nil { 7856 return nil, err 7857 } 7858 c.urlParams_.Set("alt", alt) 7859 c.urlParams_.Set("prettyPrint", "false") 7860 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:get") 7861 urls += "?" + c.urlParams_.Encode() 7862 req, err := http.NewRequest("POST", urls, body) 7863 if err != nil { 7864 return nil, err 7865 } 7866 req.Header = reqHeaders 7867 googleapi.Expand(req.URL, map[string]string{ 7868 "name": c.name, 7869 }) 7870 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7871 } 7872 7873 // Do executes the "contentwarehouse.projects.locations.documents.get" call. 7874 // Any non-2xx status code is an error. Response headers are in either 7875 // *GoogleCloudContentwarehouseV1Document.ServerResponse.Header or (if a 7876 // response was returned at all) in error.(*googleapi.Error).Header. Use 7877 // googleapi.IsNotModified to check whether the returned error was because 7878 // http.StatusNotModified was returned. 7879 func (c *ProjectsLocationsDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1Document, error) { 7880 gensupport.SetOptions(c.urlParams_, opts...) 7881 res, err := c.doRequest("json") 7882 if res != nil && res.StatusCode == http.StatusNotModified { 7883 if res.Body != nil { 7884 res.Body.Close() 7885 } 7886 return nil, gensupport.WrapError(&googleapi.Error{ 7887 Code: res.StatusCode, 7888 Header: res.Header, 7889 }) 7890 } 7891 if err != nil { 7892 return nil, err 7893 } 7894 defer googleapi.CloseBody(res) 7895 if err := googleapi.CheckResponse(res); err != nil { 7896 return nil, gensupport.WrapError(err) 7897 } 7898 ret := &GoogleCloudContentwarehouseV1Document{ 7899 ServerResponse: googleapi.ServerResponse{ 7900 Header: res.Header, 7901 HTTPStatusCode: res.StatusCode, 7902 }, 7903 } 7904 target := &ret 7905 if err := gensupport.DecodeResponse(target, res); err != nil { 7906 return nil, err 7907 } 7908 return ret, nil 7909 } 7910 7911 type ProjectsLocationsDocumentsLinkedSourcesCall struct { 7912 s *Service 7913 parent string 7914 googlecloudcontentwarehousev1listlinkedsourcesrequest *GoogleCloudContentwarehouseV1ListLinkedSourcesRequest 7915 urlParams_ gensupport.URLParams 7916 ctx_ context.Context 7917 header_ http.Header 7918 } 7919 7920 // LinkedSources: Return all source document-links from the document. 7921 // 7922 // - parent: The name of the document, for which all source links are returned. 7923 // Format: 7924 // projects/{project_number}/locations/{location}/documents/{source_document_i 7925 // d}. 7926 func (r *ProjectsLocationsDocumentsService) LinkedSources(parent string, googlecloudcontentwarehousev1listlinkedsourcesrequest *GoogleCloudContentwarehouseV1ListLinkedSourcesRequest) *ProjectsLocationsDocumentsLinkedSourcesCall { 7927 c := &ProjectsLocationsDocumentsLinkedSourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7928 c.parent = parent 7929 c.googlecloudcontentwarehousev1listlinkedsourcesrequest = googlecloudcontentwarehousev1listlinkedsourcesrequest 7930 return c 7931 } 7932 7933 // Fields allows partial responses to be retrieved. See 7934 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 7935 // details. 7936 func (c *ProjectsLocationsDocumentsLinkedSourcesCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsLinkedSourcesCall { 7937 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7938 return c 7939 } 7940 7941 // Context sets the context to be used in this call's Do method. 7942 func (c *ProjectsLocationsDocumentsLinkedSourcesCall) Context(ctx context.Context) *ProjectsLocationsDocumentsLinkedSourcesCall { 7943 c.ctx_ = ctx 7944 return c 7945 } 7946 7947 // Header returns a http.Header that can be modified by the caller to add 7948 // headers to the request. 7949 func (c *ProjectsLocationsDocumentsLinkedSourcesCall) Header() http.Header { 7950 if c.header_ == nil { 7951 c.header_ = make(http.Header) 7952 } 7953 return c.header_ 7954 } 7955 7956 func (c *ProjectsLocationsDocumentsLinkedSourcesCall) doRequest(alt string) (*http.Response, error) { 7957 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 7958 var body io.Reader = nil 7959 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1listlinkedsourcesrequest) 7960 if err != nil { 7961 return nil, err 7962 } 7963 c.urlParams_.Set("alt", alt) 7964 c.urlParams_.Set("prettyPrint", "false") 7965 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/linkedSources") 7966 urls += "?" + c.urlParams_.Encode() 7967 req, err := http.NewRequest("POST", urls, body) 7968 if err != nil { 7969 return nil, err 7970 } 7971 req.Header = reqHeaders 7972 googleapi.Expand(req.URL, map[string]string{ 7973 "parent": c.parent, 7974 }) 7975 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7976 } 7977 7978 // Do executes the "contentwarehouse.projects.locations.documents.linkedSources" call. 7979 // Any non-2xx status code is an error. Response headers are in either 7980 // *GoogleCloudContentwarehouseV1ListLinkedSourcesResponse.ServerResponse.Header 7981 // 7982 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 7983 // 7984 // Use googleapi.IsNotModified to check whether the returned error was because 7985 // http.StatusNotModified was returned. 7986 func (c *ProjectsLocationsDocumentsLinkedSourcesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1ListLinkedSourcesResponse, error) { 7987 gensupport.SetOptions(c.urlParams_, opts...) 7988 res, err := c.doRequest("json") 7989 if res != nil && res.StatusCode == http.StatusNotModified { 7990 if res.Body != nil { 7991 res.Body.Close() 7992 } 7993 return nil, gensupport.WrapError(&googleapi.Error{ 7994 Code: res.StatusCode, 7995 Header: res.Header, 7996 }) 7997 } 7998 if err != nil { 7999 return nil, err 8000 } 8001 defer googleapi.CloseBody(res) 8002 if err := googleapi.CheckResponse(res); err != nil { 8003 return nil, gensupport.WrapError(err) 8004 } 8005 ret := &GoogleCloudContentwarehouseV1ListLinkedSourcesResponse{ 8006 ServerResponse: googleapi.ServerResponse{ 8007 Header: res.Header, 8008 HTTPStatusCode: res.StatusCode, 8009 }, 8010 } 8011 target := &ret 8012 if err := gensupport.DecodeResponse(target, res); err != nil { 8013 return nil, err 8014 } 8015 return ret, nil 8016 } 8017 8018 // Pages invokes f for each page of results. 8019 // A non-nil error returned from f will halt the iteration. 8020 // The provided context supersedes any context provided to the Context method. 8021 func (c *ProjectsLocationsDocumentsLinkedSourcesCall) Pages(ctx context.Context, f func(*GoogleCloudContentwarehouseV1ListLinkedSourcesResponse) error) error { 8022 c.ctx_ = ctx 8023 defer func(pt string) { c.googlecloudcontentwarehousev1listlinkedsourcesrequest.PageToken = pt }(c.googlecloudcontentwarehousev1listlinkedsourcesrequest.PageToken) 8024 for { 8025 x, err := c.Do() 8026 if err != nil { 8027 return err 8028 } 8029 if err := f(x); err != nil { 8030 return err 8031 } 8032 if x.NextPageToken == "" { 8033 return nil 8034 } 8035 c.googlecloudcontentwarehousev1listlinkedsourcesrequest.PageToken = x.NextPageToken 8036 } 8037 } 8038 8039 type ProjectsLocationsDocumentsLinkedTargetsCall struct { 8040 s *Service 8041 parent string 8042 googlecloudcontentwarehousev1listlinkedtargetsrequest *GoogleCloudContentwarehouseV1ListLinkedTargetsRequest 8043 urlParams_ gensupport.URLParams 8044 ctx_ context.Context 8045 header_ http.Header 8046 } 8047 8048 // LinkedTargets: Return all target document-links from the document. 8049 // 8050 // - parent: The name of the document, for which all target links are returned. 8051 // Format: 8052 // projects/{project_number}/locations/{location}/documents/{target_document_i 8053 // d}. 8054 func (r *ProjectsLocationsDocumentsService) LinkedTargets(parent string, googlecloudcontentwarehousev1listlinkedtargetsrequest *GoogleCloudContentwarehouseV1ListLinkedTargetsRequest) *ProjectsLocationsDocumentsLinkedTargetsCall { 8055 c := &ProjectsLocationsDocumentsLinkedTargetsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8056 c.parent = parent 8057 c.googlecloudcontentwarehousev1listlinkedtargetsrequest = googlecloudcontentwarehousev1listlinkedtargetsrequest 8058 return c 8059 } 8060 8061 // Fields allows partial responses to be retrieved. See 8062 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8063 // details. 8064 func (c *ProjectsLocationsDocumentsLinkedTargetsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsLinkedTargetsCall { 8065 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8066 return c 8067 } 8068 8069 // Context sets the context to be used in this call's Do method. 8070 func (c *ProjectsLocationsDocumentsLinkedTargetsCall) Context(ctx context.Context) *ProjectsLocationsDocumentsLinkedTargetsCall { 8071 c.ctx_ = ctx 8072 return c 8073 } 8074 8075 // Header returns a http.Header that can be modified by the caller to add 8076 // headers to the request. 8077 func (c *ProjectsLocationsDocumentsLinkedTargetsCall) Header() http.Header { 8078 if c.header_ == nil { 8079 c.header_ = make(http.Header) 8080 } 8081 return c.header_ 8082 } 8083 8084 func (c *ProjectsLocationsDocumentsLinkedTargetsCall) doRequest(alt string) (*http.Response, error) { 8085 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8086 var body io.Reader = nil 8087 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1listlinkedtargetsrequest) 8088 if err != nil { 8089 return nil, err 8090 } 8091 c.urlParams_.Set("alt", alt) 8092 c.urlParams_.Set("prettyPrint", "false") 8093 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/linkedTargets") 8094 urls += "?" + c.urlParams_.Encode() 8095 req, err := http.NewRequest("POST", urls, body) 8096 if err != nil { 8097 return nil, err 8098 } 8099 req.Header = reqHeaders 8100 googleapi.Expand(req.URL, map[string]string{ 8101 "parent": c.parent, 8102 }) 8103 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8104 } 8105 8106 // Do executes the "contentwarehouse.projects.locations.documents.linkedTargets" call. 8107 // Any non-2xx status code is an error. Response headers are in either 8108 // *GoogleCloudContentwarehouseV1ListLinkedTargetsResponse.ServerResponse.Header 8109 // 8110 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 8111 // 8112 // Use googleapi.IsNotModified to check whether the returned error was because 8113 // http.StatusNotModified was returned. 8114 func (c *ProjectsLocationsDocumentsLinkedTargetsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1ListLinkedTargetsResponse, error) { 8115 gensupport.SetOptions(c.urlParams_, opts...) 8116 res, err := c.doRequest("json") 8117 if res != nil && res.StatusCode == http.StatusNotModified { 8118 if res.Body != nil { 8119 res.Body.Close() 8120 } 8121 return nil, gensupport.WrapError(&googleapi.Error{ 8122 Code: res.StatusCode, 8123 Header: res.Header, 8124 }) 8125 } 8126 if err != nil { 8127 return nil, err 8128 } 8129 defer googleapi.CloseBody(res) 8130 if err := googleapi.CheckResponse(res); err != nil { 8131 return nil, gensupport.WrapError(err) 8132 } 8133 ret := &GoogleCloudContentwarehouseV1ListLinkedTargetsResponse{ 8134 ServerResponse: googleapi.ServerResponse{ 8135 Header: res.Header, 8136 HTTPStatusCode: res.StatusCode, 8137 }, 8138 } 8139 target := &ret 8140 if err := gensupport.DecodeResponse(target, res); err != nil { 8141 return nil, err 8142 } 8143 return ret, nil 8144 } 8145 8146 type ProjectsLocationsDocumentsLockCall struct { 8147 s *Service 8148 name string 8149 googlecloudcontentwarehousev1lockdocumentrequest *GoogleCloudContentwarehouseV1LockDocumentRequest 8150 urlParams_ gensupport.URLParams 8151 ctx_ context.Context 8152 header_ http.Header 8153 } 8154 8155 // Lock: Lock the document so the document cannot be updated by other users. 8156 // 8157 // - name: The name of the document to lock. Format: 8158 // projects/{project_number}/locations/{location}/documents/{document}. 8159 func (r *ProjectsLocationsDocumentsService) Lock(name string, googlecloudcontentwarehousev1lockdocumentrequest *GoogleCloudContentwarehouseV1LockDocumentRequest) *ProjectsLocationsDocumentsLockCall { 8160 c := &ProjectsLocationsDocumentsLockCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8161 c.name = name 8162 c.googlecloudcontentwarehousev1lockdocumentrequest = googlecloudcontentwarehousev1lockdocumentrequest 8163 return c 8164 } 8165 8166 // Fields allows partial responses to be retrieved. See 8167 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8168 // details. 8169 func (c *ProjectsLocationsDocumentsLockCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsLockCall { 8170 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8171 return c 8172 } 8173 8174 // Context sets the context to be used in this call's Do method. 8175 func (c *ProjectsLocationsDocumentsLockCall) Context(ctx context.Context) *ProjectsLocationsDocumentsLockCall { 8176 c.ctx_ = ctx 8177 return c 8178 } 8179 8180 // Header returns a http.Header that can be modified by the caller to add 8181 // headers to the request. 8182 func (c *ProjectsLocationsDocumentsLockCall) Header() http.Header { 8183 if c.header_ == nil { 8184 c.header_ = make(http.Header) 8185 } 8186 return c.header_ 8187 } 8188 8189 func (c *ProjectsLocationsDocumentsLockCall) doRequest(alt string) (*http.Response, error) { 8190 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8191 var body io.Reader = nil 8192 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1lockdocumentrequest) 8193 if err != nil { 8194 return nil, err 8195 } 8196 c.urlParams_.Set("alt", alt) 8197 c.urlParams_.Set("prettyPrint", "false") 8198 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:lock") 8199 urls += "?" + c.urlParams_.Encode() 8200 req, err := http.NewRequest("POST", urls, body) 8201 if err != nil { 8202 return nil, err 8203 } 8204 req.Header = reqHeaders 8205 googleapi.Expand(req.URL, map[string]string{ 8206 "name": c.name, 8207 }) 8208 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8209 } 8210 8211 // Do executes the "contentwarehouse.projects.locations.documents.lock" call. 8212 // Any non-2xx status code is an error. Response headers are in either 8213 // *GoogleCloudContentwarehouseV1Document.ServerResponse.Header or (if a 8214 // response was returned at all) in error.(*googleapi.Error).Header. Use 8215 // googleapi.IsNotModified to check whether the returned error was because 8216 // http.StatusNotModified was returned. 8217 func (c *ProjectsLocationsDocumentsLockCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1Document, error) { 8218 gensupport.SetOptions(c.urlParams_, opts...) 8219 res, err := c.doRequest("json") 8220 if res != nil && res.StatusCode == http.StatusNotModified { 8221 if res.Body != nil { 8222 res.Body.Close() 8223 } 8224 return nil, gensupport.WrapError(&googleapi.Error{ 8225 Code: res.StatusCode, 8226 Header: res.Header, 8227 }) 8228 } 8229 if err != nil { 8230 return nil, err 8231 } 8232 defer googleapi.CloseBody(res) 8233 if err := googleapi.CheckResponse(res); err != nil { 8234 return nil, gensupport.WrapError(err) 8235 } 8236 ret := &GoogleCloudContentwarehouseV1Document{ 8237 ServerResponse: googleapi.ServerResponse{ 8238 Header: res.Header, 8239 HTTPStatusCode: res.StatusCode, 8240 }, 8241 } 8242 target := &ret 8243 if err := gensupport.DecodeResponse(target, res); err != nil { 8244 return nil, err 8245 } 8246 return ret, nil 8247 } 8248 8249 type ProjectsLocationsDocumentsPatchCall struct { 8250 s *Service 8251 name string 8252 googlecloudcontentwarehousev1updatedocumentrequest *GoogleCloudContentwarehouseV1UpdateDocumentRequest 8253 urlParams_ gensupport.URLParams 8254 ctx_ context.Context 8255 header_ http.Header 8256 } 8257 8258 // Patch: Updates a document. Returns INVALID_ARGUMENT if the name of the 8259 // document is non-empty and does not equal the existing name. 8260 // 8261 // - name: The name of the document to update. Format: 8262 // projects/{project_number}/locations/{location}/documents/{document_id} or 8263 // projects/{project_number}/locations/{location}/documents/referenceId/{refer 8264 // ence_id}. 8265 func (r *ProjectsLocationsDocumentsService) Patch(name string, googlecloudcontentwarehousev1updatedocumentrequest *GoogleCloudContentwarehouseV1UpdateDocumentRequest) *ProjectsLocationsDocumentsPatchCall { 8266 c := &ProjectsLocationsDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8267 c.name = name 8268 c.googlecloudcontentwarehousev1updatedocumentrequest = googlecloudcontentwarehousev1updatedocumentrequest 8269 return c 8270 } 8271 8272 // Fields allows partial responses to be retrieved. See 8273 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8274 // details. 8275 func (c *ProjectsLocationsDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsPatchCall { 8276 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8277 return c 8278 } 8279 8280 // Context sets the context to be used in this call's Do method. 8281 func (c *ProjectsLocationsDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDocumentsPatchCall { 8282 c.ctx_ = ctx 8283 return c 8284 } 8285 8286 // Header returns a http.Header that can be modified by the caller to add 8287 // headers to the request. 8288 func (c *ProjectsLocationsDocumentsPatchCall) Header() http.Header { 8289 if c.header_ == nil { 8290 c.header_ = make(http.Header) 8291 } 8292 return c.header_ 8293 } 8294 8295 func (c *ProjectsLocationsDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { 8296 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8297 var body io.Reader = nil 8298 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1updatedocumentrequest) 8299 if err != nil { 8300 return nil, err 8301 } 8302 c.urlParams_.Set("alt", alt) 8303 c.urlParams_.Set("prettyPrint", "false") 8304 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 8305 urls += "?" + c.urlParams_.Encode() 8306 req, err := http.NewRequest("PATCH", urls, body) 8307 if err != nil { 8308 return nil, err 8309 } 8310 req.Header = reqHeaders 8311 googleapi.Expand(req.URL, map[string]string{ 8312 "name": c.name, 8313 }) 8314 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8315 } 8316 8317 // Do executes the "contentwarehouse.projects.locations.documents.patch" call. 8318 // Any non-2xx status code is an error. Response headers are in either 8319 // *GoogleCloudContentwarehouseV1UpdateDocumentResponse.ServerResponse.Header 8320 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 8321 // Use googleapi.IsNotModified to check whether the returned error was because 8322 // http.StatusNotModified was returned. 8323 func (c *ProjectsLocationsDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1UpdateDocumentResponse, error) { 8324 gensupport.SetOptions(c.urlParams_, opts...) 8325 res, err := c.doRequest("json") 8326 if res != nil && res.StatusCode == http.StatusNotModified { 8327 if res.Body != nil { 8328 res.Body.Close() 8329 } 8330 return nil, gensupport.WrapError(&googleapi.Error{ 8331 Code: res.StatusCode, 8332 Header: res.Header, 8333 }) 8334 } 8335 if err != nil { 8336 return nil, err 8337 } 8338 defer googleapi.CloseBody(res) 8339 if err := googleapi.CheckResponse(res); err != nil { 8340 return nil, gensupport.WrapError(err) 8341 } 8342 ret := &GoogleCloudContentwarehouseV1UpdateDocumentResponse{ 8343 ServerResponse: googleapi.ServerResponse{ 8344 Header: res.Header, 8345 HTTPStatusCode: res.StatusCode, 8346 }, 8347 } 8348 target := &ret 8349 if err := gensupport.DecodeResponse(target, res); err != nil { 8350 return nil, err 8351 } 8352 return ret, nil 8353 } 8354 8355 type ProjectsLocationsDocumentsSearchCall struct { 8356 s *Service 8357 parent string 8358 googlecloudcontentwarehousev1searchdocumentsrequest *GoogleCloudContentwarehouseV1SearchDocumentsRequest 8359 urlParams_ gensupport.URLParams 8360 ctx_ context.Context 8361 header_ http.Header 8362 } 8363 8364 // Search: Searches for documents using provided SearchDocumentsRequest. This 8365 // call only returns documents that the caller has permission to search 8366 // against. 8367 // 8368 // - parent: The parent, which owns this collection of documents. Format: 8369 // projects/{project_number}/locations/{location}. 8370 func (r *ProjectsLocationsDocumentsService) Search(parent string, googlecloudcontentwarehousev1searchdocumentsrequest *GoogleCloudContentwarehouseV1SearchDocumentsRequest) *ProjectsLocationsDocumentsSearchCall { 8371 c := &ProjectsLocationsDocumentsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8372 c.parent = parent 8373 c.googlecloudcontentwarehousev1searchdocumentsrequest = googlecloudcontentwarehousev1searchdocumentsrequest 8374 return c 8375 } 8376 8377 // Fields allows partial responses to be retrieved. See 8378 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8379 // details. 8380 func (c *ProjectsLocationsDocumentsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsSearchCall { 8381 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8382 return c 8383 } 8384 8385 // Context sets the context to be used in this call's Do method. 8386 func (c *ProjectsLocationsDocumentsSearchCall) Context(ctx context.Context) *ProjectsLocationsDocumentsSearchCall { 8387 c.ctx_ = ctx 8388 return c 8389 } 8390 8391 // Header returns a http.Header that can be modified by the caller to add 8392 // headers to the request. 8393 func (c *ProjectsLocationsDocumentsSearchCall) Header() http.Header { 8394 if c.header_ == nil { 8395 c.header_ = make(http.Header) 8396 } 8397 return c.header_ 8398 } 8399 8400 func (c *ProjectsLocationsDocumentsSearchCall) doRequest(alt string) (*http.Response, error) { 8401 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8402 var body io.Reader = nil 8403 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1searchdocumentsrequest) 8404 if err != nil { 8405 return nil, err 8406 } 8407 c.urlParams_.Set("alt", alt) 8408 c.urlParams_.Set("prettyPrint", "false") 8409 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documents:search") 8410 urls += "?" + c.urlParams_.Encode() 8411 req, err := http.NewRequest("POST", urls, body) 8412 if err != nil { 8413 return nil, err 8414 } 8415 req.Header = reqHeaders 8416 googleapi.Expand(req.URL, map[string]string{ 8417 "parent": c.parent, 8418 }) 8419 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8420 } 8421 8422 // Do executes the "contentwarehouse.projects.locations.documents.search" call. 8423 // Any non-2xx status code is an error. Response headers are in either 8424 // *GoogleCloudContentwarehouseV1SearchDocumentsResponse.ServerResponse.Header 8425 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 8426 // Use googleapi.IsNotModified to check whether the returned error was because 8427 // http.StatusNotModified was returned. 8428 func (c *ProjectsLocationsDocumentsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1SearchDocumentsResponse, error) { 8429 gensupport.SetOptions(c.urlParams_, opts...) 8430 res, err := c.doRequest("json") 8431 if res != nil && res.StatusCode == http.StatusNotModified { 8432 if res.Body != nil { 8433 res.Body.Close() 8434 } 8435 return nil, gensupport.WrapError(&googleapi.Error{ 8436 Code: res.StatusCode, 8437 Header: res.Header, 8438 }) 8439 } 8440 if err != nil { 8441 return nil, err 8442 } 8443 defer googleapi.CloseBody(res) 8444 if err := googleapi.CheckResponse(res); err != nil { 8445 return nil, gensupport.WrapError(err) 8446 } 8447 ret := &GoogleCloudContentwarehouseV1SearchDocumentsResponse{ 8448 ServerResponse: googleapi.ServerResponse{ 8449 Header: res.Header, 8450 HTTPStatusCode: res.StatusCode, 8451 }, 8452 } 8453 target := &ret 8454 if err := gensupport.DecodeResponse(target, res); err != nil { 8455 return nil, err 8456 } 8457 return ret, nil 8458 } 8459 8460 // Pages invokes f for each page of results. 8461 // A non-nil error returned from f will halt the iteration. 8462 // The provided context supersedes any context provided to the Context method. 8463 func (c *ProjectsLocationsDocumentsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudContentwarehouseV1SearchDocumentsResponse) error) error { 8464 c.ctx_ = ctx 8465 defer func(pt string) { c.googlecloudcontentwarehousev1searchdocumentsrequest.PageToken = pt }(c.googlecloudcontentwarehousev1searchdocumentsrequest.PageToken) 8466 for { 8467 x, err := c.Do() 8468 if err != nil { 8469 return err 8470 } 8471 if err := f(x); err != nil { 8472 return err 8473 } 8474 if x.NextPageToken == "" { 8475 return nil 8476 } 8477 c.googlecloudcontentwarehousev1searchdocumentsrequest.PageToken = x.NextPageToken 8478 } 8479 } 8480 8481 type ProjectsLocationsDocumentsSetAclCall struct { 8482 s *Service 8483 resource string 8484 googlecloudcontentwarehousev1setaclrequest *GoogleCloudContentwarehouseV1SetAclRequest 8485 urlParams_ gensupport.URLParams 8486 ctx_ context.Context 8487 header_ http.Header 8488 } 8489 8490 // SetAcl: Sets the access control policy for a resource. Replaces any existing 8491 // policy. 8492 // 8493 // - resource: REQUIRED: The resource for which the policy is being requested. 8494 // Format for document: 8495 // projects/{project_number}/locations/{location}/documents/{document_id}. 8496 // Format for collection: 8497 // projects/{project_number}/locations/{location}/collections/{collection_id}. 8498 // Format for project: projects/{project_number}. 8499 func (r *ProjectsLocationsDocumentsService) SetAcl(resource string, googlecloudcontentwarehousev1setaclrequest *GoogleCloudContentwarehouseV1SetAclRequest) *ProjectsLocationsDocumentsSetAclCall { 8500 c := &ProjectsLocationsDocumentsSetAclCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8501 c.resource = resource 8502 c.googlecloudcontentwarehousev1setaclrequest = googlecloudcontentwarehousev1setaclrequest 8503 return c 8504 } 8505 8506 // Fields allows partial responses to be retrieved. See 8507 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8508 // details. 8509 func (c *ProjectsLocationsDocumentsSetAclCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsSetAclCall { 8510 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8511 return c 8512 } 8513 8514 // Context sets the context to be used in this call's Do method. 8515 func (c *ProjectsLocationsDocumentsSetAclCall) Context(ctx context.Context) *ProjectsLocationsDocumentsSetAclCall { 8516 c.ctx_ = ctx 8517 return c 8518 } 8519 8520 // Header returns a http.Header that can be modified by the caller to add 8521 // headers to the request. 8522 func (c *ProjectsLocationsDocumentsSetAclCall) Header() http.Header { 8523 if c.header_ == nil { 8524 c.header_ = make(http.Header) 8525 } 8526 return c.header_ 8527 } 8528 8529 func (c *ProjectsLocationsDocumentsSetAclCall) doRequest(alt string) (*http.Response, error) { 8530 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8531 var body io.Reader = nil 8532 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1setaclrequest) 8533 if err != nil { 8534 return nil, err 8535 } 8536 c.urlParams_.Set("alt", alt) 8537 c.urlParams_.Set("prettyPrint", "false") 8538 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setAcl") 8539 urls += "?" + c.urlParams_.Encode() 8540 req, err := http.NewRequest("POST", urls, body) 8541 if err != nil { 8542 return nil, err 8543 } 8544 req.Header = reqHeaders 8545 googleapi.Expand(req.URL, map[string]string{ 8546 "resource": c.resource, 8547 }) 8548 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8549 } 8550 8551 // Do executes the "contentwarehouse.projects.locations.documents.setAcl" call. 8552 // Any non-2xx status code is an error. Response headers are in either 8553 // *GoogleCloudContentwarehouseV1SetAclResponse.ServerResponse.Header or (if a 8554 // response was returned at all) in error.(*googleapi.Error).Header. Use 8555 // googleapi.IsNotModified to check whether the returned error was because 8556 // http.StatusNotModified was returned. 8557 func (c *ProjectsLocationsDocumentsSetAclCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1SetAclResponse, error) { 8558 gensupport.SetOptions(c.urlParams_, opts...) 8559 res, err := c.doRequest("json") 8560 if res != nil && res.StatusCode == http.StatusNotModified { 8561 if res.Body != nil { 8562 res.Body.Close() 8563 } 8564 return nil, gensupport.WrapError(&googleapi.Error{ 8565 Code: res.StatusCode, 8566 Header: res.Header, 8567 }) 8568 } 8569 if err != nil { 8570 return nil, err 8571 } 8572 defer googleapi.CloseBody(res) 8573 if err := googleapi.CheckResponse(res); err != nil { 8574 return nil, gensupport.WrapError(err) 8575 } 8576 ret := &GoogleCloudContentwarehouseV1SetAclResponse{ 8577 ServerResponse: googleapi.ServerResponse{ 8578 Header: res.Header, 8579 HTTPStatusCode: res.StatusCode, 8580 }, 8581 } 8582 target := &ret 8583 if err := gensupport.DecodeResponse(target, res); err != nil { 8584 return nil, err 8585 } 8586 return ret, nil 8587 } 8588 8589 type ProjectsLocationsDocumentsDocumentLinksCreateCall struct { 8590 s *Service 8591 parent string 8592 googlecloudcontentwarehousev1createdocumentlinkrequest *GoogleCloudContentwarehouseV1CreateDocumentLinkRequest 8593 urlParams_ gensupport.URLParams 8594 ctx_ context.Context 8595 header_ http.Header 8596 } 8597 8598 // Create: Create a link between a source document and a target document. 8599 // 8600 // - parent: Parent of the document-link to be created. parent of document-link 8601 // should be a document. Format: 8602 // projects/{project_number}/locations/{location}/documents/{source_document_i 8603 // d}. 8604 func (r *ProjectsLocationsDocumentsDocumentLinksService) Create(parent string, googlecloudcontentwarehousev1createdocumentlinkrequest *GoogleCloudContentwarehouseV1CreateDocumentLinkRequest) *ProjectsLocationsDocumentsDocumentLinksCreateCall { 8605 c := &ProjectsLocationsDocumentsDocumentLinksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8606 c.parent = parent 8607 c.googlecloudcontentwarehousev1createdocumentlinkrequest = googlecloudcontentwarehousev1createdocumentlinkrequest 8608 return c 8609 } 8610 8611 // Fields allows partial responses to be retrieved. See 8612 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8613 // details. 8614 func (c *ProjectsLocationsDocumentsDocumentLinksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsDocumentLinksCreateCall { 8615 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8616 return c 8617 } 8618 8619 // Context sets the context to be used in this call's Do method. 8620 func (c *ProjectsLocationsDocumentsDocumentLinksCreateCall) Context(ctx context.Context) *ProjectsLocationsDocumentsDocumentLinksCreateCall { 8621 c.ctx_ = ctx 8622 return c 8623 } 8624 8625 // Header returns a http.Header that can be modified by the caller to add 8626 // headers to the request. 8627 func (c *ProjectsLocationsDocumentsDocumentLinksCreateCall) Header() http.Header { 8628 if c.header_ == nil { 8629 c.header_ = make(http.Header) 8630 } 8631 return c.header_ 8632 } 8633 8634 func (c *ProjectsLocationsDocumentsDocumentLinksCreateCall) doRequest(alt string) (*http.Response, error) { 8635 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8636 var body io.Reader = nil 8637 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1createdocumentlinkrequest) 8638 if err != nil { 8639 return nil, err 8640 } 8641 c.urlParams_.Set("alt", alt) 8642 c.urlParams_.Set("prettyPrint", "false") 8643 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documentLinks") 8644 urls += "?" + c.urlParams_.Encode() 8645 req, err := http.NewRequest("POST", urls, body) 8646 if err != nil { 8647 return nil, err 8648 } 8649 req.Header = reqHeaders 8650 googleapi.Expand(req.URL, map[string]string{ 8651 "parent": c.parent, 8652 }) 8653 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8654 } 8655 8656 // Do executes the "contentwarehouse.projects.locations.documents.documentLinks.create" call. 8657 // Any non-2xx status code is an error. Response headers are in either 8658 // *GoogleCloudContentwarehouseV1DocumentLink.ServerResponse.Header or (if a 8659 // response was returned at all) in error.(*googleapi.Error).Header. Use 8660 // googleapi.IsNotModified to check whether the returned error was because 8661 // http.StatusNotModified was returned. 8662 func (c *ProjectsLocationsDocumentsDocumentLinksCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1DocumentLink, error) { 8663 gensupport.SetOptions(c.urlParams_, opts...) 8664 res, err := c.doRequest("json") 8665 if res != nil && res.StatusCode == http.StatusNotModified { 8666 if res.Body != nil { 8667 res.Body.Close() 8668 } 8669 return nil, gensupport.WrapError(&googleapi.Error{ 8670 Code: res.StatusCode, 8671 Header: res.Header, 8672 }) 8673 } 8674 if err != nil { 8675 return nil, err 8676 } 8677 defer googleapi.CloseBody(res) 8678 if err := googleapi.CheckResponse(res); err != nil { 8679 return nil, gensupport.WrapError(err) 8680 } 8681 ret := &GoogleCloudContentwarehouseV1DocumentLink{ 8682 ServerResponse: googleapi.ServerResponse{ 8683 Header: res.Header, 8684 HTTPStatusCode: res.StatusCode, 8685 }, 8686 } 8687 target := &ret 8688 if err := gensupport.DecodeResponse(target, res); err != nil { 8689 return nil, err 8690 } 8691 return ret, nil 8692 } 8693 8694 type ProjectsLocationsDocumentsDocumentLinksDeleteCall struct { 8695 s *Service 8696 name string 8697 googlecloudcontentwarehousev1deletedocumentlinkrequest *GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest 8698 urlParams_ gensupport.URLParams 8699 ctx_ context.Context 8700 header_ http.Header 8701 } 8702 8703 // Delete: Remove the link between the source and target documents. 8704 // 8705 // - name: The name of the document-link to be deleted. Format: 8706 // projects/{project_number}/locations/{location}/documents/{source_document_i 8707 // d}/documentLinks/{document_link_id}. 8708 func (r *ProjectsLocationsDocumentsDocumentLinksService) Delete(name string, googlecloudcontentwarehousev1deletedocumentlinkrequest *GoogleCloudContentwarehouseV1DeleteDocumentLinkRequest) *ProjectsLocationsDocumentsDocumentLinksDeleteCall { 8709 c := &ProjectsLocationsDocumentsDocumentLinksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8710 c.name = name 8711 c.googlecloudcontentwarehousev1deletedocumentlinkrequest = googlecloudcontentwarehousev1deletedocumentlinkrequest 8712 return c 8713 } 8714 8715 // Fields allows partial responses to be retrieved. See 8716 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8717 // details. 8718 func (c *ProjectsLocationsDocumentsDocumentLinksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsDocumentLinksDeleteCall { 8719 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8720 return c 8721 } 8722 8723 // Context sets the context to be used in this call's Do method. 8724 func (c *ProjectsLocationsDocumentsDocumentLinksDeleteCall) Context(ctx context.Context) *ProjectsLocationsDocumentsDocumentLinksDeleteCall { 8725 c.ctx_ = ctx 8726 return c 8727 } 8728 8729 // Header returns a http.Header that can be modified by the caller to add 8730 // headers to the request. 8731 func (c *ProjectsLocationsDocumentsDocumentLinksDeleteCall) Header() http.Header { 8732 if c.header_ == nil { 8733 c.header_ = make(http.Header) 8734 } 8735 return c.header_ 8736 } 8737 8738 func (c *ProjectsLocationsDocumentsDocumentLinksDeleteCall) doRequest(alt string) (*http.Response, error) { 8739 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8740 var body io.Reader = nil 8741 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1deletedocumentlinkrequest) 8742 if err != nil { 8743 return nil, err 8744 } 8745 c.urlParams_.Set("alt", alt) 8746 c.urlParams_.Set("prettyPrint", "false") 8747 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:delete") 8748 urls += "?" + c.urlParams_.Encode() 8749 req, err := http.NewRequest("POST", urls, body) 8750 if err != nil { 8751 return nil, err 8752 } 8753 req.Header = reqHeaders 8754 googleapi.Expand(req.URL, map[string]string{ 8755 "name": c.name, 8756 }) 8757 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8758 } 8759 8760 // Do executes the "contentwarehouse.projects.locations.documents.documentLinks.delete" call. 8761 // Any non-2xx status code is an error. Response headers are in either 8762 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 8763 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8764 // check whether the returned error was because http.StatusNotModified was 8765 // returned. 8766 func (c *ProjectsLocationsDocumentsDocumentLinksDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8767 gensupport.SetOptions(c.urlParams_, opts...) 8768 res, err := c.doRequest("json") 8769 if res != nil && res.StatusCode == http.StatusNotModified { 8770 if res.Body != nil { 8771 res.Body.Close() 8772 } 8773 return nil, gensupport.WrapError(&googleapi.Error{ 8774 Code: res.StatusCode, 8775 Header: res.Header, 8776 }) 8777 } 8778 if err != nil { 8779 return nil, err 8780 } 8781 defer googleapi.CloseBody(res) 8782 if err := googleapi.CheckResponse(res); err != nil { 8783 return nil, gensupport.WrapError(err) 8784 } 8785 ret := &GoogleProtobufEmpty{ 8786 ServerResponse: googleapi.ServerResponse{ 8787 Header: res.Header, 8788 HTTPStatusCode: res.StatusCode, 8789 }, 8790 } 8791 target := &ret 8792 if err := gensupport.DecodeResponse(target, res); err != nil { 8793 return nil, err 8794 } 8795 return ret, nil 8796 } 8797 8798 type ProjectsLocationsDocumentsReferenceIdDeleteCall struct { 8799 s *Service 8800 name string 8801 googlecloudcontentwarehousev1deletedocumentrequest *GoogleCloudContentwarehouseV1DeleteDocumentRequest 8802 urlParams_ gensupport.URLParams 8803 ctx_ context.Context 8804 header_ http.Header 8805 } 8806 8807 // Delete: Deletes a document. Returns NOT_FOUND if the document does not 8808 // exist. 8809 // 8810 // - name: The name of the document to delete. Format: 8811 // projects/{project_number}/locations/{location}/documents/{document_id} or 8812 // projects/{project_number}/locations/{location}/documents/referenceId/{refer 8813 // ence_id}. 8814 func (r *ProjectsLocationsDocumentsReferenceIdService) Delete(name string, googlecloudcontentwarehousev1deletedocumentrequest *GoogleCloudContentwarehouseV1DeleteDocumentRequest) *ProjectsLocationsDocumentsReferenceIdDeleteCall { 8815 c := &ProjectsLocationsDocumentsReferenceIdDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8816 c.name = name 8817 c.googlecloudcontentwarehousev1deletedocumentrequest = googlecloudcontentwarehousev1deletedocumentrequest 8818 return c 8819 } 8820 8821 // Fields allows partial responses to be retrieved. See 8822 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8823 // details. 8824 func (c *ProjectsLocationsDocumentsReferenceIdDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsReferenceIdDeleteCall { 8825 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8826 return c 8827 } 8828 8829 // Context sets the context to be used in this call's Do method. 8830 func (c *ProjectsLocationsDocumentsReferenceIdDeleteCall) Context(ctx context.Context) *ProjectsLocationsDocumentsReferenceIdDeleteCall { 8831 c.ctx_ = ctx 8832 return c 8833 } 8834 8835 // Header returns a http.Header that can be modified by the caller to add 8836 // headers to the request. 8837 func (c *ProjectsLocationsDocumentsReferenceIdDeleteCall) Header() http.Header { 8838 if c.header_ == nil { 8839 c.header_ = make(http.Header) 8840 } 8841 return c.header_ 8842 } 8843 8844 func (c *ProjectsLocationsDocumentsReferenceIdDeleteCall) doRequest(alt string) (*http.Response, error) { 8845 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8846 var body io.Reader = nil 8847 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1deletedocumentrequest) 8848 if err != nil { 8849 return nil, err 8850 } 8851 c.urlParams_.Set("alt", alt) 8852 c.urlParams_.Set("prettyPrint", "false") 8853 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:delete") 8854 urls += "?" + c.urlParams_.Encode() 8855 req, err := http.NewRequest("POST", urls, body) 8856 if err != nil { 8857 return nil, err 8858 } 8859 req.Header = reqHeaders 8860 googleapi.Expand(req.URL, map[string]string{ 8861 "name": c.name, 8862 }) 8863 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8864 } 8865 8866 // Do executes the "contentwarehouse.projects.locations.documents.referenceId.delete" call. 8867 // Any non-2xx status code is an error. Response headers are in either 8868 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 8869 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 8870 // check whether the returned error was because http.StatusNotModified was 8871 // returned. 8872 func (c *ProjectsLocationsDocumentsReferenceIdDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 8873 gensupport.SetOptions(c.urlParams_, opts...) 8874 res, err := c.doRequest("json") 8875 if res != nil && res.StatusCode == http.StatusNotModified { 8876 if res.Body != nil { 8877 res.Body.Close() 8878 } 8879 return nil, gensupport.WrapError(&googleapi.Error{ 8880 Code: res.StatusCode, 8881 Header: res.Header, 8882 }) 8883 } 8884 if err != nil { 8885 return nil, err 8886 } 8887 defer googleapi.CloseBody(res) 8888 if err := googleapi.CheckResponse(res); err != nil { 8889 return nil, gensupport.WrapError(err) 8890 } 8891 ret := &GoogleProtobufEmpty{ 8892 ServerResponse: googleapi.ServerResponse{ 8893 Header: res.Header, 8894 HTTPStatusCode: res.StatusCode, 8895 }, 8896 } 8897 target := &ret 8898 if err := gensupport.DecodeResponse(target, res); err != nil { 8899 return nil, err 8900 } 8901 return ret, nil 8902 } 8903 8904 type ProjectsLocationsDocumentsReferenceIdGetCall struct { 8905 s *Service 8906 name string 8907 googlecloudcontentwarehousev1getdocumentrequest *GoogleCloudContentwarehouseV1GetDocumentRequest 8908 urlParams_ gensupport.URLParams 8909 ctx_ context.Context 8910 header_ http.Header 8911 } 8912 8913 // Get: Gets a document. Returns NOT_FOUND if the document does not exist. 8914 // 8915 // - name: The name of the document to retrieve. Format: 8916 // projects/{project_number}/locations/{location}/documents/{document_id} or 8917 // projects/{project_number}/locations/{location}/documents/referenceId/{refer 8918 // ence_id}. 8919 func (r *ProjectsLocationsDocumentsReferenceIdService) Get(name string, googlecloudcontentwarehousev1getdocumentrequest *GoogleCloudContentwarehouseV1GetDocumentRequest) *ProjectsLocationsDocumentsReferenceIdGetCall { 8920 c := &ProjectsLocationsDocumentsReferenceIdGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 8921 c.name = name 8922 c.googlecloudcontentwarehousev1getdocumentrequest = googlecloudcontentwarehousev1getdocumentrequest 8923 return c 8924 } 8925 8926 // Fields allows partial responses to be retrieved. See 8927 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 8928 // details. 8929 func (c *ProjectsLocationsDocumentsReferenceIdGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsReferenceIdGetCall { 8930 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 8931 return c 8932 } 8933 8934 // Context sets the context to be used in this call's Do method. 8935 func (c *ProjectsLocationsDocumentsReferenceIdGetCall) Context(ctx context.Context) *ProjectsLocationsDocumentsReferenceIdGetCall { 8936 c.ctx_ = ctx 8937 return c 8938 } 8939 8940 // Header returns a http.Header that can be modified by the caller to add 8941 // headers to the request. 8942 func (c *ProjectsLocationsDocumentsReferenceIdGetCall) Header() http.Header { 8943 if c.header_ == nil { 8944 c.header_ = make(http.Header) 8945 } 8946 return c.header_ 8947 } 8948 8949 func (c *ProjectsLocationsDocumentsReferenceIdGetCall) doRequest(alt string) (*http.Response, error) { 8950 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 8951 var body io.Reader = nil 8952 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1getdocumentrequest) 8953 if err != nil { 8954 return nil, err 8955 } 8956 c.urlParams_.Set("alt", alt) 8957 c.urlParams_.Set("prettyPrint", "false") 8958 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:get") 8959 urls += "?" + c.urlParams_.Encode() 8960 req, err := http.NewRequest("POST", urls, body) 8961 if err != nil { 8962 return nil, err 8963 } 8964 req.Header = reqHeaders 8965 googleapi.Expand(req.URL, map[string]string{ 8966 "name": c.name, 8967 }) 8968 return gensupport.SendRequest(c.ctx_, c.s.client, req) 8969 } 8970 8971 // Do executes the "contentwarehouse.projects.locations.documents.referenceId.get" call. 8972 // Any non-2xx status code is an error. Response headers are in either 8973 // *GoogleCloudContentwarehouseV1Document.ServerResponse.Header or (if a 8974 // response was returned at all) in error.(*googleapi.Error).Header. Use 8975 // googleapi.IsNotModified to check whether the returned error was because 8976 // http.StatusNotModified was returned. 8977 func (c *ProjectsLocationsDocumentsReferenceIdGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1Document, error) { 8978 gensupport.SetOptions(c.urlParams_, opts...) 8979 res, err := c.doRequest("json") 8980 if res != nil && res.StatusCode == http.StatusNotModified { 8981 if res.Body != nil { 8982 res.Body.Close() 8983 } 8984 return nil, gensupport.WrapError(&googleapi.Error{ 8985 Code: res.StatusCode, 8986 Header: res.Header, 8987 }) 8988 } 8989 if err != nil { 8990 return nil, err 8991 } 8992 defer googleapi.CloseBody(res) 8993 if err := googleapi.CheckResponse(res); err != nil { 8994 return nil, gensupport.WrapError(err) 8995 } 8996 ret := &GoogleCloudContentwarehouseV1Document{ 8997 ServerResponse: googleapi.ServerResponse{ 8998 Header: res.Header, 8999 HTTPStatusCode: res.StatusCode, 9000 }, 9001 } 9002 target := &ret 9003 if err := gensupport.DecodeResponse(target, res); err != nil { 9004 return nil, err 9005 } 9006 return ret, nil 9007 } 9008 9009 type ProjectsLocationsDocumentsReferenceIdPatchCall struct { 9010 s *Service 9011 name string 9012 googlecloudcontentwarehousev1updatedocumentrequest *GoogleCloudContentwarehouseV1UpdateDocumentRequest 9013 urlParams_ gensupport.URLParams 9014 ctx_ context.Context 9015 header_ http.Header 9016 } 9017 9018 // Patch: Updates a document. Returns INVALID_ARGUMENT if the name of the 9019 // document is non-empty and does not equal the existing name. 9020 // 9021 // - name: The name of the document to update. Format: 9022 // projects/{project_number}/locations/{location}/documents/{document_id} or 9023 // projects/{project_number}/locations/{location}/documents/referenceId/{refer 9024 // ence_id}. 9025 func (r *ProjectsLocationsDocumentsReferenceIdService) Patch(name string, googlecloudcontentwarehousev1updatedocumentrequest *GoogleCloudContentwarehouseV1UpdateDocumentRequest) *ProjectsLocationsDocumentsReferenceIdPatchCall { 9026 c := &ProjectsLocationsDocumentsReferenceIdPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9027 c.name = name 9028 c.googlecloudcontentwarehousev1updatedocumentrequest = googlecloudcontentwarehousev1updatedocumentrequest 9029 return c 9030 } 9031 9032 // Fields allows partial responses to be retrieved. See 9033 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9034 // details. 9035 func (c *ProjectsLocationsDocumentsReferenceIdPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDocumentsReferenceIdPatchCall { 9036 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9037 return c 9038 } 9039 9040 // Context sets the context to be used in this call's Do method. 9041 func (c *ProjectsLocationsDocumentsReferenceIdPatchCall) Context(ctx context.Context) *ProjectsLocationsDocumentsReferenceIdPatchCall { 9042 c.ctx_ = ctx 9043 return c 9044 } 9045 9046 // Header returns a http.Header that can be modified by the caller to add 9047 // headers to the request. 9048 func (c *ProjectsLocationsDocumentsReferenceIdPatchCall) Header() http.Header { 9049 if c.header_ == nil { 9050 c.header_ = make(http.Header) 9051 } 9052 return c.header_ 9053 } 9054 9055 func (c *ProjectsLocationsDocumentsReferenceIdPatchCall) doRequest(alt string) (*http.Response, error) { 9056 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9057 var body io.Reader = nil 9058 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1updatedocumentrequest) 9059 if err != nil { 9060 return nil, err 9061 } 9062 c.urlParams_.Set("alt", alt) 9063 c.urlParams_.Set("prettyPrint", "false") 9064 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9065 urls += "?" + c.urlParams_.Encode() 9066 req, err := http.NewRequest("PATCH", urls, body) 9067 if err != nil { 9068 return nil, err 9069 } 9070 req.Header = reqHeaders 9071 googleapi.Expand(req.URL, map[string]string{ 9072 "name": c.name, 9073 }) 9074 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9075 } 9076 9077 // Do executes the "contentwarehouse.projects.locations.documents.referenceId.patch" call. 9078 // Any non-2xx status code is an error. Response headers are in either 9079 // *GoogleCloudContentwarehouseV1UpdateDocumentResponse.ServerResponse.Header 9080 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 9081 // Use googleapi.IsNotModified to check whether the returned error was because 9082 // http.StatusNotModified was returned. 9083 func (c *ProjectsLocationsDocumentsReferenceIdPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1UpdateDocumentResponse, error) { 9084 gensupport.SetOptions(c.urlParams_, opts...) 9085 res, err := c.doRequest("json") 9086 if res != nil && res.StatusCode == http.StatusNotModified { 9087 if res.Body != nil { 9088 res.Body.Close() 9089 } 9090 return nil, gensupport.WrapError(&googleapi.Error{ 9091 Code: res.StatusCode, 9092 Header: res.Header, 9093 }) 9094 } 9095 if err != nil { 9096 return nil, err 9097 } 9098 defer googleapi.CloseBody(res) 9099 if err := googleapi.CheckResponse(res); err != nil { 9100 return nil, gensupport.WrapError(err) 9101 } 9102 ret := &GoogleCloudContentwarehouseV1UpdateDocumentResponse{ 9103 ServerResponse: googleapi.ServerResponse{ 9104 Header: res.Header, 9105 HTTPStatusCode: res.StatusCode, 9106 }, 9107 } 9108 target := &ret 9109 if err := gensupport.DecodeResponse(target, res); err != nil { 9110 return nil, err 9111 } 9112 return ret, nil 9113 } 9114 9115 type ProjectsLocationsOperationsGetCall struct { 9116 s *Service 9117 name string 9118 urlParams_ gensupport.URLParams 9119 ifNoneMatch_ string 9120 ctx_ context.Context 9121 header_ http.Header 9122 } 9123 9124 // Get: Gets the latest state of a long-running operation. Clients can use this 9125 // method to poll the operation result at intervals as recommended by the API 9126 // service. 9127 // 9128 // - name: The name of the operation resource. 9129 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 9130 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9131 c.name = name 9132 return c 9133 } 9134 9135 // Fields allows partial responses to be retrieved. See 9136 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9137 // details. 9138 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 9139 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9140 return c 9141 } 9142 9143 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9144 // object's ETag matches the given value. This is useful for getting updates 9145 // only after the object has changed since the last request. 9146 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 9147 c.ifNoneMatch_ = entityTag 9148 return c 9149 } 9150 9151 // Context sets the context to be used in this call's Do method. 9152 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 9153 c.ctx_ = ctx 9154 return c 9155 } 9156 9157 // Header returns a http.Header that can be modified by the caller to add 9158 // headers to the request. 9159 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 9160 if c.header_ == nil { 9161 c.header_ = make(http.Header) 9162 } 9163 return c.header_ 9164 } 9165 9166 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 9167 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9168 if c.ifNoneMatch_ != "" { 9169 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9170 } 9171 var body io.Reader = nil 9172 c.urlParams_.Set("alt", alt) 9173 c.urlParams_.Set("prettyPrint", "false") 9174 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9175 urls += "?" + c.urlParams_.Encode() 9176 req, err := http.NewRequest("GET", urls, body) 9177 if err != nil { 9178 return nil, err 9179 } 9180 req.Header = reqHeaders 9181 googleapi.Expand(req.URL, map[string]string{ 9182 "name": c.name, 9183 }) 9184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9185 } 9186 9187 // Do executes the "contentwarehouse.projects.locations.operations.get" call. 9188 // Any non-2xx status code is an error. Response headers are in either 9189 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was 9190 // returned at all) in error.(*googleapi.Error).Header. Use 9191 // googleapi.IsNotModified to check whether the returned error was because 9192 // http.StatusNotModified was returned. 9193 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 9194 gensupport.SetOptions(c.urlParams_, opts...) 9195 res, err := c.doRequest("json") 9196 if res != nil && res.StatusCode == http.StatusNotModified { 9197 if res.Body != nil { 9198 res.Body.Close() 9199 } 9200 return nil, gensupport.WrapError(&googleapi.Error{ 9201 Code: res.StatusCode, 9202 Header: res.Header, 9203 }) 9204 } 9205 if err != nil { 9206 return nil, err 9207 } 9208 defer googleapi.CloseBody(res) 9209 if err := googleapi.CheckResponse(res); err != nil { 9210 return nil, gensupport.WrapError(err) 9211 } 9212 ret := &GoogleLongrunningOperation{ 9213 ServerResponse: googleapi.ServerResponse{ 9214 Header: res.Header, 9215 HTTPStatusCode: res.StatusCode, 9216 }, 9217 } 9218 target := &ret 9219 if err := gensupport.DecodeResponse(target, res); err != nil { 9220 return nil, err 9221 } 9222 return ret, nil 9223 } 9224 9225 type ProjectsLocationsRuleSetsCreateCall struct { 9226 s *Service 9227 parent string 9228 googlecloudcontentwarehousev1ruleset *GoogleCloudContentwarehouseV1RuleSet 9229 urlParams_ gensupport.URLParams 9230 ctx_ context.Context 9231 header_ http.Header 9232 } 9233 9234 // Create: Creates a ruleset. 9235 // 9236 // - parent: The parent name. Format: 9237 // projects/{project_number}/locations/{location}. 9238 func (r *ProjectsLocationsRuleSetsService) Create(parent string, googlecloudcontentwarehousev1ruleset *GoogleCloudContentwarehouseV1RuleSet) *ProjectsLocationsRuleSetsCreateCall { 9239 c := &ProjectsLocationsRuleSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9240 c.parent = parent 9241 c.googlecloudcontentwarehousev1ruleset = googlecloudcontentwarehousev1ruleset 9242 return c 9243 } 9244 9245 // Fields allows partial responses to be retrieved. See 9246 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9247 // details. 9248 func (c *ProjectsLocationsRuleSetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuleSetsCreateCall { 9249 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9250 return c 9251 } 9252 9253 // Context sets the context to be used in this call's Do method. 9254 func (c *ProjectsLocationsRuleSetsCreateCall) Context(ctx context.Context) *ProjectsLocationsRuleSetsCreateCall { 9255 c.ctx_ = ctx 9256 return c 9257 } 9258 9259 // Header returns a http.Header that can be modified by the caller to add 9260 // headers to the request. 9261 func (c *ProjectsLocationsRuleSetsCreateCall) Header() http.Header { 9262 if c.header_ == nil { 9263 c.header_ = make(http.Header) 9264 } 9265 return c.header_ 9266 } 9267 9268 func (c *ProjectsLocationsRuleSetsCreateCall) doRequest(alt string) (*http.Response, error) { 9269 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9270 var body io.Reader = nil 9271 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1ruleset) 9272 if err != nil { 9273 return nil, err 9274 } 9275 c.urlParams_.Set("alt", alt) 9276 c.urlParams_.Set("prettyPrint", "false") 9277 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ruleSets") 9278 urls += "?" + c.urlParams_.Encode() 9279 req, err := http.NewRequest("POST", urls, body) 9280 if err != nil { 9281 return nil, err 9282 } 9283 req.Header = reqHeaders 9284 googleapi.Expand(req.URL, map[string]string{ 9285 "parent": c.parent, 9286 }) 9287 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9288 } 9289 9290 // Do executes the "contentwarehouse.projects.locations.ruleSets.create" call. 9291 // Any non-2xx status code is an error. Response headers are in either 9292 // *GoogleCloudContentwarehouseV1RuleSet.ServerResponse.Header or (if a 9293 // response was returned at all) in error.(*googleapi.Error).Header. Use 9294 // googleapi.IsNotModified to check whether the returned error was because 9295 // http.StatusNotModified was returned. 9296 func (c *ProjectsLocationsRuleSetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1RuleSet, error) { 9297 gensupport.SetOptions(c.urlParams_, opts...) 9298 res, err := c.doRequest("json") 9299 if res != nil && res.StatusCode == http.StatusNotModified { 9300 if res.Body != nil { 9301 res.Body.Close() 9302 } 9303 return nil, gensupport.WrapError(&googleapi.Error{ 9304 Code: res.StatusCode, 9305 Header: res.Header, 9306 }) 9307 } 9308 if err != nil { 9309 return nil, err 9310 } 9311 defer googleapi.CloseBody(res) 9312 if err := googleapi.CheckResponse(res); err != nil { 9313 return nil, gensupport.WrapError(err) 9314 } 9315 ret := &GoogleCloudContentwarehouseV1RuleSet{ 9316 ServerResponse: googleapi.ServerResponse{ 9317 Header: res.Header, 9318 HTTPStatusCode: res.StatusCode, 9319 }, 9320 } 9321 target := &ret 9322 if err := gensupport.DecodeResponse(target, res); err != nil { 9323 return nil, err 9324 } 9325 return ret, nil 9326 } 9327 9328 type ProjectsLocationsRuleSetsDeleteCall struct { 9329 s *Service 9330 name string 9331 urlParams_ gensupport.URLParams 9332 ctx_ context.Context 9333 header_ http.Header 9334 } 9335 9336 // Delete: Deletes a ruleset. Returns NOT_FOUND if the document does not exist. 9337 // 9338 // - name: The name of the rule set to delete. Format: 9339 // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. 9340 func (r *ProjectsLocationsRuleSetsService) Delete(name string) *ProjectsLocationsRuleSetsDeleteCall { 9341 c := &ProjectsLocationsRuleSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9342 c.name = name 9343 return c 9344 } 9345 9346 // Fields allows partial responses to be retrieved. See 9347 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9348 // details. 9349 func (c *ProjectsLocationsRuleSetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuleSetsDeleteCall { 9350 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9351 return c 9352 } 9353 9354 // Context sets the context to be used in this call's Do method. 9355 func (c *ProjectsLocationsRuleSetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRuleSetsDeleteCall { 9356 c.ctx_ = ctx 9357 return c 9358 } 9359 9360 // Header returns a http.Header that can be modified by the caller to add 9361 // headers to the request. 9362 func (c *ProjectsLocationsRuleSetsDeleteCall) Header() http.Header { 9363 if c.header_ == nil { 9364 c.header_ = make(http.Header) 9365 } 9366 return c.header_ 9367 } 9368 9369 func (c *ProjectsLocationsRuleSetsDeleteCall) doRequest(alt string) (*http.Response, error) { 9370 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9371 var body io.Reader = nil 9372 c.urlParams_.Set("alt", alt) 9373 c.urlParams_.Set("prettyPrint", "false") 9374 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9375 urls += "?" + c.urlParams_.Encode() 9376 req, err := http.NewRequest("DELETE", urls, body) 9377 if err != nil { 9378 return nil, err 9379 } 9380 req.Header = reqHeaders 9381 googleapi.Expand(req.URL, map[string]string{ 9382 "name": c.name, 9383 }) 9384 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9385 } 9386 9387 // Do executes the "contentwarehouse.projects.locations.ruleSets.delete" call. 9388 // Any non-2xx status code is an error. Response headers are in either 9389 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 9390 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9391 // check whether the returned error was because http.StatusNotModified was 9392 // returned. 9393 func (c *ProjectsLocationsRuleSetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9394 gensupport.SetOptions(c.urlParams_, opts...) 9395 res, err := c.doRequest("json") 9396 if res != nil && res.StatusCode == http.StatusNotModified { 9397 if res.Body != nil { 9398 res.Body.Close() 9399 } 9400 return nil, gensupport.WrapError(&googleapi.Error{ 9401 Code: res.StatusCode, 9402 Header: res.Header, 9403 }) 9404 } 9405 if err != nil { 9406 return nil, err 9407 } 9408 defer googleapi.CloseBody(res) 9409 if err := googleapi.CheckResponse(res); err != nil { 9410 return nil, gensupport.WrapError(err) 9411 } 9412 ret := &GoogleProtobufEmpty{ 9413 ServerResponse: googleapi.ServerResponse{ 9414 Header: res.Header, 9415 HTTPStatusCode: res.StatusCode, 9416 }, 9417 } 9418 target := &ret 9419 if err := gensupport.DecodeResponse(target, res); err != nil { 9420 return nil, err 9421 } 9422 return ret, nil 9423 } 9424 9425 type ProjectsLocationsRuleSetsGetCall struct { 9426 s *Service 9427 name string 9428 urlParams_ gensupport.URLParams 9429 ifNoneMatch_ string 9430 ctx_ context.Context 9431 header_ http.Header 9432 } 9433 9434 // Get: Gets a ruleset. Returns NOT_FOUND if the ruleset does not exist. 9435 // 9436 // - name: The name of the rule set to retrieve. Format: 9437 // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. 9438 func (r *ProjectsLocationsRuleSetsService) Get(name string) *ProjectsLocationsRuleSetsGetCall { 9439 c := &ProjectsLocationsRuleSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9440 c.name = name 9441 return c 9442 } 9443 9444 // Fields allows partial responses to be retrieved. See 9445 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9446 // details. 9447 func (c *ProjectsLocationsRuleSetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuleSetsGetCall { 9448 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9449 return c 9450 } 9451 9452 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9453 // object's ETag matches the given value. This is useful for getting updates 9454 // only after the object has changed since the last request. 9455 func (c *ProjectsLocationsRuleSetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuleSetsGetCall { 9456 c.ifNoneMatch_ = entityTag 9457 return c 9458 } 9459 9460 // Context sets the context to be used in this call's Do method. 9461 func (c *ProjectsLocationsRuleSetsGetCall) Context(ctx context.Context) *ProjectsLocationsRuleSetsGetCall { 9462 c.ctx_ = ctx 9463 return c 9464 } 9465 9466 // Header returns a http.Header that can be modified by the caller to add 9467 // headers to the request. 9468 func (c *ProjectsLocationsRuleSetsGetCall) Header() http.Header { 9469 if c.header_ == nil { 9470 c.header_ = make(http.Header) 9471 } 9472 return c.header_ 9473 } 9474 9475 func (c *ProjectsLocationsRuleSetsGetCall) doRequest(alt string) (*http.Response, error) { 9476 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9477 if c.ifNoneMatch_ != "" { 9478 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9479 } 9480 var body io.Reader = nil 9481 c.urlParams_.Set("alt", alt) 9482 c.urlParams_.Set("prettyPrint", "false") 9483 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9484 urls += "?" + c.urlParams_.Encode() 9485 req, err := http.NewRequest("GET", urls, body) 9486 if err != nil { 9487 return nil, err 9488 } 9489 req.Header = reqHeaders 9490 googleapi.Expand(req.URL, map[string]string{ 9491 "name": c.name, 9492 }) 9493 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9494 } 9495 9496 // Do executes the "contentwarehouse.projects.locations.ruleSets.get" call. 9497 // Any non-2xx status code is an error. Response headers are in either 9498 // *GoogleCloudContentwarehouseV1RuleSet.ServerResponse.Header or (if a 9499 // response was returned at all) in error.(*googleapi.Error).Header. Use 9500 // googleapi.IsNotModified to check whether the returned error was because 9501 // http.StatusNotModified was returned. 9502 func (c *ProjectsLocationsRuleSetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1RuleSet, error) { 9503 gensupport.SetOptions(c.urlParams_, opts...) 9504 res, err := c.doRequest("json") 9505 if res != nil && res.StatusCode == http.StatusNotModified { 9506 if res.Body != nil { 9507 res.Body.Close() 9508 } 9509 return nil, gensupport.WrapError(&googleapi.Error{ 9510 Code: res.StatusCode, 9511 Header: res.Header, 9512 }) 9513 } 9514 if err != nil { 9515 return nil, err 9516 } 9517 defer googleapi.CloseBody(res) 9518 if err := googleapi.CheckResponse(res); err != nil { 9519 return nil, gensupport.WrapError(err) 9520 } 9521 ret := &GoogleCloudContentwarehouseV1RuleSet{ 9522 ServerResponse: googleapi.ServerResponse{ 9523 Header: res.Header, 9524 HTTPStatusCode: res.StatusCode, 9525 }, 9526 } 9527 target := &ret 9528 if err := gensupport.DecodeResponse(target, res); err != nil { 9529 return nil, err 9530 } 9531 return ret, nil 9532 } 9533 9534 type ProjectsLocationsRuleSetsListCall struct { 9535 s *Service 9536 parent string 9537 urlParams_ gensupport.URLParams 9538 ifNoneMatch_ string 9539 ctx_ context.Context 9540 header_ http.Header 9541 } 9542 9543 // List: Lists rulesets. 9544 // 9545 // - parent: The parent, which owns this collection of document. Format: 9546 // projects/{project_number}/locations/{location}. 9547 func (r *ProjectsLocationsRuleSetsService) List(parent string) *ProjectsLocationsRuleSetsListCall { 9548 c := &ProjectsLocationsRuleSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9549 c.parent = parent 9550 return c 9551 } 9552 9553 // PageSize sets the optional parameter "pageSize": The maximum number of rule 9554 // sets to return. The service may return fewer than this value. If 9555 // unspecified, at most 50 rule sets will be returned. The maximum value is 9556 // 1000; values above 1000 will be coerced to 1000. 9557 func (c *ProjectsLocationsRuleSetsListCall) PageSize(pageSize int64) *ProjectsLocationsRuleSetsListCall { 9558 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 9559 return c 9560 } 9561 9562 // PageToken sets the optional parameter "pageToken": A page token, received 9563 // from a previous `ListRuleSets` call. Provide this to retrieve the subsequent 9564 // page. When paginating, all other parameters provided to `ListRuleSets` must 9565 // match the call that provided the page token. 9566 func (c *ProjectsLocationsRuleSetsListCall) PageToken(pageToken string) *ProjectsLocationsRuleSetsListCall { 9567 c.urlParams_.Set("pageToken", pageToken) 9568 return c 9569 } 9570 9571 // Fields allows partial responses to be retrieved. See 9572 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9573 // details. 9574 func (c *ProjectsLocationsRuleSetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuleSetsListCall { 9575 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9576 return c 9577 } 9578 9579 // IfNoneMatch sets an optional parameter which makes the operation fail if the 9580 // object's ETag matches the given value. This is useful for getting updates 9581 // only after the object has changed since the last request. 9582 func (c *ProjectsLocationsRuleSetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRuleSetsListCall { 9583 c.ifNoneMatch_ = entityTag 9584 return c 9585 } 9586 9587 // Context sets the context to be used in this call's Do method. 9588 func (c *ProjectsLocationsRuleSetsListCall) Context(ctx context.Context) *ProjectsLocationsRuleSetsListCall { 9589 c.ctx_ = ctx 9590 return c 9591 } 9592 9593 // Header returns a http.Header that can be modified by the caller to add 9594 // headers to the request. 9595 func (c *ProjectsLocationsRuleSetsListCall) Header() http.Header { 9596 if c.header_ == nil { 9597 c.header_ = make(http.Header) 9598 } 9599 return c.header_ 9600 } 9601 9602 func (c *ProjectsLocationsRuleSetsListCall) doRequest(alt string) (*http.Response, error) { 9603 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9604 if c.ifNoneMatch_ != "" { 9605 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9606 } 9607 var body io.Reader = nil 9608 c.urlParams_.Set("alt", alt) 9609 c.urlParams_.Set("prettyPrint", "false") 9610 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ruleSets") 9611 urls += "?" + c.urlParams_.Encode() 9612 req, err := http.NewRequest("GET", urls, body) 9613 if err != nil { 9614 return nil, err 9615 } 9616 req.Header = reqHeaders 9617 googleapi.Expand(req.URL, map[string]string{ 9618 "parent": c.parent, 9619 }) 9620 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9621 } 9622 9623 // Do executes the "contentwarehouse.projects.locations.ruleSets.list" call. 9624 // Any non-2xx status code is an error. Response headers are in either 9625 // *GoogleCloudContentwarehouseV1ListRuleSetsResponse.ServerResponse.Header or 9626 // (if a response was returned at all) in error.(*googleapi.Error).Header. Use 9627 // googleapi.IsNotModified to check whether the returned error was because 9628 // http.StatusNotModified was returned. 9629 func (c *ProjectsLocationsRuleSetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1ListRuleSetsResponse, error) { 9630 gensupport.SetOptions(c.urlParams_, opts...) 9631 res, err := c.doRequest("json") 9632 if res != nil && res.StatusCode == http.StatusNotModified { 9633 if res.Body != nil { 9634 res.Body.Close() 9635 } 9636 return nil, gensupport.WrapError(&googleapi.Error{ 9637 Code: res.StatusCode, 9638 Header: res.Header, 9639 }) 9640 } 9641 if err != nil { 9642 return nil, err 9643 } 9644 defer googleapi.CloseBody(res) 9645 if err := googleapi.CheckResponse(res); err != nil { 9646 return nil, gensupport.WrapError(err) 9647 } 9648 ret := &GoogleCloudContentwarehouseV1ListRuleSetsResponse{ 9649 ServerResponse: googleapi.ServerResponse{ 9650 Header: res.Header, 9651 HTTPStatusCode: res.StatusCode, 9652 }, 9653 } 9654 target := &ret 9655 if err := gensupport.DecodeResponse(target, res); err != nil { 9656 return nil, err 9657 } 9658 return ret, nil 9659 } 9660 9661 // Pages invokes f for each page of results. 9662 // A non-nil error returned from f will halt the iteration. 9663 // The provided context supersedes any context provided to the Context method. 9664 func (c *ProjectsLocationsRuleSetsListCall) Pages(ctx context.Context, f func(*GoogleCloudContentwarehouseV1ListRuleSetsResponse) error) error { 9665 c.ctx_ = ctx 9666 defer c.PageToken(c.urlParams_.Get("pageToken")) 9667 for { 9668 x, err := c.Do() 9669 if err != nil { 9670 return err 9671 } 9672 if err := f(x); err != nil { 9673 return err 9674 } 9675 if x.NextPageToken == "" { 9676 return nil 9677 } 9678 c.PageToken(x.NextPageToken) 9679 } 9680 } 9681 9682 type ProjectsLocationsRuleSetsPatchCall struct { 9683 s *Service 9684 name string 9685 googlecloudcontentwarehousev1updaterulesetrequest *GoogleCloudContentwarehouseV1UpdateRuleSetRequest 9686 urlParams_ gensupport.URLParams 9687 ctx_ context.Context 9688 header_ http.Header 9689 } 9690 9691 // Patch: Updates a ruleset. Returns INVALID_ARGUMENT if the name of the 9692 // ruleset is non-empty and does not equal the existing name. 9693 // 9694 // - name: The name of the rule set to update. Format: 9695 // projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}. 9696 func (r *ProjectsLocationsRuleSetsService) Patch(name string, googlecloudcontentwarehousev1updaterulesetrequest *GoogleCloudContentwarehouseV1UpdateRuleSetRequest) *ProjectsLocationsRuleSetsPatchCall { 9697 c := &ProjectsLocationsRuleSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9698 c.name = name 9699 c.googlecloudcontentwarehousev1updaterulesetrequest = googlecloudcontentwarehousev1updaterulesetrequest 9700 return c 9701 } 9702 9703 // Fields allows partial responses to be retrieved. See 9704 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9705 // details. 9706 func (c *ProjectsLocationsRuleSetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRuleSetsPatchCall { 9707 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9708 return c 9709 } 9710 9711 // Context sets the context to be used in this call's Do method. 9712 func (c *ProjectsLocationsRuleSetsPatchCall) Context(ctx context.Context) *ProjectsLocationsRuleSetsPatchCall { 9713 c.ctx_ = ctx 9714 return c 9715 } 9716 9717 // Header returns a http.Header that can be modified by the caller to add 9718 // headers to the request. 9719 func (c *ProjectsLocationsRuleSetsPatchCall) Header() http.Header { 9720 if c.header_ == nil { 9721 c.header_ = make(http.Header) 9722 } 9723 return c.header_ 9724 } 9725 9726 func (c *ProjectsLocationsRuleSetsPatchCall) doRequest(alt string) (*http.Response, error) { 9727 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9728 var body io.Reader = nil 9729 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1updaterulesetrequest) 9730 if err != nil { 9731 return nil, err 9732 } 9733 c.urlParams_.Set("alt", alt) 9734 c.urlParams_.Set("prettyPrint", "false") 9735 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9736 urls += "?" + c.urlParams_.Encode() 9737 req, err := http.NewRequest("PATCH", urls, body) 9738 if err != nil { 9739 return nil, err 9740 } 9741 req.Header = reqHeaders 9742 googleapi.Expand(req.URL, map[string]string{ 9743 "name": c.name, 9744 }) 9745 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9746 } 9747 9748 // Do executes the "contentwarehouse.projects.locations.ruleSets.patch" call. 9749 // Any non-2xx status code is an error. Response headers are in either 9750 // *GoogleCloudContentwarehouseV1RuleSet.ServerResponse.Header or (if a 9751 // response was returned at all) in error.(*googleapi.Error).Header. Use 9752 // googleapi.IsNotModified to check whether the returned error was because 9753 // http.StatusNotModified was returned. 9754 func (c *ProjectsLocationsRuleSetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1RuleSet, error) { 9755 gensupport.SetOptions(c.urlParams_, opts...) 9756 res, err := c.doRequest("json") 9757 if res != nil && res.StatusCode == http.StatusNotModified { 9758 if res.Body != nil { 9759 res.Body.Close() 9760 } 9761 return nil, gensupport.WrapError(&googleapi.Error{ 9762 Code: res.StatusCode, 9763 Header: res.Header, 9764 }) 9765 } 9766 if err != nil { 9767 return nil, err 9768 } 9769 defer googleapi.CloseBody(res) 9770 if err := googleapi.CheckResponse(res); err != nil { 9771 return nil, gensupport.WrapError(err) 9772 } 9773 ret := &GoogleCloudContentwarehouseV1RuleSet{ 9774 ServerResponse: googleapi.ServerResponse{ 9775 Header: res.Header, 9776 HTTPStatusCode: res.StatusCode, 9777 }, 9778 } 9779 target := &ret 9780 if err := gensupport.DecodeResponse(target, res); err != nil { 9781 return nil, err 9782 } 9783 return ret, nil 9784 } 9785 9786 type ProjectsLocationsSynonymSetsCreateCall struct { 9787 s *Service 9788 parent string 9789 googlecloudcontentwarehousev1synonymset *GoogleCloudContentwarehouseV1SynonymSet 9790 urlParams_ gensupport.URLParams 9791 ctx_ context.Context 9792 header_ http.Header 9793 } 9794 9795 // Create: Creates a SynonymSet for a single context. Throws an ALREADY_EXISTS 9796 // exception if a synonymset already exists for the context. 9797 // 9798 // - parent: The parent name. Format: 9799 // projects/{project_number}/locations/{location}. 9800 func (r *ProjectsLocationsSynonymSetsService) Create(parent string, googlecloudcontentwarehousev1synonymset *GoogleCloudContentwarehouseV1SynonymSet) *ProjectsLocationsSynonymSetsCreateCall { 9801 c := &ProjectsLocationsSynonymSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9802 c.parent = parent 9803 c.googlecloudcontentwarehousev1synonymset = googlecloudcontentwarehousev1synonymset 9804 return c 9805 } 9806 9807 // Fields allows partial responses to be retrieved. See 9808 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9809 // details. 9810 func (c *ProjectsLocationsSynonymSetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSynonymSetsCreateCall { 9811 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9812 return c 9813 } 9814 9815 // Context sets the context to be used in this call's Do method. 9816 func (c *ProjectsLocationsSynonymSetsCreateCall) Context(ctx context.Context) *ProjectsLocationsSynonymSetsCreateCall { 9817 c.ctx_ = ctx 9818 return c 9819 } 9820 9821 // Header returns a http.Header that can be modified by the caller to add 9822 // headers to the request. 9823 func (c *ProjectsLocationsSynonymSetsCreateCall) Header() http.Header { 9824 if c.header_ == nil { 9825 c.header_ = make(http.Header) 9826 } 9827 return c.header_ 9828 } 9829 9830 func (c *ProjectsLocationsSynonymSetsCreateCall) doRequest(alt string) (*http.Response, error) { 9831 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 9832 var body io.Reader = nil 9833 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1synonymset) 9834 if err != nil { 9835 return nil, err 9836 } 9837 c.urlParams_.Set("alt", alt) 9838 c.urlParams_.Set("prettyPrint", "false") 9839 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/synonymSets") 9840 urls += "?" + c.urlParams_.Encode() 9841 req, err := http.NewRequest("POST", urls, body) 9842 if err != nil { 9843 return nil, err 9844 } 9845 req.Header = reqHeaders 9846 googleapi.Expand(req.URL, map[string]string{ 9847 "parent": c.parent, 9848 }) 9849 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9850 } 9851 9852 // Do executes the "contentwarehouse.projects.locations.synonymSets.create" call. 9853 // Any non-2xx status code is an error. Response headers are in either 9854 // *GoogleCloudContentwarehouseV1SynonymSet.ServerResponse.Header or (if a 9855 // response was returned at all) in error.(*googleapi.Error).Header. Use 9856 // googleapi.IsNotModified to check whether the returned error was because 9857 // http.StatusNotModified was returned. 9858 func (c *ProjectsLocationsSynonymSetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1SynonymSet, error) { 9859 gensupport.SetOptions(c.urlParams_, opts...) 9860 res, err := c.doRequest("json") 9861 if res != nil && res.StatusCode == http.StatusNotModified { 9862 if res.Body != nil { 9863 res.Body.Close() 9864 } 9865 return nil, gensupport.WrapError(&googleapi.Error{ 9866 Code: res.StatusCode, 9867 Header: res.Header, 9868 }) 9869 } 9870 if err != nil { 9871 return nil, err 9872 } 9873 defer googleapi.CloseBody(res) 9874 if err := googleapi.CheckResponse(res); err != nil { 9875 return nil, gensupport.WrapError(err) 9876 } 9877 ret := &GoogleCloudContentwarehouseV1SynonymSet{ 9878 ServerResponse: googleapi.ServerResponse{ 9879 Header: res.Header, 9880 HTTPStatusCode: res.StatusCode, 9881 }, 9882 } 9883 target := &ret 9884 if err := gensupport.DecodeResponse(target, res); err != nil { 9885 return nil, err 9886 } 9887 return ret, nil 9888 } 9889 9890 type ProjectsLocationsSynonymSetsDeleteCall struct { 9891 s *Service 9892 name string 9893 urlParams_ gensupport.URLParams 9894 ctx_ context.Context 9895 header_ http.Header 9896 } 9897 9898 // Delete: Deletes a SynonymSet for a given context. Throws a NOT_FOUND 9899 // exception if the SynonymSet is not found. 9900 // 9901 // - name: The name of the synonymSet to delete Format: 9902 // projects/{project_number}/locations/{location}/synonymSets/{context}. 9903 func (r *ProjectsLocationsSynonymSetsService) Delete(name string) *ProjectsLocationsSynonymSetsDeleteCall { 9904 c := &ProjectsLocationsSynonymSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9905 c.name = name 9906 return c 9907 } 9908 9909 // Fields allows partial responses to be retrieved. See 9910 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 9911 // details. 9912 func (c *ProjectsLocationsSynonymSetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSynonymSetsDeleteCall { 9913 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9914 return c 9915 } 9916 9917 // Context sets the context to be used in this call's Do method. 9918 func (c *ProjectsLocationsSynonymSetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSynonymSetsDeleteCall { 9919 c.ctx_ = ctx 9920 return c 9921 } 9922 9923 // Header returns a http.Header that can be modified by the caller to add 9924 // headers to the request. 9925 func (c *ProjectsLocationsSynonymSetsDeleteCall) Header() http.Header { 9926 if c.header_ == nil { 9927 c.header_ = make(http.Header) 9928 } 9929 return c.header_ 9930 } 9931 9932 func (c *ProjectsLocationsSynonymSetsDeleteCall) doRequest(alt string) (*http.Response, error) { 9933 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 9934 var body io.Reader = nil 9935 c.urlParams_.Set("alt", alt) 9936 c.urlParams_.Set("prettyPrint", "false") 9937 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 9938 urls += "?" + c.urlParams_.Encode() 9939 req, err := http.NewRequest("DELETE", urls, body) 9940 if err != nil { 9941 return nil, err 9942 } 9943 req.Header = reqHeaders 9944 googleapi.Expand(req.URL, map[string]string{ 9945 "name": c.name, 9946 }) 9947 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9948 } 9949 9950 // Do executes the "contentwarehouse.projects.locations.synonymSets.delete" call. 9951 // Any non-2xx status code is an error. Response headers are in either 9952 // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at 9953 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 9954 // check whether the returned error was because http.StatusNotModified was 9955 // returned. 9956 func (c *ProjectsLocationsSynonymSetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 9957 gensupport.SetOptions(c.urlParams_, opts...) 9958 res, err := c.doRequest("json") 9959 if res != nil && res.StatusCode == http.StatusNotModified { 9960 if res.Body != nil { 9961 res.Body.Close() 9962 } 9963 return nil, gensupport.WrapError(&googleapi.Error{ 9964 Code: res.StatusCode, 9965 Header: res.Header, 9966 }) 9967 } 9968 if err != nil { 9969 return nil, err 9970 } 9971 defer googleapi.CloseBody(res) 9972 if err := googleapi.CheckResponse(res); err != nil { 9973 return nil, gensupport.WrapError(err) 9974 } 9975 ret := &GoogleProtobufEmpty{ 9976 ServerResponse: googleapi.ServerResponse{ 9977 Header: res.Header, 9978 HTTPStatusCode: res.StatusCode, 9979 }, 9980 } 9981 target := &ret 9982 if err := gensupport.DecodeResponse(target, res); err != nil { 9983 return nil, err 9984 } 9985 return ret, nil 9986 } 9987 9988 type ProjectsLocationsSynonymSetsGetCall struct { 9989 s *Service 9990 name string 9991 urlParams_ gensupport.URLParams 9992 ifNoneMatch_ string 9993 ctx_ context.Context 9994 header_ http.Header 9995 } 9996 9997 // Get: Gets a SynonymSet for a particular context. Throws a NOT_FOUND 9998 // exception if the Synonymset does not exist 9999 // 10000 // - name: The name of the synonymSet to retrieve Format: 10001 // projects/{project_number}/locations/{location}/synonymSets/{context}. 10002 func (r *ProjectsLocationsSynonymSetsService) Get(name string) *ProjectsLocationsSynonymSetsGetCall { 10003 c := &ProjectsLocationsSynonymSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10004 c.name = name 10005 return c 10006 } 10007 10008 // Fields allows partial responses to be retrieved. See 10009 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10010 // details. 10011 func (c *ProjectsLocationsSynonymSetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSynonymSetsGetCall { 10012 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10013 return c 10014 } 10015 10016 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10017 // object's ETag matches the given value. This is useful for getting updates 10018 // only after the object has changed since the last request. 10019 func (c *ProjectsLocationsSynonymSetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSynonymSetsGetCall { 10020 c.ifNoneMatch_ = entityTag 10021 return c 10022 } 10023 10024 // Context sets the context to be used in this call's Do method. 10025 func (c *ProjectsLocationsSynonymSetsGetCall) Context(ctx context.Context) *ProjectsLocationsSynonymSetsGetCall { 10026 c.ctx_ = ctx 10027 return c 10028 } 10029 10030 // Header returns a http.Header that can be modified by the caller to add 10031 // headers to the request. 10032 func (c *ProjectsLocationsSynonymSetsGetCall) Header() http.Header { 10033 if c.header_ == nil { 10034 c.header_ = make(http.Header) 10035 } 10036 return c.header_ 10037 } 10038 10039 func (c *ProjectsLocationsSynonymSetsGetCall) doRequest(alt string) (*http.Response, error) { 10040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10041 if c.ifNoneMatch_ != "" { 10042 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10043 } 10044 var body io.Reader = nil 10045 c.urlParams_.Set("alt", alt) 10046 c.urlParams_.Set("prettyPrint", "false") 10047 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10048 urls += "?" + c.urlParams_.Encode() 10049 req, err := http.NewRequest("GET", urls, body) 10050 if err != nil { 10051 return nil, err 10052 } 10053 req.Header = reqHeaders 10054 googleapi.Expand(req.URL, map[string]string{ 10055 "name": c.name, 10056 }) 10057 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10058 } 10059 10060 // Do executes the "contentwarehouse.projects.locations.synonymSets.get" call. 10061 // Any non-2xx status code is an error. Response headers are in either 10062 // *GoogleCloudContentwarehouseV1SynonymSet.ServerResponse.Header or (if a 10063 // response was returned at all) in error.(*googleapi.Error).Header. Use 10064 // googleapi.IsNotModified to check whether the returned error was because 10065 // http.StatusNotModified was returned. 10066 func (c *ProjectsLocationsSynonymSetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1SynonymSet, error) { 10067 gensupport.SetOptions(c.urlParams_, opts...) 10068 res, err := c.doRequest("json") 10069 if res != nil && res.StatusCode == http.StatusNotModified { 10070 if res.Body != nil { 10071 res.Body.Close() 10072 } 10073 return nil, gensupport.WrapError(&googleapi.Error{ 10074 Code: res.StatusCode, 10075 Header: res.Header, 10076 }) 10077 } 10078 if err != nil { 10079 return nil, err 10080 } 10081 defer googleapi.CloseBody(res) 10082 if err := googleapi.CheckResponse(res); err != nil { 10083 return nil, gensupport.WrapError(err) 10084 } 10085 ret := &GoogleCloudContentwarehouseV1SynonymSet{ 10086 ServerResponse: googleapi.ServerResponse{ 10087 Header: res.Header, 10088 HTTPStatusCode: res.StatusCode, 10089 }, 10090 } 10091 target := &ret 10092 if err := gensupport.DecodeResponse(target, res); err != nil { 10093 return nil, err 10094 } 10095 return ret, nil 10096 } 10097 10098 type ProjectsLocationsSynonymSetsListCall struct { 10099 s *Service 10100 parent string 10101 urlParams_ gensupport.URLParams 10102 ifNoneMatch_ string 10103 ctx_ context.Context 10104 header_ http.Header 10105 } 10106 10107 // List: Returns all SynonymSets (for all contexts) for the specified location. 10108 // 10109 // - parent: The parent name. Format: 10110 // projects/{project_number}/locations/{location}. 10111 func (r *ProjectsLocationsSynonymSetsService) List(parent string) *ProjectsLocationsSynonymSetsListCall { 10112 c := &ProjectsLocationsSynonymSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10113 c.parent = parent 10114 return c 10115 } 10116 10117 // PageSize sets the optional parameter "pageSize": The maximum number of 10118 // synonymSets to return. The service may return fewer than this value. If 10119 // unspecified, at most 50 rule sets will be returned. The maximum value is 10120 // 1000; values above 1000 will be coerced to 1000. 10121 func (c *ProjectsLocationsSynonymSetsListCall) PageSize(pageSize int64) *ProjectsLocationsSynonymSetsListCall { 10122 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 10123 return c 10124 } 10125 10126 // PageToken sets the optional parameter "pageToken": A page token, received 10127 // from a previous `ListSynonymSets` call. Provide this to retrieve the 10128 // subsequent page. When paginating, all other parameters provided to 10129 // `ListSynonymSets` must match the call that provided the page token. 10130 func (c *ProjectsLocationsSynonymSetsListCall) PageToken(pageToken string) *ProjectsLocationsSynonymSetsListCall { 10131 c.urlParams_.Set("pageToken", pageToken) 10132 return c 10133 } 10134 10135 // Fields allows partial responses to be retrieved. See 10136 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10137 // details. 10138 func (c *ProjectsLocationsSynonymSetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSynonymSetsListCall { 10139 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10140 return c 10141 } 10142 10143 // IfNoneMatch sets an optional parameter which makes the operation fail if the 10144 // object's ETag matches the given value. This is useful for getting updates 10145 // only after the object has changed since the last request. 10146 func (c *ProjectsLocationsSynonymSetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSynonymSetsListCall { 10147 c.ifNoneMatch_ = entityTag 10148 return c 10149 } 10150 10151 // Context sets the context to be used in this call's Do method. 10152 func (c *ProjectsLocationsSynonymSetsListCall) Context(ctx context.Context) *ProjectsLocationsSynonymSetsListCall { 10153 c.ctx_ = ctx 10154 return c 10155 } 10156 10157 // Header returns a http.Header that can be modified by the caller to add 10158 // headers to the request. 10159 func (c *ProjectsLocationsSynonymSetsListCall) Header() http.Header { 10160 if c.header_ == nil { 10161 c.header_ = make(http.Header) 10162 } 10163 return c.header_ 10164 } 10165 10166 func (c *ProjectsLocationsSynonymSetsListCall) doRequest(alt string) (*http.Response, error) { 10167 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 10168 if c.ifNoneMatch_ != "" { 10169 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10170 } 10171 var body io.Reader = nil 10172 c.urlParams_.Set("alt", alt) 10173 c.urlParams_.Set("prettyPrint", "false") 10174 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/synonymSets") 10175 urls += "?" + c.urlParams_.Encode() 10176 req, err := http.NewRequest("GET", urls, body) 10177 if err != nil { 10178 return nil, err 10179 } 10180 req.Header = reqHeaders 10181 googleapi.Expand(req.URL, map[string]string{ 10182 "parent": c.parent, 10183 }) 10184 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10185 } 10186 10187 // Do executes the "contentwarehouse.projects.locations.synonymSets.list" call. 10188 // Any non-2xx status code is an error. Response headers are in either 10189 // *GoogleCloudContentwarehouseV1ListSynonymSetsResponse.ServerResponse.Header 10190 // or (if a response was returned at all) in error.(*googleapi.Error).Header. 10191 // Use googleapi.IsNotModified to check whether the returned error was because 10192 // http.StatusNotModified was returned. 10193 func (c *ProjectsLocationsSynonymSetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1ListSynonymSetsResponse, error) { 10194 gensupport.SetOptions(c.urlParams_, opts...) 10195 res, err := c.doRequest("json") 10196 if res != nil && res.StatusCode == http.StatusNotModified { 10197 if res.Body != nil { 10198 res.Body.Close() 10199 } 10200 return nil, gensupport.WrapError(&googleapi.Error{ 10201 Code: res.StatusCode, 10202 Header: res.Header, 10203 }) 10204 } 10205 if err != nil { 10206 return nil, err 10207 } 10208 defer googleapi.CloseBody(res) 10209 if err := googleapi.CheckResponse(res); err != nil { 10210 return nil, gensupport.WrapError(err) 10211 } 10212 ret := &GoogleCloudContentwarehouseV1ListSynonymSetsResponse{ 10213 ServerResponse: googleapi.ServerResponse{ 10214 Header: res.Header, 10215 HTTPStatusCode: res.StatusCode, 10216 }, 10217 } 10218 target := &ret 10219 if err := gensupport.DecodeResponse(target, res); err != nil { 10220 return nil, err 10221 } 10222 return ret, nil 10223 } 10224 10225 // Pages invokes f for each page of results. 10226 // A non-nil error returned from f will halt the iteration. 10227 // The provided context supersedes any context provided to the Context method. 10228 func (c *ProjectsLocationsSynonymSetsListCall) Pages(ctx context.Context, f func(*GoogleCloudContentwarehouseV1ListSynonymSetsResponse) error) error { 10229 c.ctx_ = ctx 10230 defer c.PageToken(c.urlParams_.Get("pageToken")) 10231 for { 10232 x, err := c.Do() 10233 if err != nil { 10234 return err 10235 } 10236 if err := f(x); err != nil { 10237 return err 10238 } 10239 if x.NextPageToken == "" { 10240 return nil 10241 } 10242 c.PageToken(x.NextPageToken) 10243 } 10244 } 10245 10246 type ProjectsLocationsSynonymSetsPatchCall struct { 10247 s *Service 10248 name string 10249 googlecloudcontentwarehousev1synonymset *GoogleCloudContentwarehouseV1SynonymSet 10250 urlParams_ gensupport.URLParams 10251 ctx_ context.Context 10252 header_ http.Header 10253 } 10254 10255 // Patch: Remove the existing SynonymSet for the context and replaces it with a 10256 // new one. Throws a NOT_FOUND exception if the SynonymSet is not found. 10257 // 10258 // - name: The name of the synonymSet to update Format: 10259 // projects/{project_number}/locations/{location}/synonymSets/{context}. 10260 func (r *ProjectsLocationsSynonymSetsService) Patch(name string, googlecloudcontentwarehousev1synonymset *GoogleCloudContentwarehouseV1SynonymSet) *ProjectsLocationsSynonymSetsPatchCall { 10261 c := &ProjectsLocationsSynonymSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10262 c.name = name 10263 c.googlecloudcontentwarehousev1synonymset = googlecloudcontentwarehousev1synonymset 10264 return c 10265 } 10266 10267 // Fields allows partial responses to be retrieved. See 10268 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 10269 // details. 10270 func (c *ProjectsLocationsSynonymSetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSynonymSetsPatchCall { 10271 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10272 return c 10273 } 10274 10275 // Context sets the context to be used in this call's Do method. 10276 func (c *ProjectsLocationsSynonymSetsPatchCall) Context(ctx context.Context) *ProjectsLocationsSynonymSetsPatchCall { 10277 c.ctx_ = ctx 10278 return c 10279 } 10280 10281 // Header returns a http.Header that can be modified by the caller to add 10282 // headers to the request. 10283 func (c *ProjectsLocationsSynonymSetsPatchCall) Header() http.Header { 10284 if c.header_ == nil { 10285 c.header_ = make(http.Header) 10286 } 10287 return c.header_ 10288 } 10289 10290 func (c *ProjectsLocationsSynonymSetsPatchCall) doRequest(alt string) (*http.Response, error) { 10291 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 10292 var body io.Reader = nil 10293 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontentwarehousev1synonymset) 10294 if err != nil { 10295 return nil, err 10296 } 10297 c.urlParams_.Set("alt", alt) 10298 c.urlParams_.Set("prettyPrint", "false") 10299 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 10300 urls += "?" + c.urlParams_.Encode() 10301 req, err := http.NewRequest("PATCH", urls, body) 10302 if err != nil { 10303 return nil, err 10304 } 10305 req.Header = reqHeaders 10306 googleapi.Expand(req.URL, map[string]string{ 10307 "name": c.name, 10308 }) 10309 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10310 } 10311 10312 // Do executes the "contentwarehouse.projects.locations.synonymSets.patch" call. 10313 // Any non-2xx status code is an error. Response headers are in either 10314 // *GoogleCloudContentwarehouseV1SynonymSet.ServerResponse.Header or (if a 10315 // response was returned at all) in error.(*googleapi.Error).Header. Use 10316 // googleapi.IsNotModified to check whether the returned error was because 10317 // http.StatusNotModified was returned. 10318 func (c *ProjectsLocationsSynonymSetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContentwarehouseV1SynonymSet, error) { 10319 gensupport.SetOptions(c.urlParams_, opts...) 10320 res, err := c.doRequest("json") 10321 if res != nil && res.StatusCode == http.StatusNotModified { 10322 if res.Body != nil { 10323 res.Body.Close() 10324 } 10325 return nil, gensupport.WrapError(&googleapi.Error{ 10326 Code: res.StatusCode, 10327 Header: res.Header, 10328 }) 10329 } 10330 if err != nil { 10331 return nil, err 10332 } 10333 defer googleapi.CloseBody(res) 10334 if err := googleapi.CheckResponse(res); err != nil { 10335 return nil, gensupport.WrapError(err) 10336 } 10337 ret := &GoogleCloudContentwarehouseV1SynonymSet{ 10338 ServerResponse: googleapi.ServerResponse{ 10339 Header: res.Header, 10340 HTTPStatusCode: res.StatusCode, 10341 }, 10342 } 10343 target := &ret 10344 if err := gensupport.DecodeResponse(target, res); err != nil { 10345 return nil, err 10346 } 10347 return ret, nil 10348 } 10349